User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Unable to access Raspberry Pi shares

Fri Apr 20, 2018 5:21 pm

I have a RPI3 B+ set up on a WiFi network with a USB SSD drive, have shared the home directories and a folder named 'data' on /media/USBHDD/data.

From windows 10 I can access the folder via Samba but cannot access it from xubuntu.

When attempting to access the folder the error given is:

Failed to open "WORKGROUP" Failed to retrieve share list from server: No route to host.

I thought the problem was related to xubuntu as two PVAs on the network had disappeard but they came back after two reboots.

The USB drive I am using was previously connected to an earlier RPI and the folders on it were previously set up. This is the only thing I can think of which might prevent the folder appearing as it was not made whilst connected to the current RPI.

The RPI and the SSD are both temporarily powered from the xubuntu USB 3 'Always On' port. Not enough power? (Enough for Windows!)

There is a lot of wood out there but I cannot see it for trees! Any pointer to what is probably an obvious error would be appreciated.

Code: Select all

pi@raspberrypi:~ $ sudo smbtree
Enter root's password: 
WORKGROUP
    \\SSDTOSH                ssdTOSH server (Samba, Ubuntu)
        \\SSDTOSH\Canon_MG4200_series    Canon MG4200 series
        \\SSDTOSH\IPC$               IPC Service (ssdTOSH server (Samba, Ubuntu))
        \\SSDTOSH\shares             
        \\SSDTOSH\print$             Printer Drivers
    \\RASPBERRYPI            Samba 4.5.12-Debian
        \\RASPBERRYPI\IPC$               IPC Service (Samba 4.5.12-Debian)
        \\RASPBERRYPI\shares             Data Folder
        \\RASPBERRYPI\print$             Printer Drivers
        \\RASPBERRYPI\homes              Home Directories
    \\0D3B28000000           MG4200 series
        \\0D3B28000000\IPC$               
        \\0D3B28000000\canon_memory       MG4200 series
pi@raspberrypi:~ $
fstab:

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=46aa400e-01  /boot           vfat    defaults          0       2
PARTUUID=46aa400e-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

UUID=b3bd607e-3ace-4ef7-8962-95c5326d365e /media/USBHDD ext4 defaults,noatime 0 1
RPI /etc/samba/smb.conf:

Code: Select all

[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n$
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = yes
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
[shares]
  comment = Data Folder
  path = /media/USBHDD/data
  valid users = @users
  force group = users
  browsable = yes
  create mask = 0660
  directory mask = 0771
  writable = yes
  guest ok = no

User avatar
rpdom
Posts: 12410
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 5:35 pm

For sharing from Pi to other Linux systems I always use NFS instead of Samba. The two can co-exist and NFS gives better speed and control.

User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 5:48 pm

rpdom wrote:
Fri Apr 20, 2018 5:35 pm
For sharing from Pi to other Linux systems I always use NFS instead of Samba. The two can co-exist and NFS gives better speed and control.
Thanks Dom, I will check out NFS having never used it. I rarely need windows to Pi and thought Samba was the way from Linux.

User avatar
rpdom
Posts: 12410
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 7:33 pm

The NFS config lines may be a bit cryptic, but you only need one line on the server in /etc/exports per share, and one in the /etc/fstab on the client.

User avatar
PeterO
Posts: 4107
Joined: Sun Jul 22, 2012 4:14 pm

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 8:02 pm

makem wrote:
Fri Apr 20, 2018 5:21 pm
Failed to open "WORKGROUP" Failed to retrieve share list from server: No route to host.
"No route to host" suggests a networking problem rather than a server or client configuration problem.

Can you ping the Pi from your unbutu box ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 10:17 pm

PeterO wrote:
Fri Apr 20, 2018 8:02 pm
makem wrote:
Fri Apr 20, 2018 5:21 pm
Failed to open "WORKGROUP" Failed to retrieve share list from server: No route to host.
"No route to host" suggests a networking problem rather than a server or client configuration problem.

Can you ping the Pi from your unbutu box ?

PeterO
Yes:

Code: Select all

makem@ssdTOSH:~$ ping 192.168.2.43
PING 192.168.2.43 (192.168.2.43) 56(84) bytes of data.
64 bytes from 192.168.2.43: icmp_seq=1 ttl=64 time=3.37 ms
64 bytes from 192.168.2.43: icmp_seq=2 ttl=64 time=3.40 ms
64 bytes from 192.168.2.43: icmp_seq=3 ttl=64 time=2.68 ms
64 bytes from 192.168.2.43: icmp_seq=4 ttl=64 time=4.99 ms
64 bytes from 192.168.2.43: icmp_seq=5 ttl=64 time=2.48 ms
^C
--- 192.168.2.43 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 2.482/3.391/4.997/0.883 ms
makem@ssdTOSH:~$

User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 11:38 pm

There is definitely something wrong with the network. When I select Browse Network in File Manager, normally all shares on 4 other machines show up immediately in addition to Windows Network and are selectable.

Now, for most of today I have only got Windows Network except for one time when Raspberrypi showed. Selecting that opened smb://raspberrypi with a blank page.

When Windows Network is selected now it opens WORKGROUP which cannot be found.

I don't want to investigate NFS until I find what is currently wrong.

User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Re: Unable to access Raspberry Pi shares

Fri Apr 20, 2018 11:45 pm

rpdom wrote:
Fri Apr 20, 2018 7:33 pm
The NFS config lines may be a bit cryptic, but you only need one line on the server in /etc/exports per share, and one in the /etc/fstab on the client.
Cryptic! you can say that again! I took at look and decided before I get involved I should really sort out what appears to be a network problem. The same problem occurs with the old Pi which was working fine yesterday and again points to network.

I did upgrade the router firmware prior to having this problem but it appears to work fine and I rebooted it just to be sure today.

As for NFS, you make it sound simple Dom. We will see.

User avatar
makem
Posts: 212
Joined: Tue Jun 18, 2013 9:22 pm

Re: Unable to access Raspberry Pi shares

Sat Apr 21, 2018 12:47 am

Well, I can now access the shares.

The problem is related to using two RPIs. Host name for each was default raspberrypi. I always use fixed IPs and the first RPI was 192.168.2.27. The second RPI I allowed DHCP to set the IP and 192.168.2.43 was given.

All during setting this up I have addressed the latest RPI (RPI3 B+) using the IP address.

x11vnc was set up using the IP address too but I noticed that the connection was raspberrypi:0

Pinging raspberrypi attempted to access 192.168.2.27, the fixed IP of the old RPI and of course, failed.

I changed the host name of the RPI3 B+ to be RPIBplus in the RPI config file. I also fixed the IP to 192.168.2.43, naming the setting RPIBplus.

Having changed the host name of the RPI I expected to be able to access the share but still could not.

I edit the host file on xubuntu adding 192.168.2.43 RPIBplus. This did not work.

I changed the edit to 192.168.2.43 raspberrypi. Now I could access the shares. But, I do not understand what is going on!

Where is 'raspberrypi' being remembered? It seems to be in File Manager which still accesses smb://raspberrypi/shares

Is there some place which needs flushing?

EDIT. Reboot, reboot, reboot! Jeez I forgot to reboot! Now File Manager uses the correct host name. I suppose I can remove the host file edit but thats for tomorrow.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 6 guests