Error smbd is already running

Система FreeBSD 7.0-RELEASE Версия Самбы Samba-3.3.3

Система FreeBSD 7.0-RELEASE

Версия Самбы Samba-3.3.3

Проблема состоит в том, что до установки Samba-3.3.3 у меня стояла Samba 3.0.3_2 и я решил установить более новую версию.

Старую версию самбы я удалил вместе с:

/var/db/samba

/var/log/samba

кроме /usr/local/etc/smb.conf и /usr/local/etc/samba/smbpasswd

В /usr/local/etc/samba удалил все *.tdb

Затем поставил новую версию:

make config:

X LDAP

X CUPS

X SYSLOG

X QUOTAS

X PORT

файл конфигурации smb.conf

[global]

workgroup = WORKGROUP

server string =

netbios name = Serg

security = user

encrypt passwords = yes

os level = 65

local master = yes

preferred master = yes

domain master = yes

name resolve order = wins host lmhost beast

smb passwd file = /usr/local/etc/samba/smbpasswd

passdb backend = tdbsam

log level = 0 vfs:1

max log size = 0

hosts allow = 192.168.1. 127.

wins support = yes

load printers = no

printing = bsd

printcap name = /dev/null

oplocks = yes

level2 oplocks = true

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536

dns proxy = no

dos charset = cp866

unix charset = koi8-r

display charset = koi8-r

#============================ Share Definitions ==============================

[films]

comment =

path = /public/films

public = no

browseable = yes

writable = yes

write list = root

create mask = 0755

directory mask = 0755

force create mode = 0755

force directory mode = 0755

vfs objects = full_audit

full_audit:prefix = %m|%I|%u

full_audit:success = connect disconnect mkdir rmdir write open rename unlink

full_audit:failure = mkdir rmdir write open close rename unlink

full_audit:facility = local1

full_audit:priority = notice

[software]

comment =

path = /public/software

public = no

browseable = yes

writable = yes

write list = root

create mask = 0755

directory mask = 0755

force create mode = 0755

force directory mode = 0755

vfs objects = full_audit

full_audit:prefix = %m|%I|%u

full_audit:success = connect disconnect mkdir rmdir write open rename unlink

full_audit:failure = mkdir rmdir write open close rename unlink

full_audit:facility = local1

full_audit:priority = notice

[music]

comment =

path = /public/music

public = no

browseable = yes

writable = yes

write list = root

create mask = 0755

directory mask = 0755

force create mode = 0755

force directory mode = 0755

vfs objects = full_audit

full_audit:prefix = %m|%I|%u

full_audit:success = connect disconnect mkdir rmdir write open rename unlink

full_audit:failure = mkdir rmdir write open close rename unlink

full_audit:facility = local1

full_audit:priority = notice

[games]

comment =

path = /public/games

public = no

browseable = yes

writable = yes

write list = root

create mask = 0755

directory mask = 0755

force create mode = 0755

force directory mode = 0755

vfs objects = full_audit

full_audit:prefix = %m|%I|%u

full_audit:success = connect disconnect mkdir rmdir write open rename unlink

full_audit:failure = mkdir rmdir write open close rename unlink

full_audit:facility = local1

full_audit:priority = notice

файл /var/log/messages

May 26 12:13:31 predator nmbd[608]: [2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(337)

May 26 12:13:31 predator nmbd[608]: become_domain_master_browser_wins:

May 26 12:13:31 predator nmbd[608]: Attempting to become domain master browser on workgroup WORKGROUP, subnet UNICAST_SUBNET.

May 26 12:13:31 predator nmbd[608]: [2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(351)

May 26 12:13:31 predator nmbd[608]: become_domain_master_browser_wins: querying WINS server from IP 192.168.1.107 for domain ma

ster browser name WORKGROUP<1b> on workgroup WORKGROUP

May 26 12:13:31 predator nmbd[608]: [2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)

May 26 12:13:31 predator nmbd[608]: *****

May 26 12:13:31 predator nmbd[608]:

May 26 12:13:31 predator nmbd[608]: Samba server SERG is now a domain master browser for workgroup WORKGROUP on subnet UNICAST_

SUBNET

May 26 12:13:31 predator nmbd[608]:

May 26 12:13:31 predator nmbd[608]: *****

May 26 12:13:31 predator nmbd[608]: [2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(292)

May 26 12:13:31 predator nmbd[608]: become_domain_master_browser_bcast:

May 26 12:13:31 predator nmbd[608]: Attempting to become domain master browser on workgroup WORKGROUP on subnet 192.168.1.107

May 26 12:13:31 predator nmbd[608]: [2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(305)

May 26 12:13:31 predator nmbd[608]: become_domain_master_browser_bcast: querying subnet 192.168.1.107 for domain master browser

on workgroup WORKGROUP

May 26 12:13:32 predator nmbd[632]: [2009/05/26 12:13:32, 0] lib/pidfile.c:pidfile_create(120)

May 26 12:13:32 predator nmbd[632]: ERROR: nmbd is already running. File /var/run/nmbd.pid exists and process id 608 is running

.

May 26 12:13:32 predator smbd[638]: [2009/05/26 12:13:32, 0] lib/pidfile.c:pidfile_create(120)

May 26 12:13:32 predator smbd[638]: ERROR: smbd is already running. File /var/run/smbd.pid exists and process id 612 is running

.

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] lib/util_tdb.c:tdb_log(682)

May 26 12:13:32 predator smbd[700]: tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] lib/util.c:reinit_after_fork(1054)

May 26 12:13:32 predator smbd[700]: tdb_reopen_all failed.

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] printing/printing.c:start_background_queue(1426)

May 26 12:13:32 predator smbd[700]: reinit_after_fork() failed

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] lib/util.c:smb_panic(1673)

May 26 12:13:32 predator smbd[700]: PANIC (pid 700): reinit_after_fork() failed

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] lib/util.c:log_stack_trace(1777)

May 26 12:13:32 predator smbd[700]: BACKTRACE: 4 stack frames:

May 26 12:13:32 predator smbd[700]: #0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

May 26 12:13:32 predator smbd[700]: #1 0x2d6d1d <start_background_queue+588> at /usr/local/sbin/smbd

May 26 12:13:32 predator smbd[700]: #2 0x4f73e7 <main+2915> at /usr/local/sbin/smbd

May 26 12:13:32 predator kernel: pid 700 (smbd), uid 0: exited on signal

May 26 12:13:32 predator kernel: 6<

May 26 12:13:32 predator kernel: 118>May 26 12:13:32 predator smbd[700]: #2 0x4f73e7 <main+2915> at /usr/local/sbin/smbd

May 26 12:13:32 predator smbd[700]: #3 0x674c9 <_start+137> at /usr/local/sbin/smbd

May 26 12:13:32 predator smbd[700]: [2009/05/26 12:13:32, 0] lib/fault.c:dump_core(231)

May 26 12:13:32 predator smbd[700]: dumping core in /var/log/samba/cores/smbd

May 26 12:13:32 predator smbd[700]:

May 26 12:13:40 predator nmbd[608]: [2009/05/26 12:13:40, 0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)

May 26 12:13:40 predator nmbd[608]: *****

May 26 12:13:40 predator nmbd[608]:

May 26 12:13:40 predator nmbd[608]: Samba server SERG is now a domain master browser for workgroup WORKGROUP on subnet 192.168.

1.107

May 26 12:13:40 predator nmbd[608]:

May 26 12:13:40 predator nmbd[608]: *****

May 26 12:13:54 predator nmbd[608]: [2009/05/26 12:13:54, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(395)

May 26 12:13:54 predator nmbd[608]: *****

May 26 12:13:54 predator nmbd[608]:

May 26 12:13:54 predator nmbd[608]: Samba name server SERG is now a local master browser for workgroup WORKGROUP on subnet 192.

168.1.107

May 26 12:13:54 predator nmbd[608]:

May 26 12:13:54 predator nmbd[608]: *****

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

May 26 12:25:13 predator smbd[943]: tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

May 26 12:25:13 predator smbd[943]: tdb_reopen_all failed.

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

May 26 12:25:13 predator smbd[943]: reinit_after_fork() failed

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

May 26 12:25:13 predator kernel: pid 943 (smbd), uid 0: exited on signal 6

May 26 12:25:13 predator smbd[943]: PANIC (pid 943): reinit_after_fork() failed

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

May 26 12:25:13 predator smbd[943]: BACKTRACE: 3 stack frames:

May 26 12:25:13 predator smbd[943]: #0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[943]: #1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[943]: #2 0x674c9 <_start+137> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[943]: [2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

May 26 12:25:13 predator smbd[943]: dumping core in /var/log/samba/cores/smbd

May 26 12:25:13 predator smbd[943]:

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

May 26 12:25:13 predator smbd[944]: tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

May 26 12:25:13 predator smbd[944]: tdb_reopen_all failed.

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

May 26 12:25:13 predator smbd[944]: reinit_after_fork() failed

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

May 26 12:25:13 predator kernel: pid 944 (smbd), uid 0: exited on signal 6

May 26 12:25:13 predator smbd[944]: PANIC (pid 944): reinit_after_fork() failed

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

May 26 12:25:13 predator smbd[944]: BACKTRACE: 3 stack frames:

May 26 12:25:13 predator smbd[944]: #0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[944]: #1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[944]: #2 0x674c9 <_start+137> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[944]: [2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

May 26 12:25:13 predator smbd[944]: dumping core in /var/log/samba/cores/smbd

May 26 12:25:13 predator smbd[944]:

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

May 26 12:25:13 predator smbd[945]: tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

May 26 12:25:13 predator smbd[945]: tdb_reopen_all failed.

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

May 26 12:25:13 predator smbd[945]: reinit_after_fork() failed

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

May 26 12:25:13 predator kernel: p<id 118>May 26

May 26 12:25:13 predator kernel: <162:>9

May 26 12:25:13 predator kernel: 4<5 (118s>2

May 26 12:25:13 predator kernel: 5<:163> m

May 26 12:25:13 predator kernel: b<d), u1i1d8> pred

May 26 12:25:13 predator kernel: a<t6o>0

May 26 12:25:13 predator kernel: :< exit1e18d>r

May 26 12:25:13 predator kernel: <s6m>

May 26 12:25:13 predator kernel: o<n sign1a1l8> bd[

May 26 12:25:13 predator kernel: 9<465>6

May 26 12:25:13 predator kernel:

May 26 12:25:13 predator smbd[945]: PANIC (pid 945): reinit_after_fork() failed

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

May 26 12:25:13 predator smbd[945]: BACKTRACE: 3 stack frames:

May 26 12:25:13 predator smbd[945]: #0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[945]: #1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[945]: #2 0x674c9 <_start+137> at /usr/local/sbin/smbd

May 26 12:25:13 predator smbd[945]: [2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

May 26 12:25:13 predator smbd[945]: dumping core in /var/log/samba/cores/smbd

файл /var/log/samba/log.smbd

[2009/05/26 12:13:32, 0] smbd/server.c:main(1267)

smbd version 3.3.3 started.

Copyright Andrew Tridgell and the Samba Team 1992-2009

[2009/05/26 12:13:32, 0] smbd/server.c:main(1267)

smbd version 3.3.3 started.

Copyright Andrew Tridgell and the Samba Team 1992-2009

[2009/05/26 12:13:32, 0] lib/pidfile.c:pidfile_create(120)

ERROR: smbd is already running. File /var/run/smbd.pid exists and process id 612 is running.

[2009/05/26 12:13:32, 0] lib/util_tdb.c:tdb_log(682)

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:13:32, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:13:32, 0] printing/printing.c:start_background_queue(1426)

reinit_after_fork() failed

[2009/05/26 12:13:32, 0] lib/util.c:smb_panic(1673)

PANIC (pid 700): reinit_after_fork() failed

[2009/05/26 12:13:32, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 4 stack frames:

#0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

#1 0x2d6d1d <start_background_queue+588> at /usr/local/sbin/smbd

#2 0x4f73e7 <main+2915> at /usr/local/sbin/smbd

#3 0x674c9 <_start+137> at /usr/local/sbin/smbd

[2009/05/26 12:13:32, 0] lib/fault.c:dump_core(231)

dumping core in /var/log/samba/cores/smbd

[2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

PANIC (pid 943): reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 3 stack frames:

#0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

#1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

#2 0x674c9 <_start+137> at /usr/local/sbin/smbd

[2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

dumping core in /var/log/samba/cores/smbd

[2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

PANIC (pid 944): reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 3 stack frames:

#0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

#1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

#2 0x674c9 <_start+137> at /usr/local/sbin/smbd

[2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

dumping core in /var/log/samba/cores/smbd

[2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

PANIC (pid 945): reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 3 stack frames:

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

PANIC (pid 944): reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 3 stack frames:

#0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

#1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

#2 0x674c9 <_start+137> at /usr/local/sbin/smbd

[2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

dumping core in /var/log/samba/cores/smbd

[2009/05/26 12:25:13, 0] lib/util_tdb.c:tdb_log(682)

tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)

[2009/05/26 12:25:13, 0] lib/util.c:reinit_after_fork(1054)

tdb_reopen_all failed.

[2009/05/26 12:25:13, 0] smbd/server.c:open_sockets_smbd(770)

reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:smb_panic(1673)

PANIC (pid 945): reinit_after_fork() failed

[2009/05/26 12:25:13, 0] lib/util.c:log_stack_trace(1777)

BACKTRACE: 3 stack frames:

#0 0x2b6533 <smb_panic+124> at /usr/local/sbin/smbd

#1 0x4f8438 <main+7092> at /usr/local/sbin/smbd

#2 0x674c9 <_start+137> at /usr/local/sbin/smbd

[2009/05/26 12:25:13, 0] lib/fault.c:dump_core(231)

dumping core in /var/log/samba/cores/smbd

файл /var/log/samba/log.nmbd

[2009/05/26 12:13:31, 0] nmbd/nmbd.c:main(850)

nmbd version 3.3.3 started.

Copyright Andrew Tridgell and the Samba Team 1992-2009

[2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(337)

become_domain_master_browser_wins:

Attempting to become domain master browser on workgroup WORKGROUP, subnet UNICAST_SUBNET.

[2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(351)

become_domain_master_browser_wins: querying WINS server from IP 192.168.1.107 for domain master browser name WORKGROUP<1b> on workgrou

p WORKGROUP

[2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)

*****

Samba server SERG is now a domain master browser for workgroup WORKGROUP on subnet UNICAST_SUBNET

*****

[2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(292)

become_domain_master_browser_bcast:

Attempting to become domain master browser on workgroup WORKGROUP on subnet 192.168.1.107

[2009/05/26 12:13:31, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(305)

become_domain_master_browser_bcast: querying subnet 192.168.1.107 for domain master browser on workgroup WORKGROUP

[2009/05/26 12:13:32, 0] nmbd/nmbd.c:main(850)

nmbd version 3.3.3 started.

Copyright Andrew Tridgell and the Samba Team 1992-2009

[2009/05/26 12:13:32, 0] lib/pidfile.c:pidfile_create(120)

ERROR: nmbd is already running. File /var/run/nmbd.pid exists and process id 608 is running.

[2009/05/26 12:13:40, 0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)

*****

Samba server SERG is now a domain master browser for workgroup WORKGROUP on subnet 192.168.1.107

*****

[2009/05/26 12:13:54, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(395)

*****

Samba name server SERG is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.107

Последний раз редактировалось serg8366 Вт 26 май, 2009 1:13 pm, всего редактировалось 3 раз(а).

Ставил SAMBу на несколько компом.
Везде без проблем.
Но тут недавно получил косяк.
1.При перезагрузке компа SAMBA стартует и в памяти порцессы есть.
НО ДОСТУПА по сети к компу нет.В логах ошибка.

Код: Выделить всё

 

# cat log.smbd
[2007/10/30 18:55:33, 0] smbd/server.c:main(944)
  smbd version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2007/10/30 18:55:33, 1] smbd/files.c:file_init(193)
  file_init: Information only: requested 10000 open files, 7388 are available.
[2007/10/30 18:55:34, 0] smbd/server.c:main(944)
  smbd version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2007/10/30 18:55:34, 1] smbd/files.c:file_init(193)
  file_init: Information only: requested 10000 open files, 7388 are available.
[2007/10/30 18:55:34, 0] /usr/ports/net/samba3/work/samba-3.0.26a/source/lib/pidfile.c:pidfile_create(112)
  ERROR: smbd is already running. File /var/run/smbd.pid exists and process id 780 is running.
[2007/10/30 19:02:13, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:02:13, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1088): tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:02:13, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd
[2007/10/30 19:02:13, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:02:13, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1089): tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:02:13, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd
[2007/10/30 19:02:13, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:02:13, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1090): tdb_reopen_all failed.
[2007/10/30 19:02:13, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:02:13, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd
[2007/10/30 19:02:14, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:02:14, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:02:14, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1092): tdb_reopen_all failed.
[2007/10/30 19:02:14, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:02:14, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd
[2007/10/30 19:05:32, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:05:32, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:05:32, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1117): tdb_reopen_all failed.
[2007/10/30 19:05:32, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:05:32, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd
[2007/10/30 19:05:33, 0] lib/util_tdb.c:tdb_log(662)
  tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory)
[2007/10/30 19:05:33, 0] smbd/server.c:open_sockets_smbd(572)
  tdb_reopen_all failed.
[2007/10/30 19:05:33, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 1118): tdb_reopen_all failed.
[2007/10/30 19:05:33, 0] lib/util.c:log_stack_trace(1786)
  unable to produce a stack trace on this platform
[2007/10/30 19:05:33, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd

Код: Выделить всё

# cat log.nmbd
[2007/10/30 18:55:33, 0] nmbd/nmbd.c:main(697)
  Netbios nameserver version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2007/10/30 18:55:34, 0] nmbd/nmbd.c:main(697)
  Netbios nameserver version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2007/10/30 18:55:34, 0] /usr/ports/net/samba3/work/samba-3.0.26a/source/lib/pidfile.c:pidfile_create(112)
  ERROR: nmbd is already running. File /var/run/nmbd.pid exists and process id 776 is running.
[2007/10/30 19:01:18, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
  *****

  Samba name server PROXY is now a local master browser for workgroup VIPAUTO on subnet 192.168.0.1

  *****
[2007/10/30 19:01:18, 0] nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name VIPAUTO<1b> for the workgroup VIPAUTO.
  Unable to sync browse lists in this workgroup.

Если перегрузить самбу не перегружая комп то ошибок нет

Код: Выделить всё

# ./samba restart
rinetd_enable: not found
Performing sanity check on Samba configuration: OK
Stopping smbd.
Waiting for PIDS: 780.
Stopping nmbd.
Waiting for PIDS: 776.
Removing stale Samba tdb files: . done
Starting nmbd.
Starting smbd.
# cat log.smbd
[2007/10/30 19:09:00, 0] smbd/server.c:main(944)
  smbd version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007
[2007/10/30 19:09:00, 1] smbd/files.c:file_init(193)
  file_init: Information only: requested 10000 open files, 7388 are available.
# cat log.nmbd
[2007/10/30 19:09:00, 0] nmbd/nmbd.c:main(697)
  Netbios nameserver version 3.0.26a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2007

  • #1

Hi,

I updated my TrueNas system to 12.0-U6.1 today and my SMB Shares are not visible on my windows machines anymore.

My SMB configuration looks like this

SMB.png

My Share configuration looks like this

Share.png

I think I was on previously on version 12.0-U6. The Share was working fine on that version.

Code:

testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        restrict anonymous = 2
        server role = standalone server
        server string = FreeNAS Server
        unix extensions = No
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[public]
        ea support = No
        kernel share modes = No
        path = /mnt/Cloud/public
        posix locking = No
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true

I saw on another thread that «wide links» was not supported anymore. I previously had that in my SMB configuration, but my SMB shares are not working even when I remove them.

What do I need to change to get this working again?

Samuel Tai


  • #2

What errors do you see in /var/log/samba4/log.smbd? In all likelihood, the problem is your Aux parameter follow symlinks = yes.

anodos


  • #3

Can you perhaps PM me a debug?

  • #4

What errors do you see in /var/log/samba4/log.smbd? In all likelihood, the problem is your Aux parameter follow symlinks = yes.

I don’t see any errors other than

Code:

ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1188 is running.

I tried removing follow symlinks = yes and restarting the service from the UI. Doesn’t seem to help. I can maybe restart both machines to check if you think that might help.

  • #5

I just realized that \<ip-address>share works whereas \<netbiosname>share doesn’t.

I had removed «wide links» from the SMB configuration. Everything else remaining the same. I kept the follow symlinks = yes

How can I get it working with the NetBios Name?

Samuel Tai


  • #6

Do you have DNS servers and WS Discovery configured under Network->Global Configuration? Do you have SMB1 enabled?

On the workstation, do you have both Function Discovery services running? Also is the DNS cache service running on the workstation?

Last edited: Nov 12, 2021

  • #7

Do you have DNS servers and WS Discovery configured under Network->Global Configuration? Do you have SMB1 enabled?

On the workstation, do you have both Function Discovery services running? Also is the DNS cache service running on the workstation?

I checked these info from the other thread’s post

DNS Server filled and WS Discovery enabled. No SMB1
Both Function Discovery services running in the Windows machine

I don’t see a DNS cache service in my Windows list though, not sure where to find that.

Samuel Tai


  • #8

I don’t see a DNS cache service in my Windows list though, not sure where to find that.

It’s called DNS Client in the Services control panel:

1636773767756.png

Samuel Tai


  • #10

What DNS servers are you using on both the server and the desktop?

  • #11

A local address: 192.168.1.5.
Its a machine running Unbound. I haven’t changed any of this in ages.

Samuel Tai


  • #12

Is your server named differently from the NetBIOS name? I see from the screencap above you’re using Cloud as the NetBIOS name. Is that different from the server DNS name?

  • #13

Is your server named differently from the NetBIOS name? I see from the screencap above you’re using Cloud as the NetBIOS name. Is that different from the server DNS name?

NetBIOS name is Cloud. Server Hostname is Cloud.lan

  • #14

I just realized that \<ip-address>share works whereas \<netbiosname>share doesn’t.

I had removed «wide links» from the SMB configuration. Everything else remaining the same. I kept the follow symlinks = yes

How can I get it working with the NetBios Name?

As a Mac user I have this problem every time I reboot TrueNas (access via xxx.local name not working).

Can you try to disable mDNS, WS Discovery in Network, global settings (save) and re enable again those 2 options ?
On my Macs machine it works immediately after.

Samuel Tai


  • #15

As a Mac user I have this problem every time I reboot TrueNas (access via xxx.local name not working).

Can you try to disable mDNS, WS Discovery in Network, global settings (save) and re enable again those 2 options ?
On my Macs machine it works immediately after.

Assuming this is the fix, try creating a post-init script under Tasks->Init/Shutdown Scripts to run the following commands:

Code:

midclt call network.configuration.update '{"service_announcement":{"mdns":false,"wsd":false}}'
midclt call network.configuration.update '{"service_announcement":{"mdns":true,"wsd":true}}'

These will toggle those boxes off and then on.

  • #16

Pulled my hair out on this one, but toggling mDNS and WS-Discovery did the trick. Glad I found this post. Thanks

  • #17

On a reboot wsd is not working again. I have to toggle it before the share is seen. Does this service not startup on a reboot?

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Specialised Support
  • Ubuntu Servers, Cloud and Juju
  • Server Platforms
  • [SOLVED] Samba 4.0.9 samba-tool drs showrepl error Samba not running

  1. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    You can find more options coming with samba-tool by typing

    Code:

    root@dc01:~# samba-tool domain -h
    Usage: samba-tool domain <subcommand>
    
    Domain management.
    
    
    Options:
      -h, --help  show this help message and exit
    
    
    Available subcommands:
      classicupgrade    - Upgrade from Samba classic (NT4-like) database to Samba AD DC database.
      dcpromo           - Promote an existing domain member or NT4 PDC to an AD DC.
      demote            - Demote ourselves from the role of Domain Controller.
      exportkeytab      - Dump Kerberos keys of the domain into a keytab.
      info              - Print basic info about a domain and the DC passed as parameter.
      join              - Join domain as either member or backup domain controller.
      level             - Raise domain and forest function levels.
      passwordsettings  - Set password settings.
      provision         - Provision a domain.
    For more help on a specific subcommand, please type: samba-tool domain <subcommand> (-h|--help)

    I have put the path to samba in

    What ya need my signature for? It’s not like it’s my last will, or something!


  2. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    I don’t know what’s happening here. Is it possible that I have two different versions of samba running at the same time?
    This is from syslog when I try to start samba with:

    Code:

    root@dc02:~# service samba4 start

    Code:

    Sep 27 11:00:03 dc02 samba[3762]: [2013/09/27 11:00:03.382124,  0] ../source4/smbd/server.c:370(binary_smbd_main)
    Sep 27 11:00:03 dc02 samba[3762]:   samba version 4.0.9 started.
    Sep 27 11:00:03 dc02 samba[3762]:   Copyright Andrew Tridgell and the Samba Team 1992-2012
    Sep 27 11:00:04 dc02 samba[3763]: [2013/09/27 11:00:04.523218,  0] ../source4/smbd/server.c:482(binary_smbd_main)
    Sep 27 11:00:04 dc02 samba[3763]:   samba: using 'standard' process model
    Sep 27 11:00:04 dc02 samba[3777]: [2013/09/27 11:00:04.704650,  0] ../source4/smbd/service_stream.c:346(stream_setup_socket)
    Sep 27 11:00:04 dc02 samba[3777]:   Failed to listen on 0.0.0.0:53 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
    Sep 27 11:00:04 dc02 samba[3777]: [2013/09/27 11:00:04.726603,  0] ../source4/dns_server/dns_server.c:616(dns_add_socket)
    Sep 27 11:00:04 dc02 samba[3777]:   Failed to bind to 0.0.0.0:53 TCP - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
    Sep 27 11:00:04 dc02 samba[3777]: [2013/09/27 11:00:04.735648,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
    Sep 27 11:00:04 dc02 samba[3777]:   task_server_terminate: [dns failed to setup interfaces]
    Sep 27 11:00:04 dc02 samba[3763]: [2013/09/27 11:00:04.740293,  0] ../source4/smbd/server.c:211(samba_terminate)
    Sep 27 11:00:04 dc02 samba[3763]:   samba_terminate: dns failed to setup interfaces
    Sep 27 11:00:04 dc02 smbd[3768]: [2013/09/27 11:00:04.861125,  0] ../source3/smbd/server.c:1281(main)
    Sep 27 11:00:04 dc02 smbd[3768]:   standard input is not a socket, assuming -D option
    Sep 27 11:00:04 dc02 smbd[3768]: [2013/09/27 11:00:04.867658,  0] ../lib/util/pidfile.c:110(pidfile_create)
    Sep 27 11:00:04 dc02 smbd[3768]:   ERROR: smbd is already running. File /usr/local/samba/var/run/smbd.pid exists and process id 1024 is running.
    Sep 27 11:00:04 dc02 samba[3764]: [2013/09/27 11:00:04.871023,  0] ../file_server/file_server.c:48(file_server_smbd_done)
    Sep 27 11:00:04 dc02 samba[3764]:   file_server smbd daemon exited normally
    Sep 27 11:00:04 dc02 samba[3764]: [2013/09/27 11:00:04.872197,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
    Sep 27 11:00:04 dc02 samba[3764]:   task_server_terminate: [smbd child process exited]

    Code:

    root@dc02:~# samba -V
    Version 4.0.9
    root@dc02:~# smbclient -V
    Version 4.0.9

    I need help here.

    What ya need my signature for? It’s not like it’s my last will, or something!


  3. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    Another strange thing in, IMO, is that testparm and samba-tool testparm gives different results.

    Code:

    root@dc02:/# testparm
    Load smb config files from /usr/local/samba/etc/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    Processing section "[netlogon]"
    Processing section "[sysvol]"
    Loaded services file OK.
    Server role: ROLE_ACTIVE_DIRECTORY_DC
    Press enter to see a dump of your service definitions
    
    [global]
        workgroup = JOBBFABRIKEN
        realm = jobbfabriken.lan
        server role = active directory domain controller
        passdb backend = samba_dsdb
        rpc_server:tcpip = no
        rpc_daemon:spoolssd = embedded
        rpc_server:spoolss = embedded
        rpc_server:winreg = embedded
        rpc_server:ntsvcs = embedded
        rpc_server:eventlog = embedded
        rpc_server:srvsvc = embedded
        rpc_server:svcctl = embedded
        rpc_server:default = external
        idmap config * : backend = tdb
        map archive = No
        map readonly = no
        store dos attributes = Yes
        vfs objects = dfs_samba4, acl_xattr
    
    [netlogon]
        path = /usr/local/samba/var/locks/sysvol/jobbfabriken.lan/scripts
        read only = No
    
    [sysvol]
        path = /usr/local/samba/var/locks/sysvol
        read only = No

    Code:

    root@dc02:/# samba-tool testparm
    Press enter to see a dump of your service definitions
    
    # Global parameters
    [global]
        workgroup = JOBBFABRIKEN
        realm = jobbfabriken.lan
        netbios name = DC02
        server role = active directory domain controller
    
    [netlogon]
        path = /usr/local/samba/var/locks/sysvol/jobbfabriken.lan/scripts
        read only = No
    
    [sysvol]
        path = /usr/local/samba/var/locks/sysvol
        read only = No

    What ya need my signature for? It’s not like it’s my last will, or something!


  4. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    samba-tool is designed for AD DC use. Testparm, smbpasswd, etc are made for the smbd daemon.


  5. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    Quote Originally Posted by lingpanda
    View Post

    samba-tool is designed for AD DC use. Testparm, smbpasswd, etc are made for the smbd daemon.

    Does that mean that I have the older samba version installed? I did

    Code:

    apt-get remove --purge samba

    and

    Code:

    apt-get remove --purge samba4

    but no installation of samba from the repos was present.
    I installed samba 4.0.9 from source.
    But I upgraded samba from 4.0.6 to 4.0.9, but then again that shouldn’t create duplicates of samba and absolutly not create smbd.

    What ya need my signature for? It’s not like it’s my last will, or something!


  6. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    Samba3 comes preinstalled with Ubuntu as far as I know. When you use «testparm» you are calling Samba3. With «samba-tool testparm» you are calling Samba4.


  7. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    Thank you lingpanda for your answers, but I stil need help with the initial questions. Based on the info I provided you, what could be wrong with my installation? Why doesn’t samba start but at the same time report status «started»?

    What ya need my signature for? It’s not like it’s my last will, or something!


  8. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    Quote Originally Posted by JnPson
    View Post

    Thank you lingpanda for your answers, but I stil need help with the initial questions. Based on the info I provided you, what could be wrong with my installation? Why doesn’t samba start but at the same time report status «started»?

    I don’t know why it wont start. But we can try a few things.

    Code:

    # killall samba
    # /usr/local/samba/sbin/samba
    # service samba4 status

    Is it running?


  9. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    I will do this first thing in the morning when I get to work. Thank you!

    What ya need my signature for? It’s not like it’s my last will, or something!


  10. Re: Samba 4.0.9 samba-tool drs showrepl error Samba not running

    I did as you suggested but no samba service was running. I got tired of this problem so I started a new fresh install of ubuntu and samba 4.0.9.

    Thank you.

    What ya need my signature for? It’s not like it’s my last will, or something!


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

Hello

Recently I have bought myself a pogplug, hung a USB-drive on it and installed Samba on the plug. So far so good. However, when i try to copy large files (over 4 GB) on it, Samba crashes and I have to reboot my pogoplug to get everything working again. The pogoplug runs a buzybox-version of linux.

After looking around, I found the samba log-file, with the following error information: (partially)

[2013/04/19 23:47:14, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:47:33, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:47:58, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:49:32, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:52:04, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:53:03, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:54:09, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/19 23:59:49, 0] source/smbd/oplock_linux.c:linux_init_kernel_oplocks(287)
Failed to setup RT_SIGNAL_LEASE handler
[2013/04/20 00:08:49, 0]

This error shows up twice in the log:
ERROR: smbd is already running. File /opt/var/samba/smbd.pid exists and process id 958 is running.

My question:
What could be the cause of this oplock error? Is there something i can do in my smb.conf to prevent this from happening?

I am a complete linux newbie, so bare with me i’m asking something stupid or whatever.

Thanks in advance!
Thomas

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

12.4. The Fault Tree

The fault tree presented in this section is for diagnosing and fixing problems that occur when you’re installing and reconfiguring Samba. Before you set out to troubleshoot any part of the Samba suite, you should know the following information:

  • Your client IP address (we use 192.168.236.10)

  • Your server IP address (we use 192.168.236.86)

  • The netmask for your network (typically 255.255.255.0)

  • Whether the systems are all on the same subnet (our example systems are)

For clarity, we’ve renamed the server in the following examples to server.example.com, and the client system to client.example.com.

12.4.1. How to Use the Fault Tree

Start the tests here, without skipping forward; it won’t take long (about five minutes) and might actually save you time backtracking. Whenever a test succeeds, you will be given a name of a section to which you can safely skip.

12.4.2. Troubleshooting Low-Level IP

The first series of tests is that of the low-level services that Samba needs to run. The tests in this section verify that:

  • The IP software works

  • The Ethernet hardware works

  • Basic name service is in place

Subsequent sections add the Samba daemons smbd and nmbd, host-based access control, authentication and per-user access control, file services, and browsing. The tests are described in considerable detail to make them understandable by both technically oriented end users and experienced systems and network administrators.

Beware of firewalls! The Windows XP SP2 firewall will disable the host from answering basic network requests such as ping. For these tests, consider disabling any firewall settings on both the client and server if possible.

12.4.2.1. Testing the networking software with ping

The first command to enter on both the server and the client is ping 127.0.0.1. This tries to send data to the loopback address and indicates whether any networking support is functioning. On both Windows and Unix, you can run ping 127.0.0.1 from a command shell and usually interrupt it after a few lines. Here is an example on a Linux server:

 $ ping 127.0.0.1 PING localhost: 56 data bytes 64 bytes from localhost (127.0.0.1): icmp-seq=0. time=1. ms 64 bytes from localhost (127.0.0.1): icmp-seq=1. time=0. ms 64 bytes from localhost (127.0.0.1): icmp-seq=2. time=1. ms ^C ----127.0.0.1 PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/1 

Some versions of ping let you set a limit on how many times it makes the round trip, so you don’t have manually interrupt the command. For instance, on Linux you could enter ping -c5 to stop automatically after five transmissions.

If you get ping: no answer from _ ._ ._ ._ or 100% packet loss, you have no IP networking installed on the system. The address 127.0.0.1 is the internal loopback address and doesn’t depend on the computer being physically connected to a network. If this test fails, you have a local problem. TCP/IP isn’t installed, it’s misconfigured, or a firewall might be preventing ICMP packets. See your operating system documentation if it’s a Unix server. If it’s a Windows client, follow the instructions in Chapter 3 to install networking support.

If you’re the network manager, some good references are TCP/IP Network Administration, by Craig Hunt, and Windows Server 2003 Network Administration, by Craig Hunt and Roberta Bragg, both published by O’Reilly. An excellent resource for understanding the TCP/IP protocol suite is Richard Stevens’ TCP/IP Illustrated, Vol. 1 (Addison-Wesley).

12.4.2.2. Testing local name services with ping

Next, try to ping localhost from a shell on the Samba server. The name localhost is the conventional hostname for the 127.0.0.1 loopback interface, and it should resolve to that address. After typing ping localhost, you should see output similar to the following:

 $  ping localhost PING localhost: 56 data bytes  64 bytes from localhost (127.0.0.1): icmp-seq=0. time=0. ms    64 bytes from localhost (127.0.0.1): icmp-seq=1. time=0. ms    64 bytes from localhost (127.0.0.1): icmp-seq=2. time=0. ms    ^C 

If this succeeds, try the same test on the client. Otherwise:

  • If you get unknown host: localhost, there is a problem resolving the hostname localhost to a valid IP address. (This might be as simple as a missing entry in a local hosts file.) From here, skip down to the section «Troubleshooting Name Services» later in this chapter.

  • If you get «ping: no answer,» or «100% packet loss,» but pinging 127.0.0.1 worked, name services is resolving to an incorrect address. Check the file or database (typically /etc/hosts on a Unix system) that the name service is using to resolve addresses to ensure that the entry is correct.

12.4.2.3. Testing the networking hardware with ping

Next, ping the server’s network IP address from itself. This should get you exactly the same results as pinging 127.0.0.1:

 $ ping 192.168.236.86 PING 192.168.236.86: 56 data bytes 64 bytes from 192.168.236.86 (192.168.236.86): icmp-seq=0. time=1. ms 64 bytes from 192.168.236.86 (192.168.236.86): icmp-seq=1. time=0. ms 64 bytes from 192.168.236.86 (192.168.236.86): icmp-seq=2. time=1. ms ^C ----192.168.236.86 PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/1 

If this test works on the server, repeat it for the client. Otherwise:

  • If ping network_ip fails on either the server or client, but ping 127.0.0.1 works on that system, you have a TCP/IP problem that is specific to the Ethernet network interface card on the computer. Check with the documentation for the network card or host operating system to determine how to configure it correctly. However, be aware that on some operating systems, the ping command appears to work even if the network is disconnected, so this test doesn’t always diagnose all hardware problems.

12.4.2.4. Testing connections with ping

Now, ping the server by name (instead of its IP address)once from the server and once from the client. This is the general test to determine whether your network is working:

 $ ping server PING server.example.com: 56 data bytes 64 bytes from server.example.com (192.168.236. 86): icmp-seq=0. time=1. ms 64 bytes from server.example.com (192.168.236.86): icmp-seq=1. time=0. ms 64 bytes from server.example.com (192.168.236.86): icmp-seq=2. time=1. ms ^C ----server.example.com PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/1 

If successful, this test tells you four things:

  • The hostname (e.g., server) is being found by your local name server.

  • The hostname has been expanded to the full name (e.g., server.example.com).

  • The host’s address is being returned (192.168.236.86).

  • The client and server can successfully send and receive packets to each other.

If this test isn’t successful, one of several things can be wrong with the network:

  • First, if you get ping: no answer, or 100% packet loss, you’re not connecting to the network, the other system isn’t connecting or isn’t responding, or one of the addresses is incorrect. Verify that the server does not have an active firewall preventing it from receiving or replying to ICMP packets. Also check the addresses that the ping command reports on each system, and ensure that they match the ones you set up initially.

  • If the addresses do not match, try entering the command arp -an, and see whether there is an entry for the other system. (The arp command stands for the Address Resolution Protocol. The arp -an command lists all the addresses known on the local system.) Here are some things to try:

    • If you receive a message like 192.168.236.86 at (incomplete), the Ethernet address of 192.168.236.86 is unknown. This message indicates a complete lack of connectivity, and you’re likely having a problem at the very bottom of the TCP/IP protocol stackthe Ethernet interface layer.

    • If you receive a response similar to server (192.168.236.86) at 8:0:20:12:7c:94, the server has been reached at some time, or another system is answering on its behalf. However, this means that ping should have worked: because it hasn’t, you may have an intermittent networking or ARP problem.

    • If the IP address from ARP doesn’t match the address you expected, investigate and correct the addresses manually.

    • If each system can ping itself but not another, something is wrong on the network between them.

  • If you get ping: network unreachable or ICMP Host Unreachable, you’re not receiving an answer, and more than one network is probably involved.

    It is much simpler to deal with hosts on the same subnet. However, networking, like life, is not always ideal. At this point, it is time to rely on your (or a good friend’s) TCP/IP administration skills. Check the default gateway settings on the host and verify that the router IP address is correct. Then try to ping the gateway. If this fails, go through the troubleshooting steps for failing to ping the server from the client or vice versa. This failure is at the network layer. If you can ping the router, but not the host on the other side of it, use the gateway’s documentation to verify that packets are successfully being routed from one network to the other.

    If possible though, try to test a server and client that are on the same network:

    1. First, perform the tests for ping: no answer described earlier in this section. If these don’t help you identify the problem, the remaining possibilities are that an address is wrong, your netmask is wrong, a network is down, or the packets have been stopped by a firewall.

    2. Check both the address and the netmasks on source and destination systems to see whether something is obviously wrong. Assuming that both systems really are on the same network, they both should have the same netmasks, and ping should report the correct addresses. If the addresses are wrong, you’ll need to correct them. If they are correct, the programs might be confused by an incorrect netmask. See the section «Netmasks» later in this chapter.

    3. If the commands are still reporting that the network is unreachable and neither of the previous two conditions are in error, one network really might be unreachable from the other. This is a general networking issue; if you have a separate network manager at your site, he or she may have to investigate. This, too, is an issue for the network manager.

  • If you get ICMP Administratively Prohibited, you’ve struck a firewall of some sort or a misconfigured router. Again, if you have a separate network manager at your site, that person may have to investigate.

  • If you get ICMP Host redirect but ping reports that packets are getting through, this is generally harmless: you’re simply being rerouted over the network.

  • If you get a host redirect and no ping responses, you are being redirected, but no one is responding. Treat this situation just like the Network unreachable response, and check your addresses and netmasks.

  • If you get ICMP Host Unreachable from gateway hostname, ping packets are being routed to another network, but the other system isn’t responding and the router is reporting the problem on its behalf. Again, treat this like a Network unreachable response, and start checking addresses and netmasks.

  • If you get ping: unknown host hostname, your system’s name is not known. This tends to indicate a name service problem, which didn’t affect localhost. Have a look at «Troubleshooting Name Services,» later in this chapter.

  • If you get partial successwith some pings failing but others succeedingyou have either an intermittent problem between the systems or an overloaded network. Ping a bit longer, and see whether more than about 3 percent of the packets fail. If so, take the necessary steps to reduce the network problem or contact a network manager if that role is fulfilled by someone other than you. However, if only a few fail, or if you happen to know some massive network program is running, don’t worry. The TCP/IP suite of protocols is able to compensate for the occasional lost packets.

  • If you get a response such as smtsvr.antares.net is alive when you actually pinged server.example.com, either you’re using someone else’s address or the system has multiple names and addresses. If the address is wrong, the name service is clearly the culprit; you’ll need to change the address in the name service database to refer to the correct system. This is discussed in «Troubleshooting Name Services,» later in this chapter.

    Servers are often multihomedi.e., connected to more than one network, with different names on each net. If you are getting a response from an unexpected name on a multihomed server, look at the address and see whether it’s on your network (see the section «Netmasks» later in this chapter). If so, you should use that address, rather than one on a different network, for both performance and reliability reasons.

    Servers can also have multiple names for a single Ethernet address, especially if they are web servers. This is harmless, albeit startling. You should probably use the official (and permanent) name, rather than an alias that might change.

  • If everything works but the IP address reported is 127.0.0.1, you have a name service error. This error typically occurs when an operating system installation program generates an /etc/hosts line similar to 127.0.0.1 localhost hostname.domainname. The localhost line should say something similar to 127.0.0.1 localhost or 127.0.0.1 localhost.localdomain. Correct it, lest it cause failures in the negotiations over who is the master browse list holder and who is the master browser. It can also cause hard-to-diagnose errors in later tests.

If this command works from the server, repeat it from the client.

12.4.3. Troubleshooting Server Daemons

Once you’ve confirmed that basic networking is working properly, the next step is to make sure that the daemons are running on the server. This determination takes three separate tests, because no single one of the following tests can decisively prove that everything is functioning properly.

To be sure that the daemons are running, you need to find out whether they:

  1. Have started

  2. Are registered or bound to a TCP/IP port by the operating system

  3. Are actually listening for incoming connections

12.4.3.1. Tracking daemon startup

First, check the Samba logs. If you’ve started the daemons, the message smbd version release started should appear. If it doesn’t, you need to restart the Samba daemons.

If the daemon reports that it has indeed started, look out for bind failed on port XXX socket_addr=0 (Address already in use). This means another daemon has been started on port 139 or 445 (smbd). Also, nmbd will report a similar failure if it cannot bind to port 137 or 138. Either you’ve started a daemon twice, or the inetd server has tried to provide a daemon for you.[*] If it’s the latter, we’ll diagnose that in a moment.

[*] We use the name inetd for the TCP/IP metadaemon or superserver that runs on many Unix and Linux servers; the actual command is usually either inetd or the newer xinetd.

Another useful trick for locating a startup failure is to start the failing service from the command line and monitor its progress. All Samba daemons support the -i command-line option for just such a purpose. Combined with a high debug level dumping to standard output, this option should help you to locate the exact point of startup. The following example illustrates the message displayed when you try to launch smbd when a previous instance was still running:

 $ smbd -d 10 -i .... ERROR: smbd is already running. File /var/run/smbd.pid exists    and process id 31654 is running. talloc report on 'null_context' (total 453 bytes in 73 blocks)         lp_talloc      contains      453 bytes in    72 blocks 

From here, you can check the process listing to verify whether the existing process is in fact smbd. It is possible that a previous instance of smbd has exited but not cleaned up its pid file, and that another process exists with that same pid. Use the ps command on the server with the «long» option for your system type (commonly ps ax or ps -ef), and see whether smbd and nmbd are already running. This often looks like the following:

 $ ps ax | grep mbd 31654 ?           Ss      0:00 smbd -D -d3 31656 ?           Ss      0:02 nmbd -D -d3 31657 ?           S      0:00 smbd -D -d3 

This example illustrates that smbd and nmbd have already started as standalone daemons (the -D option) at log level 3 (-d3).

12.4.3.2. Looking for daemons bound to ports

Both smbd and nmbd have to register with the operating system so that they can get access to the necessary TCP/IP ports. The netstat command will tell you if this has been done. Run the command netstat -a on the server, and look for lines mentioning netbios-ns (137/udp), netbios-dgm (138/udp), netbios-ssn (139/tcp), or microsoft-ds (445/tcp):

 $ netstat -an | egrep ':(137|138|139|445)' tcp           0      0 *:139            *:*        LISTEN tcp           0      0 *:445            *:*        LISTEN udp           0      0 *:137            *:* udp           0      0 *:138            *:* 

Although you may see additional lines listed, there should be at least two UDP lines, one for the NetBIOS name service port (137) and one for the NetBIOS datagram service (138), indicating that the nmbd server is registered and (we hope) is waiting to answer requests. There should also be at least one TCP line for each of the values of the smb ports parameter in smb.conf. The default value includes both ports 139 and 445, so frequently you will see a TCP line for each one. Additionally, these ports should be in the LISTEN state. This means that smbd is up and waiting to accept connections.

There might be other TCP lines indicating connections from smbd to clients, one for each client. These are usually in the ESTABLISHED state. If there are smbd lines in the ESTABLISHED state, smbd is definitely running. If there is only one line in the LISTEN state, you can’t be sure yet. If both of the lines are missing, a daemon has not succeeded in starting, so it’s time to check the logs, and then go back to Chapter 2.

If there is a line for each client, it might be coming either from a Samba daemon or from the meta-daemon, inetd. It’s quite possible that your inetd startup file contains lines that start Samba daemons without your realizing it; for instance, although such behavior is becoming increasingly rare, the lines might have been placed there if you installed Samba as part of a Linux distribution. The daemons started by inetd prevent ours from running. This problem typically produces log messages such as bind failed on port XXX socket addr=0 (Address already in use).

Check your /etc/inetd.conf file or /etc/xinetd.d/ directory; unless you’re intentionally starting the daemons from there, any servers bound to the netbios-* or microsoft-ds ports should be disabled. Refer to Chapter 2 for details concerning Samba and inetd.

12.4.3.3. Checking smbd with telnet

The easiest way to test that the smbd server is actually working is to send it a meaningless message and see if it is rejected. Try something such as the following:

 $ echo "hello" | telnet localhost 139 Trying Trying 192.168.236.86 ... Connected to server. Escape character is '^]'. Connection closed by foreign host. 

This command sends an erroneous but harmless message to smbd. If you get a Connected message followed by a Connection closed message, the test was a success. You have an smbd daemon listening on the port and rejecting improper connection messages. On the other hand, if you get telnet: connect: Connection refused, most likely no daemon is present. A less likely explanation is that you have attempted to connect to the wrong port. Remember that the ports used by smbd are controlled by the smb ports option. Make sure you use one of these ports. If all else fails, check the logs and go back to Chapter 2.

Regrettably, there isn’t an easy test for nmbd. If the telnet test and the netstat test both say that an smbd is running, there is a good chance that netstat will also be correct about nmbd running. nmbd is tested further later in this chapter when we troubleshoot network browsing problems.

12.4.3.4. Testing daemons with testparm

Once you know there’s a daemon, you should always run testparm, in hopes of getting something such as the following:

 $ testparm Load smb config files from /usr/local/samba/lib/smb.conf Processing section "[homes]" Processing section "[printers]" ... Processing section "[tmp]" Loaded services file OK. ... 

The testparm program normally reports the processing of a series of sections and responds with Loaded services file OK if it succeeds. If there is something wrong with the file, testparm reports one or more of the following messages, which also appear in the logs as noted:

WARNING: You have some share names that are longer than 12 characters.

This error is for anyone using Windows Me and older clients. They fail to connect to shares with long names.

WARNING: [ name] service MUST be printable!

A printer share lacks a print ok = yes option.

WARNING: No path in service name — making it unavailable!

Current versions of Samba disable any service other than [homes] that does not have an explicit path set.

NOTE: name is flagged unavailable

Just a reminder that you have used the available = no option in a share.

Can’t find include file [name]

A configuration file referred to by an include option did not exist. If you were including the file unconditionally, this is an error and probably a serious one: the share will not have the configuration you intended. If you were including it based on one of the % variables, such as %a (architecture), you must decide whether, for example, a missing Windows XP configuration file is a problem. It often isn’t.

Can’t copy service name, unable to copy to itself.

You tried to copy an smb.conf section into itself.

Unable to copy servicesource not found: [name]

Indicates a missing or misspelled section in a copy = option.

Ignoring unknown parameter name.

Typically indicates an obsolete, misspelled, or unsupported option.

Global parameter name found in service section.

Indicates that a global-only parameter has been used in an individual share. Samba ignores the parameter.

After the first testparm test, repeat it with (exactly) three parameters: the name of your smb.conf file, the name of your client, and its IP address:

 $ testparm /usr/local/samba/lib/smb.conf client 192.168.236.10 

This command runs one more test that checks the hostname and address against hosts allow and hosts deny options and might produce the Allow connection from hostname to service and/or Deny connection from hostname to service messages for the client system. These messages indicate that you have hosts allow and/or hosts deny options in your smb.conf, and they prohibit access from the client system.

12.4.4. Troubleshooting SMB Connections

Now that you know the servers are up, you need to make that sure they’re running properly. Start by placing a simple smb.conf file in the /usr/local/samba/lib directory.

12.4.4.1. A minimal smb.conf file

In the following tests, we assume that you have a [temp] share suitable for testing, plus at least one valid user account (we’ll use one named rose). An smb.conf file that includes just these is as follows:

 [global]     workgroup = EXAMPLE     security = user [homes]     read only = no [temp]     path = /data/tmp     read only = no 

12.4.4.2. Testing locally with smbclient

The first test ensures that the server can list its own services (shares). Run the command smbclient -L localhost -N to anonymously connect to the server from itself. You should see the following:

 $ smbclient -L localhost -N Anonymous login successful Domain=[EXAMPLE] OS=[Unix] Server=[Samba 3.0.22]]     Sharename       Type         Comment     ---------       -----     ----------     temp           Disk     homes           Disk     IPC$           IPC         IPC Service (Samba 3.0.22) ... 

If you received this output or something similar, move on to the next section, «Testing connections with smbclient.» On the other hand, if you receive an error, check the following:

  • If you get Connection to localhost failed, either you’ve spelled its name wrong or there actually is a problem (which should have been seen back in «Testing local name services with ping»). In the latter case, move on to the section «Troubleshooting Name Services,» later in this chapter.

  • If you get Error connecting to xxx.xxx.xx.xx (Connection refused), the server was found, but it wasn’t running an smbd daemon. Skip back to «Troubleshooting Server Daemons,» earlier in this chapter, and retest the daemons.

  • If you’re using inetd (or xinetd) instead of standalone daemons, be sure to check your /etc/ inetd.conf (or xinetd configuration files) and /etc/services entries against their manpages for errors as well.

  • If you get the message NT_STATUS_ACCESS_DENIED, you aren’t permitted access to the server. This could mean you have a hosts allow option that doesn’t include the server or a hosts deny option that does. Recheck with the command testparm smb.conf your_hostname your_ip_address (see the section «Testing daemons with testparm»), and correct any unintended prohibitions. The error could also be caused by a restrict anonymous setting in smb.conf.

12.4.4.3. Testing connections with smbclient

Run the command smbclient //server/temp to connect to the server’s [temp] share and to see if you can connect to a file service. We assume that a valid account for the user named rose has already been created. You should get the following response:

 $ smbclient //server/temp -U rose Password: <enter password> Domain=[EXAMPLE] OS=[Unix] Server=[Samba 3.0.22] smb: > quit 

If you get Get_Hostbyname: Unknown host name or Connect error: Connection refused, see the previous section, «Testing locally with smbclient,» for the possible diagnoses.

Now, at the Password: prompt, provide the password for the account given as the -U argument value. If you then get an smb: > prompt, the connection works. Enter quit and continue on to the next section, «Testing connections with net use.»

A response of NT_STATUS_LOGON_FAILURE indicates either that you are using an invalid account name or that the password you used didn’t match the credentials for the account. It is a good idea to verify that the account exists by running pdbedit —verboserose.

An error message referring to NT_STATUS_BAD_NETWORK_NAME can be caused by any one of the following:

  • A wrong share name: you might have spelled it wrong, it might be too long, it might be in mixed case, or it might not be available. Check that it’s what you expect with testparm (see the earlier section, «Testing daemons with testparm»).

  • An invalid users or valid users option in your smb.conf file that doesn’t allow your account to connect. Recheck using testparm smb.conf your_hostname your_ip_address (see the earlier section, «Testing daemons with testparm»).

  • A valid hosts option that doesn’t include the server, or an invalid hosts option that does. Also test this with testparm.

  • There is one more reason for this failure that has nothing at all to do with passwords: the path parameter in your smb.conf file might point somewhere that doesn’t exist. This will not be diagnosed by testparm. You will have to check it manually.

Once you have connected to [temp] successfully, repeat the test, this time logging in to your home directory (e.g., connect to the network path //server/rose). If you have to change anything to get that to work, retest [temp] again afterward.

12.4.4.4. Testing connections with net use

Run the following command on the Windows client to see whether it can connect to the server:

 C:> net use * \servertemp /user:rose 

You should be prompted for a password whether or not the password for rose on the Samba server is different than the one you used to logon to the Windows console. Once the correct password has been transmitted, you should see the response:

 The command was completed successfully. 

If that worked, congratulations! You have completed all of these tests successfully, and your server should be ready to accept connections from users. Otherwise:

  • If you get The specified shared directory cannot be found, or Cannot locate specified share name, the directory name is either misspelled or not in the smb.conf file.

  • If you get The computer name specified in the network path cannot be located or Cannot locate specified computer, the directory name has been misspelled, the name service has failed, there is a networking problem, or the hosts deny option includes your host.

    • If it is not a spelling mistake, you need to double back at least to the section «Testing connections with smbclient» to investigate why it doesn’t connect.

    • If smbclient does work, there is a name service problem with the client name service, and you need to proceed to the section «Testing the server with nmblookup» and see whether you can look up both the client and server with nmblookup.

  • If you get The password is invalid for \servertemp, verify that you are using the correct credentials. If you provide your password again and it still fails, your password is not being matched on the server, or possibly the configuration file has a valid users or invalid users list denying you permission.

  • You might have the NetBEUI protocol bound to the Microsoft client. This often produces long timeouts and erratic failures and is known to have caused failures to accept passwords in the past. Unless you absolutely need the NetBEUI protocol, remove it.

Понравилась статья? Поделить с друзьями:
  • Error skipping startup message your shell is probably incompatible with the application bash is recommended
  • Error skip перевод
  • Error site is being upgraded please retry later
  • Error site default ssl does not exist
  • Error signing certificate verify