Forum
[SOLVED] RPi invisible on network / nmbd issue - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: [SOLVED] RPi invisible on network / nmbd issue (/thread-2609.html)



RPi invisible on network / nmbd issue - mrpi - 21st Dec, 2014 12:35 AM

Software
XBian version: 1.0RC3
XBMC version: 13.2 Git:20140901-867305b
Overclock settings: Xbian profile (840Mhz)

Hardware
Power supply rating: 5V 3A
RPi model (model A/B 256mb/512mb): B+ 512mb
SD card size and make/type: Kingston 8GB microSD
Network (wireless or LAN): LAN
Connected devices (TV, USB, network storage, etc.): RPi using 1 usb connected to 1 externally powered usb hub (7ports) connected to: 1 Seagate USB 2.0 Expansion 2TB, 1 Samsung SATA 320GB drive in USB 3.0 enclosure, 1 Logitech USB wireless combo (kb + mouse)

Config files:
/etc/hostname:
Code:
atum
/etc/hosts:
Code:
127.0.0.1    localhost
127.0.1.1    atum
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
/etc/host.conf:
Code:
multi on
/etc/samba/shares.conf:
Code:
[xbian]
    path = /home/xbian
    guest ok = yes
    read only = no
    force user = xbian
    browseable = yes

[xbian-xbmc]
    path = /home/xbian/.xbmc
    guest ok = yes
    read only = no
    force user = xbian
    browseable = yes

[system-logs]
    path = /var/log
    guest ok = yes
    read only = yes
    force user = root
    browseable = yes
/etc/smb.conf
Code:
# DO NOT EDIT THIS FILE. FOR ADDITIONAL SETTINGS OR SHARES DEFINITION
# USE 'net' (man net).

[global]
server string = atum
guest ok = yes
security = user
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
registry shares = yes
syslog = 0
map to guest = bad user
workgroup = WORKGROUP
bind interfaces only = No
encrypt passwords = true
log level = 0
# smb ports = 445
unix extensions = No
wide links = yes

include = /etc/samba/user.conf
# include = /etc/samba/shares.conf
/etc/samba/user.conf
Code:
[Expansion]
   comment = Expansion
   path = /media/Expansion
   valid users = alex
   force create mode = 755
   force directory mode = 755
   writeable = yes
   browseable = no

[Samsung]
   comment = Samsung
   path = /media/Samsung
   valid users = alex
   force create mode = 755
   force directory mode = 755
   writeable = yes
   browseable = no

[Movies]
   comment = Movies
   path = /media/Expansion/MOVIES
   force create mode = 755
   force directory mode = 755
   writeable = yes

[TV Shows]
   comment = TV Shows
   path = /media/Expansion/TV SHOWS
   force create mode = 755
   force directory mode = 755
   writeable = yes

[Shared]
   comment = Shared
   path = /media/Expansion/Shared
   force create mode = 755
   force directory mode = 755
   writeable = yes

Problem description:
The RPi isn't visible on the network. I cannot browse its shares from Windows 8.1, Windows 7, mobile devices etc.
Typing the IP into windows explorer as \\192.168.0.3\ allows me to see the 3 shares: Movies, TV Shows and Shared.
\\192.168.0.3\Expansion and \\192.168.0.3\Samsung are hidden, as expected, but can be accessed.
Trying to access via \\hostname\ doesn't work. Sad
Samba in pure Raspbian worked right out of the box. I was able to configure my shares just the way I want them.
I don't really know how to use this 'net' command to configure these, so I tried editing the user.conf file.
Also, I wanted to remove access to the initial shares, that's why I commented out shares.conf.
I added the samba user by using 'sudo smbpasswd -a alex'.
Basically, I need to be able to browse to \\atum\ from my windows laptop.

