SMB - Error. Connection refused

I get “Error. Connection refused” when trying to set up a Samba share from my windows PC to a Rpi 1 running OSMC. It used to work fine.
A Rpi 2 running OSMC on the same network works fine over Samba.

I tried reinstalling OSMC and updating/upgrading everything and installing Samba separately but whatever I do I get the same error message.

The main error in the log seems to be “Samba is idle. Closing the remaining connections” but I only have the other Rpi running a Samaba share. I also tried resetting my router.

I don’t know what else to do to get this working so thanks in advance for all your help.

Ben

MOD EDIT: Please DON’T copy the entire log from xbmclogs.com and then paste it into our forum! All you have to do is simply provide the paste site link like so – http://xbmclogs.com/pkoolo1zy

Are you trying to connect to your PC via hostname or IP address ? If by hostname try IP address instead, as SMB name resolution in Kodi is not very reliable. (Your PC would need a static IP assignment or DHCP reservation for this to be a long term solution)

My pc is set to static IP. Funnily enough before I saw your post I managed to get it working with the IP address but today it won’t work with either the IP address or the host name.

http://paste.osmc.io/okifegaziq

Thanks for your help

18:52:10 19564.154297 T:2661192736   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://LIVING_ROOM-PC/'
                                            unix_err:'6f' error : 'Connection refused'
18:52:12 19565.830078 T:3024241200   ERROR: GetDirectory - Error getting smb://LIVING_ROOM-PC/
18:52:12 19565.832031 T:3024241200   ERROR: CGUIDialogFileBrowser::GetDirectory(smb://LIVING_ROOM-PC/) failed
18:53:20 19634.001953 T:3024241200   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.1.168.76/'
                                            unix_err:'6e' error : 'Connection timed out'
18:53:22 19635.962891 T:3024241200   ERROR: GetDirectory - Error getting smb://192.1.168.76/
18:53:53 19667.273438 T:3024241200   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.1.168.76/'
                                            unix_err:'6e' error : 'Connection timed out'
18:54:04 19677.884766 T:3024241200   ERROR: GetDirectory - Error getting smb://192.1.168.76/
18:55:04 19738.142578 T:3024241200   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.1.168.76/'
                                            unix_err:'6e' error : 'Connection timed out'
18:55:04 19738.191406 T:3024241200   ERROR: GetDirectory - Error getting smb://192.1.168.76/
18:56:10 19803.839844 T:3024241200   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.168.1.76/'
                                            unix_err:'6e' error : 'Connection timed out'
18:56:13 19807.566406 T:3024241200   ERROR: GetDirectory - Error getting smb://192.168.1.76/
18:56:51 19844.988281 T:2661192736  NOTICE: Thread JobWorker start, auto delete: true
18:57:20 19874.318359 T:2748314656  NOTICE: ES: Client  from 192.168.1.87 timed out
18:57:48 19902.035156 T:3024241200  NOTICE: Samba is idle. Closing the remaining connections
19:05:26 20360.496094 T:3024241200   ERROR: GetDirectory - Error getting //192.168.1.76
19:06:36 20429.855469 T:2661192736   ERROR: Previous line repeats 2 times.

To me this looks like you have the path wrong when you’ve added the SMB source - it seems like you are trying to add the server directly, rather than a share ? EG the following will work:

smb://192.168.1.76/Video

But this will not:

smb://192.168.1.76/

What I find works best is rather than trying to directly browse via workgroup, or manually enter the path, is to use the last option in the sources list “add network location” and from there choose SMB, use the IP address to connect, and make sure you enter the name of the share, username and password.

Once you have this SMB share added as a network location it will appear in the sources list and now you can add multiple video sources from that for sub directories, (if neccessary) such as Movies, TV Shows etc, each with their own content types.

If I try the latter what should go in the shared folder? I tried and /Films but neither worked

If you use add network location the share name would just be Films not /Films. The share name will be in a separate field of its own not one big long path as it is when you add shares the “normal” way.

I tried that and it said no route to host

Does anyone have any idea of what I can try next or another option to try such as a good guide for getting NFS set up or UPNP?

Go to system>File manager>Add source from there add the server root such as smb://192.1658.1.76 and put in user/pass when asked, check remember user/pass then OK name it MyServer or whatever. Now when you go to add a Video source MyServer will be listed as a source which you can browse to subfolders /movies /videos /music or whatever and select, from there you will be prompted as to what scraper to use select it and continue.

Thanks all. Seems my problem was a powerline adapter. The powerline adapter that was upstairs seemed to develop a preference for working downstairs. When I swapped the downstairs one for the upstairs one everything was back up and running. Very bizarre but got it sorted in the end.

Cheers
Ben