Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: NAK error with amrecover

  1. #1
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default NAK error with amrecover

    I've read several threads from different places about this error, but I can't seem to solve it. This is my first time trying a recover (I want to document and test it prior to actually needing it) so it's likely I'm just overlooking something simple.

    The server is "themole" which is where I'll be doing recovers to and then moving to the appropriate server(s) manually. All files listed here are located on themole, which is also a client.

    I'm running 2.5.2p1 on 32bit RHEL4
    Code:
    build: VERSION="Amanda-2.5.2p1"
           BUILT_DATE="Wed Jun 6 23:49:41 PDT 2007"
           BUILT_MACH="Linux rhel4-build.zmanda.com 2.6.9-34.EL #1 Fri Feb 24 16:44:51 EST 2006 i686 athlon i386 GNU/Linux"
           CC="gcc"
           CONFIGURE_COMMAND="'./configure' '--build=i386-redhat-linux' '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib/amanda' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/var/lib/amanda' '--localstatedir=/var/lib/amanda' '--libdir=/usr/lib' '--includedir=/usr/include' '--infodir=/usr/info' '--mandir=/usr/share/man' '--with-gnutar=/bin/tar' '--with-gnutar-listdir=/var/lib/amanda/gnutar-lists' '--with-dumperdir=/usr/lib/amanda' '--with-index-server=localhost' '--with-tape-server=localhost' '--with-user=amandabackup' '--with-group=disk' '--with-owner=paddy' '--with-fqdn' '--with-bsd-security' '--with-bsdtcp-security' '--with-bsdudp-security' '--with-ssh-security' '--with-assertions'"
    paths: bindir="/usr/bin" sbindir="/usr/sbin"
           libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
           AMANDA_TMPDIR="/tmp/amanda" AMANDA_DBGDIR="/tmp/amanda"
           CONFIG_DIR="/etc/amanda" DEV_PREFIX="/dev/"
           RDEV_PREFIX="/dev/r" DUMP="/sbin/dump"
           RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF
           XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF
           SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar"
           COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
           LPRCMD="/usr/bin/lpr" MAILER="/usr/bin/Mail"
           listed_incr_dir="/var/lib/amanda/gnutar-lists"
    defs:  DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
           DEFAULT_TAPE_SERVER="localhost" HAVE_MMAP NEED_STRSTR
           HAVE_SYSVSHM LOCKING=POSIX_FCNTL SETPGRP_VOID ASSERTIONS
           DEBUG_CODE AMANDA_DEBUG_DAYS=4 BSD_SECURITY RSH_SECURITY
           USE_AMANDAHOSTS CLIENT_LOGIN="amandabackup" FORCE_USERID
           HAVE_GZIP COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
           COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"
    When I run amrecover, it returns an error:

    Code:
    [root@themole ~]# amrecover -C global
    AMRECOVER Version 2.5.2p1. Contacting server on themole.musecurity.com ...
    NAK: amindexd: invalid service, add 'amindexd' as argument to amandad
    My amanda entry in xinetd.d:

    Code:
    service amanda
    {
            only_from               = localhost themole.musecurity.com
            socket_type             = dgram
            protocol                = tcp
            wait                    = yes
            user                    = amanda
            group                   = disk
            groups                  = yes
            server                  = /usr/lib/amanda/amandad 
            server_args             = -auth=bsdtcp amdump amindexd amidxtaped
            disable                 = no
    }
    
    service amandaidx
    {
            disable = no
            socket_type = stream
            protocol = tcp
            wait = no
            user = amanda
            group = disk
            groups = yes
            only_from = localhost themole.musecurity.com 
            server = /usr/lib/amanda/amindexd
    }
    
    service amidxtape
    {
            disable = no
            socket_type = stream
            protocol = tcp
            wait = no
            user = amanda
            group = disk
            groups = yes
            only_from = localhost themole.musecurity.com 
            server = /usr/lib/amanda/amidxtaped
    }
    .amandahosts
    Code:
    themole.musecurity.com amanda amdump 
    themole.musecurity.com amandabackup amdump
    themole.musecurity.com root amindexd amidxtaped
    localhost.localdomain root amindexd amidxtaped
    localhost.localdomain amanda amdump 
    localhost.localdomain amandabackup amdump
    The debug from amrecover (with debug_auth and debug_amandad enabled)
    Code:
    amrecover: debug 1 pid 26441 ruid 0 euid 0: start at Mon Oct  8 13:05:33 2007
    Reading conf file "/etc/amanda/amanda-client.conf".
    Reading conf file "/etc/amanda/global/amanda-client.conf".
    amrecover: debug 1 pid 26441 ruid 0 euid 0: rename at Mon Oct  8 13:05:33 2007
    amrecover: time 0.001: security_getdriver(name=bsd) returns 0xc0b3c0
    amrecover: time 0.001: security_handleinit(handle=0x9308e28, driver=0xc0b3c0 (BSD))
    amrecover: time 0.024: bind_portrange2: Try  port 726: Available   - Success
    amrecover: time 0.024: dgram_bind: socket 3 bound to ::.726
    Resolved hostname=localhost.localdomain
    amrecover: time 0.025: udp_inithandle port 24615 handle 000-00000000 sequence 1191246239
    amrecover: time 0.025: udp: adding handle '000-00000000'
    amrecover: udpbsd_sendpkt: enter
    amrecover: time 0.025: bsd: pkthdr2str handle '000-00000000'
    amrecover: time 0.025: sec: udpbsd_sendpkt: REQ (0) pkt_t (len 67) contains:
    
    "SERVICE amindexd
    OPTIONS features=ffffffff9ffeffffffff00;auth=bsd;
    "
    
    amrecover: time 0.025: dgram_send_addr(addr=0x9308e48, dgram=0xc1d544)
    amrecover: time 0.025: (sockaddr_in6 *)0x9308e48 = { 10, 10080, ::ffff:127.0.0.1 }
    amrecover: time 0.025: dgram_send_addr: 0xc1d544->socket = 3
    amrecover: time 0.025: udp_recvpkt(cookie=0x9308e28, fn=0xbf5240, arg=0x93089a0, timeout=10)
    amrecover: time 0.028: udp_netfd_read_callback(cookie=0xc1d540)
    amrecover: time 0.028: dgram_recv(dgram=0xc1d544, timeout=0, fromaddr=0xc2d530)
    amrecover: time 0.028: (sockaddr_in6 *)0xc2d530 = { 10, 10080, ::ffff:127.0.0.1 }
    amrecover: time 0.028: udp: receive handle '000-00000000' netfd '000-00000000'
    amrecover: time 0.028: security_close(handle=0x9308e28, driver=0xc0b3c0 (BSD))
    amrecover: time 0.028: bsd: close handle '000-00000000'
    Thanks in advance for any advice.
    Last edited by mubill; October 8th, 2007 at 01:07 PM.

  2. #2
    Join Date
    Oct 2005
    Location
    Bay Area, CA
    Posts
    124

    Default

    Try to change the service amanda defintion to:

    >wait = yes
    wait = no

    service amandaidx and service amidxtape are not needed as amanda is responsible to start appropriate services.

  3. #3
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default

    Quote Originally Posted by ktill View Post
    Try to change the service amanda defintion to:

    >wait = yes
    wait = no

    service amandaidx and service amidxtape are not needed as amanda is responsible to start appropriate services.

    Thanks for your assistance, but it produces the same error. The definition looks like this now:

    Code:
    service amanda
    {
            only_from               = localhost themole.musecurity.com
            socket_type             = stream
            protocol                = tcp
            wait                    = no
            user                    = amanda
            group                   = disk
            groups                  = yes
            server                  = /usr/lib/amanda/amandad
            server_args             = -auth=bsdtcp amdump amindexd amidxtaped
            disable                 = no
    }
    The debug..

    Code:
    amrecover: debug 1 pid 28568 ruid 0 euid 0: start at Mon Oct  8 15:29:59 2007
    Reading conf file "/etc/amanda/amanda-client.conf".
    Reading conf file "/etc/amanda/global/amanda-client.conf".
    amrecover: debug 1 pid 28568 ruid 0 euid 0: rename at Mon Oct  8 15:29:59 2007
    amrecover: time 0.010: security_getdriver(name=bsd) returns 0xc0b3c0
    amrecover: time 0.010: security_handleinit(handle=0x87a4e68, driver=0xc0b3c0 (BSD))
    amrecover: time 0.011: bind_portrange2: Skip port 767: Owned by phonebook.
    amrecover: time 0.035: bind_portrange2: Try  port 768: Available   - Success
    amrecover: time 0.035: dgram_bind: socket 3 bound to ::.768
    Resolved hostname=localhost.localdomain
    amrecover: time 0.036: udp_inithandle port 24615 handle 000-00000000 sequence 1191351245
    amrecover: time 0.036: udp: adding handle '000-00000000'
    amrecover: udpbsd_sendpkt: enter
    amrecover: time 0.036: bsd: pkthdr2str handle '000-00000000'
    amrecover: time 0.036: sec: udpbsd_sendpkt: REQ (0) pkt_t (len 67) contains:
    
    "SERVICE amindexd
    OPTIONS features=ffffffff9ffeffffffff00;auth=bsd;
    "
    
    amrecover: time 0.036: dgram_send_addr(addr=0x87a4e88, dgram=0xc1d544)
    amrecover: time 0.036: (sockaddr_in6 *)0x87a4e88 = { 10, 10080, ::ffff:127.0.0.1 }
    amrecover: time 0.036: dgram_send_addr: 0xc1d544->socket = 3
    amrecover: time 0.037: udp_recvpkt(cookie=0x87a4e68, fn=0xbf5240, arg=0x87a4a28, timeout=10)
    amrecover: time 0.058: udp_netfd_read_callback(cookie=0xc1d540)
    amrecover: time 0.058: dgram_recv(dgram=0xc1d544, timeout=0, fromaddr=0xc2d530)
    amrecover: time 0.058: (sockaddr_in6 *)0xc2d530 = { 10, 10080, ::ffff:127.0.0.1 }
    amrecover: time 0.058: udp: receive handle '000-00000000' netfd '000-00000000'
    amrecover: time 0.058: security_close(handle=0x87a4e68, driver=0xc0b3c0 (BSD))
    amrecover: time 0.058: bsd: close handle '000-00000000'

  4. #4
    Join Date
    Oct 2005
    Location
    Bay Area, CA
    Posts
    124

    Default

    >amrecover: time 0.010: security_handleinit(handle=0x87a4e68, driver=0xc0b3c0 (BSD))

    seems to me amrecover is using bsd auth while the server is listening using bsdtcp.

    Try to set auth in /etc/amanda/amanda-client.conf:

    auth "bsdtcp"

  5. #5
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default

    Quote Originally Posted by ktill View Post
    >amrecover: time 0.010: security_handleinit(handle=0x87a4e68, driver=0xc0b3c0 (BSD))

    seems to me amrecover is using bsd auth while the server is listening using bsdtcp.

    Try to set auth in /etc/amanda/amanda-client.conf:

    auth "bsdtcp"

    OK, we're getting further. Now I get a connection refused.

    Code:
    (root@themole) global > amrecover -C global
    AMRECOVER Version 2.5.2p1. Contacting server on themole.musecurity.com ...
    [request failed: Connection refused]
    Debug log

    Code:
    amrecover: debug 1 pid 30496 ruid 0 euid 0: start at Mon Oct  8 15:53:50 2007
    Reading conf file "/etc/amanda/amanda-client.conf".
    Reading conf file "/etc/amanda/global/amanda-client.conf".
    amrecover: debug 1 pid 30496 ruid 0 euid 0: rename at Mon Oct  8 15:53:50 2007
    amrecover: time 0.001: security_getdriver(name=bsdtcp) returns 0xc0b420
    amrecover: time 0.001: bsdtcp: bsdtcp_connect: themole.musecurity.com
    amrecover: time 0.001: security_handleinit(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 0.002: security_streaminit(stream=0x8972fd8, driver=0xc0b420 (BSDTCP))
    amrecover: time 0.002: sec_tcp_conn_get: localhost.localdomain
    amrecover: time 0.002: sec_tcp_conn_get: creating new handle
    amrecover: time 0.002: sec: stream_client: connected to stream 1
    amrecover: time 0.003: connect_port: Skip port 512: Owned by exec.
    amrecover: time 0.003: connect_port: Skip port 513: Owned by login.
    amrecover: time 0.003: connect_port: Skip port 514: Owned by shell.
    amrecover: time 0.004: connect_port: Skip port 515: Owned by printer.
    amrecover: time 0.027: connect_port: Try  port 516: Available   - 
    amrecover: time 0.027: connect_portrange: connect from 0.0.0.0.516 failed: Connection refused
    amrecover: time 0.027: connect_portrange: connect to 127.0.0.1.10080 failed: Connection refused
    amrecover: time 0.027: stream_client: Could not bind to port in range 512-1023.
    amrecover: time 0.027: security_seterror(handle=0x8972e68, driver=0xc0b420 (BSDTCP) error=Connection refused)
    amrecover: time 0.027: security_close(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 0.027: sec: closing handle to localhost.localdomain
    amrecover: time 0.027: sec: cancelling recvpkt for localhost.localdomain
    amrecover: time 0.027: security_stream_close(0x8972fd8)
    amrecover: time 0.027: sec: tcpma_stream_close: closing stream 1
    amrecover: time 0.027: sec_tcp_conn_put: decrementing refcnt for localhost.localdomain to 0
    amrecover: time 0.027: sec_tcp_conn_put: closing connection to localhost.localdomain
    amrecover: time 5.028: bsdtcp: bsdtcp_connect: themole.musecurity.com
    amrecover: time 5.028: security_handleinit(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 5.028: security_streaminit(stream=0x8972fd8, driver=0xc0b420 (BSDTCP))
    amrecover: time 5.028: sec_tcp_conn_get: localhost.localdomain
    amrecover: time 5.028: sec_tcp_conn_get: creating new handle
    amrecover: time 5.028: sec: stream_client: connected to stream 2
    amrecover: time 5.028: connect_port: Skip port 512: Owned by exec.
    amrecover: time 5.028: connect_port: Skip port 513: Owned by login.
    amrecover: time 5.028: connect_port: Skip port 514: Owned by shell.
    amrecover: time 5.029: connect_port: Skip port 515: Owned by printer.
    amrecover: time 5.030: connect_port: Try  port 516: Available   - 
    amrecover: time 5.030: connect_portrange: connect from 0.0.0.0.516 failed: Connection refused
    amrecover: time 5.030: connect_portrange: connect to 127.0.0.1.10080 failed: Connection refused
    amrecover: time 5.030: stream_client: Could not bind to port in range 512-1023.
    amrecover: time 5.030: security_seterror(handle=0x8972e68, driver=0xc0b420 (BSDTCP) error=Connection refused)
    amrecover: time 5.030: security_close(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 5.030: sec: closing handle to localhost.localdomain
    amrecover: time 5.030: sec: cancelling recvpkt for localhost.localdomain
    amrecover: time 5.030: security_stream_close(0x8972fd8)
    amrecover: time 5.030: sec: tcpma_stream_close: closing stream 2
    amrecover: time 5.030: sec_tcp_conn_put: decrementing refcnt for localhost.localdomain to 0
    amrecover: time 5.030: sec_tcp_conn_put: closing connection to localhost.localdomain
    amrecover: time 10.031: bsdtcp: bsdtcp_connect: themole.musecurity.com
    amrecover: time 10.031: security_handleinit(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 10.031: security_streaminit(stream=0x8972fd8, driver=0xc0b420 (BSDTCP))
    amrecover: time 10.031: sec_tcp_conn_get: localhost.localdomain
    amrecover: time 10.031: sec_tcp_conn_get: creating new handle
    amrecover: time 10.031: sec: stream_client: connected to stream 3
    amrecover: time 10.031: connect_port: Skip port 512: Owned by exec.
    amrecover: time 10.032: connect_port: Skip port 513: Owned by login.
    amrecover: time 10.032: connect_port: Skip port 514: Owned by shell.
    amrecover: time 10.032: connect_port: Skip port 515: Owned by printer.
    amrecover: time 10.033: connect_port: Try  port 516: Available   - 
    amrecover: time 10.033: connect_portrange: connect from 0.0.0.0.516 failed: Connection refused
    amrecover: time 10.033: connect_portrange: connect to 127.0.0.1.10080 failed: Connection refused
    amrecover: time 10.033: stream_client: Could not bind to port in range 512-1023.
    amrecover: time 10.033: security_seterror(handle=0x8972e68, driver=0xc0b420 (BSDTCP) error=Connection refused)
    amrecover: time 10.033: security_close(handle=0x8972e68, driver=0xc0b420 (BSDTCP))
    amrecover: time 10.033: sec: closing handle to localhost.localdomain
    amrecover: time 10.033: sec: cancelling recvpkt for localhost.localdomain
    amrecover: time 10.033: security_stream_close(0x8972fd8)
    amrecover: time 10.033: sec: tcpma_stream_close: closing stream 3
    amrecover: time 10.033: sec_tcp_conn_put: decrementing refcnt for localhost.localdomain to 0
    amrecover: time 10.033: sec_tcp_conn_put: closing connection to localhost.localdomain

  6. #6
    Join Date
    Oct 2005
    Location
    Bay Area, CA
    Posts
    124

    Default

    might have to do with the 'only_from' line in the amanda defintion.
    Take it out to see if amrecover works. Then add 'localhost.localdomain' to see if it makes a difference.

  7. #7
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default

    I tried that as well, but it gives the same error. Looking at the log, it seems like maybe I should be running a daemon that isn't running?

    Code:
     
    amrecover: time 5.036: connect_port: Skip port 512: Owned by exec.
    amrecover: time 5.036: connect_port: Skip port 513: Owned by login.
    amrecover: time 5.037: connect_port: Skip port 514: Owned by shell.
    amrecover: time 5.037: connect_port: Skip port 515: Owned by printer.
    amrecover: time 5.038: connect_port: Try  port 516: Available   - 
    amrecover: time 5.038: connect_portrange: connect from 0.0.0.0.516 failed: Connection refused
    amrecover: time 5.038: connect_portrange: connect to 127.0.0.1.10080 failed: Connection refused

  8. #8
    Join Date
    Jun 2007
    Posts
    60

    Default

    1) Insert following line in your amanda xinetd
    flags = IPv6

    2) Replace line user = amanda with user = amandabackup

    3) Restart xinetd.

    Let me know the result

  9. #9
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default

    Quote Originally Posted by sunil View Post
    1) Insert following line in your amanda xinetd
    flags = IPv6

    2) Replace line user = amanda with user = amandabackup

    3) Restart xinetd.

    Let me know the result
    It worked. Thank you kindly for your help.

  10. #10
    Join Date
    Sep 2007
    Location
    SF Bay Area
    Posts
    32

    Default

    I hadn't checked this yesterday (or last night) as I was focused on amrecover, but it looks like the changes I made caused other problems.

    When trying to back up the server (as a client of itself) I get a NAK error again:

    Code:
    Amanda Backup Client Hosts Check
    --------------------------------
    WARNING: themole.musecurity.com: selfcheck request failed: timeout waiting for ACK

    I think what is happening is that I'm no longer listening for the udp client requests that come in. If I look at tcpdump, I can see the requests coming in but there is never any response:

    Code:
    11:48:05.878005 IP localhost.localdomain.599 > localhost.localdomain.amanda: UDP, length 131
    11:48:15.878210 IP localhost.localdomain.599 > localhost.localdomain.amanda: UDP, length 131
    A successful communication has the server send udp packets to the amanda port, and then the client returns them. A client with ip 10.10.3.115, as an example:

    Code:
    11:47:55.547173 IP themole.musecurity.com.599 > 10.10.3.115.amanda: UDP, length 272
    11:47:55.547179 IP themole.musecurity.com.599 > 10.10.3.115.amanda: UDP, length 272
    11:47:55.550163 IP 10.10.3.115.amanda > themole.musecurity.com.599: UDP, length 50
    11:47:55.555638 IP 10.10.3.115.amanda > themole.musecurity.com.599: UDP, length 434
    Is it necessary to somehow split amanda server xinet entries from amanda client, if you run a client on the server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •