PDA

View Full Version : amrecover amindexd



coolhandluke
March 19th, 2012, 09:19 AM
I am getting the following message when I attempt amrecover on the client:

AMRECOVER Version 3.3.1. Contacting server on ZMANDA.SERVER.DOMAIN ...
NAK: amindexd: invalid service, add 'amindexd' as argument to amandad


Here is the /var/lib/amanda/.amandahosts file on the client:

localhost amandabackup amdump
localhost.localdomain amandabackup amdump
ZMANDA.SERVER.DOMAIN amandabackup amdump
ZMANDA.SERVER.DOMAIN root amdump amservice


Here is the /etc/xinetd.d/amandaclient file on the client:

service amanda
{
disable = no
flags = IPv4
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/libexec/amanda/amandad
server_args = -auth=bsdtcp amdump amindexd amidxtaped
}

Here is the output of the latest /var/log/amanda/client/DailySet1/amrecover.20120319124931.debug:

Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: pid 14453 ruid 0 euid 0 version 3.3.1: start at Mon Mar 19 12:49:31 2012
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: config_overrides: index_server ZMANDA.SERVER.DOMAIN
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: config_overrides: tape_server ZMANDA.SERVER.DOMAIN
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: config_overrides: conf DailySet1
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: pid 14453 ruid 0 euid 0 version 3.3.1: rename at Mon Mar 19 12:49:31 2012
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: security_getdriver(name=ssh) returns 0x3b7006b240
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: security_handleinit(handle=0x1ab1310, driver=0x3b7006b240 (SSH))
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: security_streaminit(stream=0x1ab89e0, driver=0x3b7006b240 (SSH))
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: exec: /usr/bin/ssh SSH_OPTIONS -l amandabackup -p 22 -i /root/.ssh/id_rsa_amrecover ZMANDA.SERVER.DOMAIN /usr/libexec/amanda/amandad -auth=ssh
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: tcpm_send_token: data is still flowing
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: security_close(handle=0x1ab1310, driver=0x3b7006b240 (SSH))
Mon Mar 19 12:49:31 2012: thd-0x1aa6510: amrecover: security_stream_close(0x1ab89e0)

SemajThorgot
December 13th, 2012, 01:06 PM
Did you ever get this resolved? I have the exact same problem, and I'm not sure where else to look!

For my output, SUEZ is the backup server and www is the backup client. I can SSH into SUEZ from www just fine using the same private key, and amdump worked perfectly fine, it's just amrecover that's the problem.

In my case, here is the amanda-client.conf:
conf "web_server"
index_server "SUEZ"
tape_server "SUEZ"
auth "ssh"
ssh_keys "/var/lib/amanda/.ssh/id_rsa_amrecover"
client_username="amandabackup"

Here is /etc/xinetd.d/amandaserver (and I did restart xinetd after setting all of these settings):
service amanda
{
disable = no
flags = IPv4
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/libexec/amanda/amandad
server_args = -auth=ssh amdump amindexd amidxtaped
}

Here is the output from running amrecover web_server:
NAK: amindexd: invalid service, add 'amindexd' as argument to amandad

