Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37400 - Amanda won't contact smb clients
Summary: Amanda won't contact smb clients
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-06 09:06 UTC by Lindsay Haisley
Modified: 2004-01-07 00:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lindsay Haisley 2004-01-06 09:06:09 UTC
I'm having enough difficulty with this that I'm going to report it as a bug even 
though it may be a config ussue (it SHOULDN"T be this hard!).

# emerge -s amanda

*  app-admin/amanda
      Latest version available: 2.4.4-r2
      Latest version installed: 2.4.4-r2
      Size of downloaded files: 1,192 kB
      Homepage:    http://www.amanda.org/
      Description: The Advanced Maryland Automatic Network Disk Archiver

# emerge -s samba

*  net-fs/samba
      Latest version available: 2.2.8a
      Latest version installed: 2.2.8a
      Size of downloaded files: 4,466 kB
      Homepage:    http://www.samba.org
      Description: SAMBA is a suite of SMB and CIFS client/server programs for UNIX

Amanda works as expected for Linux clients, but won't contact a Windows PC.  
I have another amanda server from which I'm migrating (Debian sarge) and it works OK.  I've copied over all the configuration files, with appropriate 
modifications for the new amanda server (including /etc/amandapass).

$ amcheck -c Humbug

Amanda Backup Client Hosts Check
--------------------------------
WARNING: vishnu.fmp.com: selfcheck request timed out.  Host down?
Client check: 1 host checked in 30.000 seconds, 1 problem found

(brought to you by Amanda 2.4.4)

Smbclient works properly for a login (smbclient //Humbug/c g00ber -U fmouse) and
displays files.

tcpdump shows no traffic, so it looks like amanda isn't even trying.

I've tried compiling amanda from source manually and installing it, but no
luck.

I have to get this fixed, so I'll be happy to try any experiements any of the developers want me to.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-06 12:13:06 UTC
could you please post your emerge info and attach your amanda config files (with passwords and other personal details you may have in them removed)?
Comment 2 Lindsay Haisley 2004-01-06 16:02:33 UTC
Gladly!

I've tried backing down the samba version to a level of 2.2.8a, which is the
latest stable level, I believe, but it doesn't help.  I also set the target
Windows system netbios names in /etc/samba/lmhosts to no avail.  Relevant 
points, in summary:

*  The same amanda/samba config works on a parallel Debian box from which the
   amanda and samba configs were taken and re-locallized.

*  Amanda works OK to back up other Linux boxes on the LAN.

*  Samba works, and I can browse the amanda server from a Windows box.

*  smbclient works.  I can browse the files on the Win box from
   the Linux amanda host and retrieve them.

*  Tcpdump shows no traffic between the Linux box and the Windows box, even
   though amanda reports that it's unable to contact the Win box.

*  A similar config for amanda to back up my wife's business computer (Win98)
   also fails, although it works on the Debian box from which it was taken.

# emerge info
Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.20-gentoo-r9)
=================================================================
System uname: 2.4.20-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.4.3.10
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=pentium4 -march=pentium4 -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=pentium4 -march=pentium4 -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo ftp://gentoo.noved.org/ http://gentoo.noved.org/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d acl acpi alsa apache2 apm arts avi berkdb bindist bonobo cdr crypt cups curl doc dvd dvdr encode esd evo fastcgi flash foomaticdb gdbm gif gnome gpm gps gstreamer gtk gtk2 gtkhtml guile imap imlib ipv6 java jikes jpeg libg++ libwww mad maildir mcal mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png ppds python quicktime readline samba sasl scanner sdl slang slp snmp spell sse ssl svga tcltk tcpd tetex tiff truetype usb x86 xml xml2 xmms xosd xv zeo zlib"

-------------------------------------------------------------

# cat /etc/amandapass
//humbug/c fmouse%FrozmEE
//humbug/d fmouse%FrozmEE
//humbug/e fmouse%FrozmEE
//humbug/f fmouse%FrozmEE
//humbug/g fmouse%FrozmEE
//humbug/h fmouse%FrozmEE
//sunshine/data cheryl%123123

--------------------------------------------------------

# cat /etc/amanda/Humbug/amanda.conf

# amanda.conf - sample Amanda configuration file.  
#
# If your configuration is called, say, "DailySet1", then this file
# normally goes in /etc/amanda/DailySet1/amanda.conf.
# 
# for explanation of the parameters refer to amanda(8) and
# /usr/doc/amanda/WHATS.NEW.gz 

org "Humbug Backup"     # your organization name for reports
mailto "fmouse-nofilter@fmp.com"        # space separated list of operators at your site
dumpuser "root" # the user to run dumps under
#
inparallel 4            # maximum dumpers that will run in parallel
netusage  3000          # maximum net bandwidth for Amanda, in KB per sec

# a filesystem is due for a full backup once every <dumpcycle> days
dumpcycle 4 weeks       # the number of days in the normal dump cycle
tapecycle 5 tapes       # the number of tapes in rotation

bumpsize 20 MB          # minimum savings (threshold) to bump level 1 -> 2
bumpdays     1          # minimum days at each level
bumpmult     4          # threshold = bumpsize * (level-1)**bumpmult

#runtapes     9         # explained in WHATS.NEW
#tpchanger "no-changer" # the tape-changer glue script, see TAPE.CHANGERS
tapedev "/dev/nst0"     # Linux @ tuck, important: norewinding
# tapedev "/dev/nrst8"  # or use the (no-rewind!) tape device directly

tapetype SEAGATE-STD28000N              # what kind of tape it is (see tapetypes below)
labelstr "^HUMBUG[0-9][0-9]*$"  # label constraint regex: all tapes must match

diskdir "/var/cache/amanda/Humbug"              # where the holding disk is
disksize 3000 MB                        # how much space can we use on it
#diskdir "/dumps/amanda/work"   # additionaly holding disks can be specified
#diskdir "/mnt/disk4"
#disksize 1000 MB               #       they are used round-robin


# Amanda needs a few MB of diskspace for the log and debug files,
# as well as a database.  This stuff can grow large, so the conf directory
# isn't usually appropriate.

infofile "/var/lib/amanda/Humbug/curinfo"       # database filename
logfile  "/var/log/amanda/Humbug/log"   # log filename

# where the index files live
indexdir "/var/lib/amanda/Humbug/index"

# tapetypes
#
# Define the type of tape you use here, and use it in "tapetype" above.
# Some typical types of tapes are included here.  The tapetype tells amanda
# how many MB will fit on the tape, how big the filemarks are, and how
# fast the tape device is.
#
[snip.....]

-----------------------------------------------------------------

# cat /etc/samba/smb.conf  [bunches of comments stripped out]

[global]

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d
   printing = bsd
   printcap name = /etc/printcap
   load printers = yes
   guest account = nobody
   invalid users = root

   security = user
   
   debug level = 1

; Change this for the workgroup your Samba server will part of
workgroup = WORKGROUP

   server string = %h server (Samba %v)
   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
   encrypt passwords = true
   wins support = yes

os level = 65
domain master = yes
local master = yes
preferred master = yes
remote announce = 192.168.1.255

; This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

; Name mangling options

  preserve case = yes
  short preserve case = yes

[homes]
   comment = Home Directories
   guest ok = no

   read only = no

   create mask = 0711

   directory mask = 0700
   map hidden = true
   map system = true


[allsrvr]
        allow hosts = 192.168.1.0/255.255.255.0
        admin users = fmouse
        path = /
        mangle case = yes
        preserve case = yes
        writable = true

[fmpbooks]
        allow hosts = 192.168.1.0/255.255.255.0
        admin users = fmouse
        path = /home/fmouse/FMP-quickbooks
        mangle case = yes
        preserve case = yes
        writable = true

[root]
        browseable = no
        hosts allow = 0.0.0.0


[archive]
        allow hosts = 192.168.1.0/255.255.255.0
        path=/archive
        mangle case = yes
        preserve case = yes
        writable = true
Comment 3 Lindsay Haisley 2004-01-06 16:10:01 UTC
Forgot this one ....

# cat /etc/amanda/Humbug/disklist
vishnu //humbug/c nocomp-user-tar        
vishnu //humbug/d comp-user-tar-pc        
vishnu //humbug/e comp-user-tar-pc        
vishnu //humbug/f comp-user-tar-pc        
vishnu //humbug/g comp-user-tar-pc        
vishnu //humbug/h comp-user-tar-pc        

[vishnu is the hostname of the amanda server]
Comment 4 Lindsay Haisley 2004-01-06 17:25:15 UTC
If I build amanda with debugging turned on I get the following debug from
'amcheck -c Humbug'

amcheck: debug 1 pid 13975 ruid 0 euid 0: start at Tue Jan  6 19:16:04 2004
amcheck: dgram_bind: socket bound to 0.0.0.0.619
amcheck: pid 13975 finish time Tue Jan  6 19:16:34 2004

A subsequent run gives a different port ...

amcheck: debug 1 pid 14003 ruid 0 euid 0: start at Tue Jan  6 19:23:28 2004
amcheck: dgram_bind: socket bound to 0.0.0.0.579
amcheck: pid 14003 finish time Tue Jan  6 19:23:58 2004
Comment 5 Lindsay Haisley 2004-01-06 23:35:40 UTC
OK, here's the skinny on this problem.

By default /etc/xinetd.d/amanda contains:

        # You need to ensure this points to your Amanda server!
        # Don't just remove it!
        only_from       = localhost

amcheck contacts amandad on the local server as the dumpuser, and amandad invokes smtclient to check the requested networked box.  The connection
comes from the server's configured interface address rather than from
'localhost' so unless the only_from directive is set to a proper IP address or
resolvable hostname the connection will fail.

This needs to be made clearer, I would guess.  Amanda is a very complex package
which interacts with several other complex packages.  All in all, there are at 
least half a dozen config files involved, and many places to go off track.  I 
would suggest replacing "localhost" with something which asks to be changed, 
such as "myhost.mydomain".

As far as I'm concerned, this is resolved, but you may want to address this in
/etc/xinetd.d/amanda on the next gentoo revision of amanda.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-07 00:50:10 UTC
open up the amanda ebuild and see the bevy of config env vars for this exact purpose. I created the amanda ebuild to make full use of those env vars so that I could easily install the amanda client on 12 gentoo machines quickly and still keep the setting easily. eg:
AMANDA_SERVER=mytapeserver AMANDA_SERVER_INDEX=myindexserver AMANDA_CONFIG_NAME=DailyResearchNetwork AMANDA_PORTS_TCP=my_custom_port_number_stuff emerge amanda

i've changed the default for that option to be ${HOSTNAME} instead of 'localhost', and bumped the revision.