2

I have been getting errors connecting to samba/cifs shares from like 3 weeks ago, I have 4 machines, one with Windows, 2 with Fedora 24 and one with Fedora 22. I have shares on the two fedora 24 machines and if I try to connect, for example, from one f24 machine to the other via thunar I get a No route to host. error. I also had configured a one-liner script on my fedora 22 box that connects to the f24 machine using the following command:

# mount -t cifs -o username=****,password=**** '\\192.168.1.1\share' remote/

and it worked like a charm for a very long time, but recently it fails with this error:

[ 91.981816] CIFS VFS: Error connecting to socket. Aborting operation.

[ 91.981960] CIFS VFS: cifs_mount failed w/return code = -113

Unable to find suitable address.

I also tried to connect from one of my f24 machines to the other, and I get (on both machines, trying to connect to each other):

Unable to find suitable address.

But, if I try to connect using the same command from within the same target machine, it works without any issues, and it gets mounted correctly.

The windows machine simply fails to connect. Why does this happen? How can I fix this? This is new to me since everything was working correctly until 2-3 weeks ago. Also I can ssh into any of them without any problem, the issue is completely on samba/cifs.

2

I think that the problem is the construction of the mount command. Try with this:

mount -t cifs //192.168.1.1/share mount_point/ -o username=****,password=****

This should work if the shares configuration in 192.168.1.1 are well configured. If this don't work, you can use smbclient in the client machine to debug the problems without use mount, with something like this (executed in one of the client machines):

smbclient //192.168.1.1/share -U username

It will prompt you for the password of username, and it will give you a more detailed error if it goes wrong.

  • It can't be the first one since it worked for so long, it just recently began to fail, I also tested with the second suggestion and fails with this: Connection to 192.168.1.1 failed (Error NT_STATUS_NETWORK_UNREACHABLE) – arielnmz Nov 21 '16 at 20:52
  • It also can't be the construction of the command since the same one works within the machine, otherwise it would fail, too. – arielnmz Nov 21 '16 at 20:56
  • Try with the smbclient command with a more detailed debug level, and paste the output. Hope it will show more detailed information: – Rubén Alemán Nov 21 '16 at 21:06
  • Try with: smbclient //192.168.1.1/share -U username -d 3 – Rubén Alemán Nov 21 '16 at 21:07
  • Done. I found out what the problem was. – arielnmz Nov 22 '16 at 17:19
2

In case somebody is running into the same issue with Fedora 24 machines with the latest updates (as of today), the problem seems not to be with samba at all, but rather a bug or misconfiguration in the firewall settings. When trying to connect using the level 3 debug mode on smbclient (-d3) I get this messages:

Connecting to 192.168.1.1 at port 445

Connecting to 192.168.1.1 at port 139

Connection to 192.168.1.1 failed (Error NT_STATUS_HOST_UNREACHABLE)

So out of curiosity I went to my server's firewall utility and found out those ports were already open (named samba and samba-client) so I tried with the good ol' disable-reenable to see if it worked and got the following error:

INVALID_HELPER: 'nf_conntrack_netbios_ns' not available in kernel.

So, apparently some update got my firewall rules missing or messed up, so I proceeded to manually opening the specified ports (445 and 139) and now it works as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.