And here is the associated amandad debug file:
Thu Dec 13 16:20:11 2012: amandad: pid 6231 ruid 1002 euid 1002 version 3.2.2: start at Thu Dec 13 16:20:11 2012
Thu Dec 13 16:20:11 2012: amandad: security_getdriver(name=ssh) returns 0x7f6f52def200
Thu Dec 13 16:20:11 2012: amandad: version 3.2.2
Thu Dec 13 16:20:11 2012: amandad: build: VERSION="Amanda-3.2.2"
Thu Dec 13 16:20:11 2012: amandad: BUILT_DATE="Wed Mar 9 15:17:45 PST 2011" BUILT_MACH=""
Thu Dec 13 16:20:11 2012: amandad: BUILT_REV="3849" BUILT_BRANCH="3_2_2"
Thu Dec 13 16:20:11 2012: amandad: CC="x86_64-linux-gnu-gcc"
Thu Dec 13 16:20:11 2012: amandad: paths: bindir="/usr/bin" sbindir="/usr/sbin"
Thu Dec 13 16:20:11 2012: amandad: libexecdir="/usr/libexec"
Thu Dec 13 16:20:11 2012: amandad: amlibexecdir="/usr/libexec/amanda" mandir="/usr/share/man"
Thu Dec 13 16:20:11 2012: amandad: AMANDA_TMPDIR="/tmp/amanda"
Thu Dec 13 16:20:11 2012: amandad: AMANDA_DBGDIR="/var/log/amanda" CONFIG_DIR="/etc/amanda"
Thu Dec 13 16:20:11 2012: amandad: DEV_PREFIX="/dev/" RDEV_PREFIX="/dev/r"
Thu Dec 13 16:20:11 2012: amandad: DUMP="/sbin/dump" RESTORE="/sbin/restore" VDUMP=UNDEF
Thu Dec 13 16:20:11 2012: amandad: VRESTORE=UNDEF XFSDUMP="/sbin/xfsdump"
Thu Dec 13 16:20:11 2012: amandad: XFSRESTORE="/sbin/xfsrestore" VXDUMP=UNDEF VXRESTORE=UNDEF
Thu Dec 13 16:20:11 2012: amandad: SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar"
Thu Dec 13 16:20:11 2012: amandad: COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
Thu Dec 13 16:20:11 2012: amandad: LPRCMD=UNDEF MAILER=UNDEF
Thu Dec 13 16:20:11 2012: amandad: listed_incr_dir="/var/lib/amanda/gnutar-lists"
Thu Dec 13 16:20:11 2012: amandad: defs: DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
Thu Dec 13 16:20:11 2012: amandad: DEFAULT_TAPE_SERVER="localhost" DEFAULT_TAPE_DEVICE=""
Thu Dec 13 16:20:11 2012: amandad: NEED_STRSTR AMFLOCK_POSIX AMFLOCK_FLOCK AMFLOCK_LOCKF
Thu Dec 13 16:20:11 2012: amandad: AMFLOCK_LNLOCK SETPGRP_VOID ASSERTIONS AMANDA_DEBUG_DAYS=4
Thu Dec 13 16:20:11 2012: amandad: BSD_SECURITY USE_AMANDAHOSTS CLIENT_LOGIN="amandabackup"
Thu Dec 13 16:20:11 2012: amandad: CHECK_USERID HAVE_GZIP COMPRESS_SUFFIX=".gz"
Thu Dec 13 16:20:11 2012: amandad: COMPRESS_FAST_OPT="--fast" COMPRESS_BEST_OPT="--best"
Thu Dec 13 16:20:11 2012: amandad: UNCOMPRESS_OPT="-dc"
Thu Dec 13 16:20:11 2012: amandad: parsing www
Thu Dec 13 16:20:11 2012: amandad: security_handleinit(handle=0x1392800, driver=0x7f6f52def200 (SSH))
Thu Dec 13 16:20:11 2012: amandad: security_streaminit(stream=0x1392910, driver=0x7f6f52def200 (SSH))
Thu Dec 13 16:20:11 2012: amandad: authenticated peer name is 'www'
Thu Dec 13 16:20:11 2012: amandad: accept recv REQ pkt:
<<<<<
SERVICE amindexd
OPTIONS features=ffffffff9efefbffffffffff1f;auth=ssh;
>>>>>
Thu Dec 13 16:20:11 2012: amandad: amindexd: invalid service
Thu Dec 13 16:20:11 2012: amandad: sending NAK pkt:
<<<<<
ERROR amindexd: invalid service, add 'amindexd' as argument to amandad
>>>>>
Thu Dec 13 16:20:11 2012: amandad: tcpm_send_token: data is still flowing
Thu Dec 13 16:20:11 2012: amandad: security_close(handle=0x1392800, driver=0x7f6f52def200 (SSH))
Thu Dec 13 16:20:11 2012: amandad: security_stream_close(0x1392910)
Thu Dec 13 16:20:11 2012: amandad: pid 6231 finish time Thu Dec 13 16:20:11 2012

martineau
December 13th, 2012, 01:35 PM
The xinetd is not use for ssh, you can remove it.

read: man amanda-auth

The amandad argument goes in the server authorized_keys, you must prepend the key with something like:
from="amanda_client.your.domain.com",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/absolute/path/to/amandad -auth=ssh amindexd amidxtaped"

SemajThorgot
December 14th, 2012, 08:40 AM
The xinetd is not use for ssh, you can remove it.

read: man amanda-auth

The amandad argument goes in the server authorized_keys, you must prepend the key with something like:
from="amanda_client.your.domain.com",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/absolute/path/to/amandad -auth=ssh amindexd amidxtaped"

Wow... that makes a lot of sense, and I can connect just fine now. I am having other issues later on in amrecover, but I'll attempt to resolve them myself. I'm still new to this (it's only my second day using amanda). Thanks martineau!