Failed to start samba after update

Brief description of the problem

Samba is not starting after update.

Detailed step by step instructions to reproduce the problem

  1. I tried to update Rockstor via web-ui
  2. I turned off the computer while the update was installing by error.
  3. I deleted the malfunctioning kernel and updated via the shell (from the computer monitor)
  4. Now samba fails to start

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/smart_manager/views/samba_service.py", line 113, in post systemctl('nmb', command) File "/opt/rockstor/src/rockstor/system/services.py", line 64, in systemctl return run_command([SYSTEMCTL_BIN, switch, service_name]) File "/opt/rockstor/src/rockstor/system/osi.py", line 121, in run_command raise CommandException(cmd, out, err, rc) CommandException: Error running a command. cmd = /usr/bin/systemctl start nmb. rc = 1. stdout = ['']. stderr = ['Job for nmb.service failed because the control process exited with error code. See "systemctl status nmb.service" and "journalctl -xe" for details.', '']

I’m sorry but i’m a noob with this. I already looked at other topics but it seems i’m not understanding a lot of things because i don’t know any command on linux. I tried to enforce selinux and to disable it with no success…

after doing systemctl status nmb:

1 Like

Hi @LIBR4life , and welcome to the community!

Yes, I believe your problem comes from that, especially given the error you see when trying to start the Samba service. From your screenshot (thanks a lot for including it):

version 'SAMBA_4.4.4' not found

…we can see that the samba package does not appear to be installed. Given the computer was turned off mid-updates, this is not that surprising as yum doesn’t really seem to like that.

I would thus run sudo yum update from the terminal to process any remaining updates and make sure they all install successfully. If Samba is not one of these packages to be updated/re-installed, you can have a look at: yum info samba and see what version you have. It is possible you are in the same situation as in the post below:

Try the sudo yum update first and see how it goes. Then have a look at the status of your current samba install yum info samba. We should be able to have a better idea from the outputs of these two commands.

Hope this helps,

3 Likes

Hello, thanks for the fast response. Here’s the output of sudo yum update and yum info samba:

Thanks for the additional information.

It appears the latest samba version did install correclty, yet nmb seems to still look for Samba 4.4.4. As I result, I would first restart your machine to reload everythin, as it always prove useful after so many updates.

I would then guide you towards the excellent troubleshooting that @Haioken did in the thread I linked above (and pasted below):

In particular, it started with:

systemctl status nmb.service
journalctl -u nmb.service
systemctl status smb.service
journalctl -u smb.service

Make sure to copy + paste the outputs for both of these (the system shell we use, Shellinabox, let’s you use Ctrl + C to copy) so that we can see all details.

These should help a little more, hopefully.

1 Like

Thank you. These are the outputs:

 [root@nas_server ~]# systemctl status nmb.service                                                                                                                                                
    â—Ź nmb.service - Samba NMB Daemon
       Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)                                                                                                        
       Active: failed (Result: exit-code) since Wed 2020-03-18 14:47:07 CET; 43s ago
         Docs: man:nmbd(8)                                                                                                                                                                           
               man:samba(7)                                                                                                                                                                          
               man:smb.conf(5)                                                                                                                                                                       
      Process: 2681 ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS (code=exited, status=1/FAILURE)
     Main PID: 2681 (code=exited, status=1/FAILURE)                                                                                                                                                  
                                                                                                                                                                                                 
Mar 18 14:47:07 nas_server systemd[1]: Starting Samba NMB Daemon...                                                                                                                              
Mar 18 14:47:07 nas_server nmbd[2681]: /usr/sbin/nmbd: /usr/lib64/samba/libreplace-samba4.so: version `SAMBA_4.4.4' not found (required by /lib64/libwbclient.so.0)                              
Mar 18 14:47:07 nas_server nmbd[2681]: /usr/sbin/nmbd: /usr/lib64/samba/libwinbind-client-samba4.so: version `SAMBA_4.4.4' not found (required by /lib64/libwbclient.so.0)                       
Mar 18 14:47:07 nas_server systemd[1]: nmb.service: main process exited, code=exited, status=1/FAILURE                                                                                           
Mar 18 14:47:07 nas_server systemd[1]: Failed to start Samba NMB Daemon.
Mar 18 14:47:07 nas_server systemd[1]: Unit nmb.service entered failed state.                                                                                                                    
Mar 18 14:47:07 nas_server systemd[1]: nmb.service failed.   

[root@nas_server ~]# journalctl -u nmb.service                                                                                                                                                   
-- Logs begin at Wed 2020-03-18 14:45:28 CET, end at Wed 2020-03-18 14:48:24 CET. --                                                                                                             
Mar 18 14:47:07 nas_server systemd[1]: Starting Samba NMB Daemon...                                                                                                                              
Mar 18 14:47:07 nas_server nmbd[2681]: /usr/sbin/nmbd: /usr/lib64/samba/libreplace-samba4.so: version `SAMBA_4.4.4' not found (required by /lib64/libwbclient.so.0)                              
Mar 18 14:47:07 nas_server nmbd[2681]: /usr/sbin/nmbd: /usr/lib64/samba/libwinbind-client-samba4.so: version `SAMBA_4.4.4' not found (required by /lib64/libwbclient.so.0)                       
Mar 18 14:47:07 nas_server systemd[1]: nmb.service: main process exited, code=exited, status=1/FAILURE                                                                                           
Mar 18 14:47:07 nas_server systemd[1]: Failed to start Samba NMB Daemon.
Mar 18 14:47:07 nas_server systemd[1]: Unit nmb.service entered failed state.                                                                                                                    
Mar 18 14:47:07 nas_server systemd[1]: nmb.service failed. 

[root@nas_server ~]# systemctl status smb.service
â—Ź smb.service - Samba SMB Daemon                                                                                                                                                                 
   Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor preset: disabled)                                                                                                            
   Active: inactive (dead)  

[root@nas_server ~]# journalctl -u smb.service                                                                                                                                                   
-- No entries --

OK, so if we look at the following…

/usr/sbin/nmbd: /usr/lib64/samba/libwinbind-client-samba4.so: version SAMBA_4.4.4’ not found (required by /lib64/libwbclient.so.0)`

…we can see that you’re probably in the same case as in the thread I linked and that we’re following: an issue with the installation of libwbclient as the latter seems to have stayed on v4.4.4 rather than following the update samba version 4.9.1 (was 4.4.4). These two packages are highly interconnected so I’m not surprised to see error if one’s version doesn’t match the other.

You should first check your installed versions:

yum info samba
yum info libwbclient

On my machine I have:

[root@rockdev ~]# yum info samba
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nodesdirect.com
 * epel: fedora-epel.mirrors.tds.net
 * extras: mirror.nodesdirect.com
 * updates: mirror.nodesdirect.com
Installed Packages
Name        : samba
Arch        : x86_64
Version     : 4.9.1
Release     : 10.el7_7
Size        : 1.9 M
Repo        : installed
From repo   : updates
Summary     : Server and Client software to interoperate with Windows machines
URL         : http://www.samba.org/
License     : GPLv3+ and LGPLv3+
Description : Samba is the standard Windows interoperability suite of programs for Linux and
            : Unix.

[root@rockdev ~]#
[root@rockdev ~]# yum info libwbclient
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nodesdirect.com
 * epel: fedora-epel.mirrors.tds.net
 * extras: mirror.nodesdirect.com
 * updates: mirror.nodesdirect.com
Installed Packages
Name        : libwbclient
Arch        : x86_64
Version     : 4.9.1
Release     : 10.el7_7
Size        : 71 k
Repo        : installed
From repo   : updates
Summary     : The winbind client library
URL         : http://www.samba.org/
License     : GPLv3+ and LGPLv3+
Description : The libwbclient package contains the winbind client library from the Samba
            : suite.

Available Packages
Name        : libwbclient
Arch        : i686
Version     : 4.9.1
Release     : 10.el7_7
Size        : 112 k
Repo        : updates/x86_64
Summary     : The winbind client library
URL         : http://www.samba.org/
License     : GPLv3+ and LGPLv3+
Description : The libwbclient package contains the winbind client library from the Samba
            : suite.

Now, I suspect your libwbclient remained at v4.4.4.

If that is the case, you could try forcing its install at indicated by @Haioken:

yum reinstall libwbclient -y && systemctl restart nmb.service
1 Like

These are the outputs from the first two commands:

[root@nas_server ~]# yum info samba                                                                                                                   
Loaded plugins: changelog, fastestmirror                                                                                                              
Loading mirror speeds from cached hostfile                                                                                                            
 * base: mirrors.prometeus.net                                                                                                                        
 * epel: mirror.euserv.net                                                                                                                            
 * extras: mirrors.prometeus.net                                                                                                                      
 * updates: mirrors.prometeus.net                                                                                                                     
Installed Packages                                                                                                                                    
Name        : samba                                                                                                                                   
Arch        : x86_64                                                                                                                                  
Version     : 4.9.1                                                                                                                                   
Release     : 10.el7_7                                                                                                                                
Size        : 1.9 M                                                                                                                                   
Repo        : installed                                                                                                                               
Summary     : Server and Client software to interoperate with Windows machines                                                                        
URL         : http://www.samba.org/                                                                                                                   
License     : GPLv3+ and LGPLv3+                                                                                                                      
Description : Samba is the standard Windows interoperability suite of programs for Linux and                                                          
            : Unix.                                                                                                                                   
                                                                                                                                                      
[root@nas_server ~]# yum info libwbclient                                                                                                             
Loaded plugins: changelog, fastestmirror                                                                                                              
Loading mirror speeds from cached hostfile                                                                                                            
 * base: mirrors.prometeus.net                                                                                                                        
 * epel: mirror.euserv.net                                                                                                                            
 * extras: mirrors.prometeus.net                                                                                                                      
 * updates: mirrors.prometeus.net                                                                                                                     
Installed Packages                                                                                                                                    
Name        : libwbclient                                                                                                                             
Arch        : x86_64                                                                                                                                  
Version     : 4.4.4                                                                                                                                   
Release     : 14.el7_3                                                                                                                                
Size        : 71 k                                                                                                                                    
Repo        : installed                                                                                                                               
From repo   : anaconda                                                                                                                                
Summary     : The winbind client library                                                                                                              
URL         : http://www.samba.org/                                                                                                                   
License     : GPLv3+ and LGPLv3+                                                                                                                      
Description : The libwbclient package contains the winbind client library from the Samba                                                              
            : suite.                                                                                                                                  
                                                                                                                                                      
Name        : libwbclient                                                                                                                             
Arch        : x86_64                                                                                                                                  
Version     : 4.9.1                                                                                                                                   
Release     : 10.el7_7                                                                                                                                
Size        : 71 k                                                                                                                                    
Repo        : installed                                                                                                                               
Summary     : The winbind client library                                                                                                              
URL         : http://www.samba.org/                                                                                                                   
License     : GPLv3+ and LGPLv3+                                                                                                                      
Description : The libwbclient package contains the winbind client library from the Samba                                                              
            : suite.                                                                                                                                  
                                                                                                                                                      
Available Packages                                                                                                                                    
Name        : libwbclient                                                                                                                             
Arch        : i686                                                                                                                                    
Version     : 4.9.1                                                                                                                                   
Release     : 10.el7_7                                                                                                                                
Size        : 112 k                                                                                                                                   
Repo        : updates/x86_64                                                                                                                          
Summary     : The winbind client library                                                                                                              
URL         : http://www.samba.org/                                                                                                                   
License     : GPLv3+ and LGPLv3+                                                                                                                      
Description : The libwbclient package contains the winbind client library from the Samba                                                              
            : suite.

Then i run the last command, but it didn’t resolve the problem. I can’t write the output because there are too many characters. Don’t you think that i only need to delete the old libwbclient? Because they are both installed (the old and the new one).

That’s only a part of the output:

[root@nas_server ~]# yum reinstall libwbclient -y && systemctl restart nmb.service                                                                    
Loaded plugins: changelog, fastestmirror                                                                                                              
Loading mirror speeds from cached hostfile                                                                                                            
 * base: mirrors.prometeus.net                                                                                                                        
 * epel: mirror.nextlayer.at                                                                                                                          
 * extras: mirrors.prometeus.net                                                                                                                      
 * updates: mirrors.prometeus.net                                                                                                                     
Rockstor-Testing                                                                                                               | 2.9 kB  00:00:00     
rockstor                                                                                                                       | 2.9 kB  00:00:00     
Resolving Dependencies                                                                                                                                
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yu
m history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can hel
p).                                                                                                                                                   
The program yum-complete-transaction is found in the yum-utils package.                                                                               
--> Running transaction check                                                                                                                         
---> Package libwbclient.x86_64 0:4.4.4-14.el7_3 will be updated                                                                                      
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-common-tools-4.4.4-14.el7_3.x86_64                                         
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-winbind-modules-4.4.4-14.el7_3.x86_64                                      
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-common-libs-4.4.4-14.el7_3.x86_64                                          
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-libs-4.4.4-14.el7_3.x86_64                                                 
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-client-libs-4.4.4-14.el7_3.x86_64                                          
--> Processing Dependency: libwbclient = 4.4.4-14.el7_3 for package: samba-winbind-krb5-locator-4.4.4-14.el7_3.x86_64                                 
--> Processing Dependency: libwinbind-client-samba4.so(SAMBA_4.4.4)(64bit) for package: samba-winbind-modules-4.4.4-14.el7_3.x86_64                   
---> Package libwbclient.x86_64 0:4.9.1-10.el7_7 will be an update                                                                                    
---> Package libwbclient.x86_64 0:4.9.1-10.el7_7 will be erased                                                                                       
--> Finished Dependency Resolution                                                                                                                    
Error: Package: samba-winbind-krb5-locator-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                        
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-common-tools-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-winbind-modules-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                             
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-common-libs-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                 
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-libs-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                        
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-client-libs-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                 
           Requires: libwbclient = 4.4.4-14.el7_3                                                                                                     
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwbclient = 4.4.4-14.el7_3                                                                                                           
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
               libwbclient = 4.9.1-10.el7_7                                                                                                           
           Available: libwbclient-4.9.1-6.el7.i686 (base)                                                                                             
               libwbclient = 4.9.1-6.el7                                                                                                              
Error: Package: samba-winbind-modules-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                             
           Requires: libwinbind-client-samba4.so(SAMBA_4.4.4)(64bit)                                                                                  
           Removing: libwbclient-4.4.4-14.el7_3.x86_64 (@anaconda/3)                                                                                  
               libwinbind-client-samba4.so(SAMBA_4.4.4)(64bit)                                                                                        
           Updated By: libwbclient-4.9.1-10.el7_7.x86_64 (updates)                                                                                    
              ~libwinbind-client-samba4.so(SAMBA_4.9.1)(64bit)                                                                                        
 You could try using --skip-broken to work around the problem                                                                                         
** Found 319 pre-existing rpmdb problem(s), 'yum check' output follows:

That’s rather unexpected… I didn’t that was possible. In this case yes, uninstalling them and then reinstalling them might help, but I’m not sure how yum will deal with that. You can always try yum remove libwbclient and see what is listed as package(s) to remove… hopefully both will be listed for removal so that you can re-install it.

1 Like

I managed to remove the two libwbclients and reinstall the new one but it says “failed to restart nmb.service: unit not found”. (I’m sorry but i can only do a photo with my phone)


What should I do now?

Mmm… interesting… I wasn’t expecting that one either. My first thought is to re-install samba as nmb.service is provided by the samba package.

You can try the following commands:

yum remove samba
systemctl status smb nmb
yum install samba
systemctl status smb nmb

And paste the output here. On my machine, for reference, I have:

[root@rockdev ~]# yum remove samba
Loaded plugins: changelog, fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:4.9.1-10.el7_7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                       Arch                                                           Version                                                                   Repository                                                        Size
===============================================================================================================================================================================================================================================================================
Removing:
 samba                                                         x86_64                                                         4.9.1-10.el7_7                                                            @updates                                                         1.9 M

Transaction Summary
===============================================================================================================================================================================================================================================================================
Remove  1 Package

Installed size: 1.9 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : samba-4.9.1-10.el7_7.x86_64                                                                                                                                                                                                                                 1/1
  Verifying  : samba-4.9.1-10.el7_7.x86_64                                                                                                                                                                                                                                 1/1

Removed:
  samba.x86_64 0:4.9.1-10.el7_7

Complete!
[root@rockdev ~]# systemctl status smb nmb
Unit smb.service could not be found.
Unit nmb.service could not be found.
[root@rockdev ~]#
[root@rockdev ~]#
[root@rockdev ~]# yum install samba
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nodesdirect.com
 * epel: fedora-epel.mirrors.tds.net
 * extras: mirror.nodesdirect.com
 * updates: mirror.nodesdirect.com
rockstor                                                                                                                                                                                                                                                | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:4.9.1-10.el7_7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                        Arch                                                            Version                                                                 Repository                                                        Size
===============================================================================================================================================================================================================================================================================
Installing:
 samba                                                          x86_64                                                          4.9.1-10.el7_7                                                          updates                                                          685 k

Transaction Summary
===============================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 685 k
Installed size: 1.9 M
Is this ok [y/d/N]: y
Downloading packages:
samba-4.9.1-10.el7_7.x86_64.rpm                                                                                                                                                                                                                         | 685 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : samba-4.9.1-10.el7_7.x86_64                                                                                                                                                                                                                                 1/1
  Verifying  : samba-4.9.1-10.el7_7.x86_64                                                                                                                                                                                                                                 1/1

Installed:
  samba.x86_64 0:4.9.1-10.el7_7

Complete!
[root@rockdev ~]#
[root@rockdev ~]# systemctl status smb nmb
â—Ź smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)

â—Ź nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)

Hopefully we’re getting closer now.

1 Like

I think i have resolved the samba issue but now another problem comes… I can’t access the web ui anymore…


It looks like your Rockstor install was damaged… probably while removing samba. I’m worried your repos are affected as well, but if you do see Rockstor-Testing in the output of yum repolist, you can try to yum install rockstor.

1 Like

Hi, I solved everything with these commands and now works like new! Thank you for your support!

1 Like

Thanks for letting us know!

You’re probably fine now with all the updates, but let us know if you notice anything odd.

Regarding Samba, make sure to configure the service using the little wrench icon next to Samba in the Services page as we had some silent oddity there. It has now been fixed in the Stable channel, but in the Testing channel, you would need to make sure you do configure it first and then toggle it ON.

Hope everything will go smoothly from now on,
Cheers!

1 Like