Could my problem be related to how Xbian handles SMB shares (the net command I'm unfamiliar with) ?
Any ideas?

Thanks in advance for any help,
Alex


RE: RPi invisible on network / smb issue - Skywatch - 21st Dec, 2014 03:42 AM

Same here after last update, both pi's with Xbian no longer appear under window network, but are OK via SSH. Odd.

Skywatch


RE: RPi invisible on network / smb issue - mrpi - 21st Dec, 2014 04:09 AM

(21st Dec, 2014 03:42 AM)Skywatch Wrote:  Same here after last update, both pi's with Xbian no longer appear under window network, but are OK via SSH. Odd.

Skywatch

Do you mean RC2? Was it working in RC2?


RE: RPi invisible on network / smb issue - Skywatch - 21st Dec, 2014 04:42 AM

It was OK on RC3 until the last week or two. I don't know what changed and have a lot of commitments between now and Christmas, so no time to look into it further.

Skywatch.


RE: RPi invisible on network / smb issue - mk01 - 21st Dec, 2014 06:23 AM

@mrpi

can you try:

Code:
sudo -s
touch /etc/init/nmbd.conf

reboot ?


RE: RPi invisible on network / smb issue - mrpi - 21st Dec, 2014 06:46 AM

(21st Dec, 2014 06:23 AM)mk01 Wrote:  @mrpi

can you try:

Code:
sudo -s
touch /etc/init/nmbd.conf

reboot ?

Thank you! That was spot on! Problem solved!
So, to help me understand (as I don't usually use upstart), nmbd.override wasn't able to run without the nmbd.conf?


RE: RPi invisible on network / nmbd issue - Skywatch - 21st Dec, 2014 10:00 PM

Worked here too, thanks MK01!

Like mrpi asked, can you tell us what happened and what this did to solve it please?

Skywatch.


RE: RPi invisible on network / nmbd issue - CurlyMo - 21st Dec, 2014 11:56 PM

smbd takes care of the actual filesharing.
nmbd takes care of the name resolving.

So to actually see the shares in your network, you need nmbd running.


RE: RPi invisible on network / nmbd issue - mk01 - 31st Dec, 2014 07:28 PM

@mrpi @Skywatch

if you want the background that happened:
- since B2 there is upstart on XBian taking care of boot process
- unfortunately the "debian way" of providing long-term backward compatibility means:
- upstart IS really the one which starts first but contains only bare minimum of native jobs - actually to very soon in boot process call again the old sysv system (what very much means only ONE more system to take care of with no benefits)
- so since then XBian is slowly doing the migration on its own (if feasible with respect to integrity of the system - in that case by utilising .override files - if there is PKG native .conf file, user (or we at XBian) can create .override file. any info/config param provided in override file takes precedence for upstart (clean and user-easy way hot to override system functions but actually not touch the system files)

a while ago we did that for samba (smbd/nmbd processes). in advance we shipped .override file - to have system already tuned at the time when updated samba package hits debian stable repo meaning it will also rm old sysv boot script and will place own into /etc/init.
but due to bug inside samba native pkg installer script, old sysv was removed, but new wasn't placed. into /etc/init. for upstart .override file is not considered at all until original .conf exists - what is ok, otherwise it would be a place to hack actually.
so on the day raspbian installed samba update, it broke nmbd loading at boot.

normally we would find that before user - but there our part kicked in - because wheezy will soon turn into jennie, we do all the development & test on primarily on jennie. but because jennie version of upstart is much ahead of the one in wheezy - it has deployed .conf file for nmbd long ago and all was fine (for all imx6 users and devels).

so something what you cant see until properly reported - then it was easy to track down. so so now you how such empty command as touch can solve this - because it creates (although empty) conf file for nmbd, upstart reads it - creates internally JOB nmbd, then looks for override - and because XBian provided this in advance nmbd is properly started from that configuration.

but yes, indeed funny - try to convince a system administrator (from user perspective) that REALLY creating and empty file made SAMBA working again. Wink
but no magic again

I'm just pushing xbian-update containing among others also that fix so it will be distributed today - unfortunately I couldn't find the 3rd buggy line (maybe more, who knows) removing samba mounts from fstab ... so do a backup because your gets again removed ... Undecided but I have not forgotten about that


RE: RPi invisible on network / nmbd issue - CurlyMo - 31st Dec, 2014 07:41 PM

About the fstab problem. I also manually ran all scripts in xbian-update on a (apparantly) conflicting fstab, but none of them actually did anything that could cause it.


RE: RPi invisible on network / nmbd issue - Skywatch - 5th Jan, 2015 09:48 PM

mk01 - Thank you for taking the time to explain that one. It doesn't make a lot of sense that a blank file would be the problem, but it did fix the issue.

Skywatch.


RE: RPi invisible on network / nmbd issue - mk01 - 13th Jan, 2015 04:17 PM

@Skywatch

doesn't make sense because I failed to explain, ... or doesn't make sense in general?

a job can have it's configuration in file.X and file.Y.
configuration in file.Y has priority over file.X.

but file.Y is never considered if file.X is not present (so there is nothing to take priority over).

it's like the BASIC-kind (BASIC as programming lng Smile ) of joke: Mom sends John to K-mart, saying - buy a bread. and if there will be eggs, buy 12. So John bought 12 breads. Wink


RE: RPi invisible on network / nmbd issue - Skywatch - 13th Jan, 2015 08:10 PM

Your description was good!

I just was saying that adding a blank file with no data in it solving an issue like this seems "illogical Captain".

Skywatch. Big Grin


RE: RPi invisible on network / nmbd issue - mk01 - 19th Jan, 2015 08:21 PM

@Skywatch

but that's why are UN*X system so funny and popular Wink