PDA

View Full Version : Amanda 2.5.2-1 Selfcheck Request Failed



ddenton
June 11th, 2007, 12:48 PM
I hate to beat a dead horse here, because so many people seem to have asked this question, but none of the solutions I've seen are working for me. I, of course, have a server and client that don't seem to be communicating.

Both machines in question are RHEL 4 servers running, one running the 2.5.1-p2 client, and the other the server package. When I run "amcheck DailySet1", I get:

WARNING: myclient.mydomain.com: selfcheck request failed: timeout waiting for ACK
Client check: 1 host checked in 29.998 seconds, 1 problem found

I've installed both systems by RPM, and followed these instructions almost to the letter:
http://amanda.zmanda.com/quick-backup-setup.html

There's only 1 thing that stood out, and that's a directive in the amanda.conf file on the server. When running the labeling step, I got an error message saying that a dump-type parameter was expected. I pinned it down to the root-tar directive under the dump-type. The labeling procedure wouldn't continue with it in place, so I had to comment it out.

This log was pulled from /tmp/amanda/server/DailySet1 after I ran amcheck...

amcheck: debug 1 pid 31833 ruid 505 euid 0: start at Mon Jun 11 15:40:46 2007
amcheck: debug 1 pid 31833 ruid 505 euid 505: rename at Mon Jun 11 15:40:46 2007
security_getdriver(name=BSD) returns 0x4b60e0
security_handleinit(handle=0x8363470, driver=0x4b60e0 (BSD))
amcheck-clients: time 0.000: bind_portrange2: Try port 937: Available - Success
amcheck-clients: time 0.001: dgram_bind: socket bound to 0.0.0.0.937
amcheck-clients: dgram_send_addr(addr=0xbff58a20, dgram=0x4b7084)
amcheck-clients: time 0.002: (sockaddr_in *)0xbff58a20 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x4b7084->socket = 4
changer_query: changer return was 25 1
changer_query: searchable = 0
changer_find: looking for NULL changer is searchable = 0
amcheck-clients: dgram_send_addr(addr=0xbff58910, dgram=0x4b7084)
amcheck-clients: time 10.001: (sockaddr_in *)0xbff58910 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x4b7084->socket = 4
amcheck-clients: dgram_send_addr(addr=0xbff58910, dgram=0x4b7084)
amcheck-clients: time 19.999: (sockaddr_in *)0xbff58910 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x4b7084->socket = 4
security_seterror(handle=0x8363470, driver=0x4b60e0 (BSD) error=timeout waiting for ACK)
security_close(handle=0x8363470, driver=0x4b60e0 (BSD))
amcheck: pid 31833 finish time Mon Jun 11 15:41:16 2007

So, it atleast appears that the server's trying to communicate. I can ping the client machine by IP address and by hostname, and xinetd must be listening because I can telnet to the client from the server on port 10080.

I'm sure this question has been asked alot before, but given the above info can anyone point me in the right direction? Please let me know what else you may need...

Thanks in advance.

dustin
June 11th, 2007, 12:55 PM
There's only 1 thing that stood out, and that's a directive in the amanda.conf file on the server. When running the labeling step, I got an error message saying that a dump-type parameter was expected. I pinned it down to the root-tar directive under the dump-type. The labeling procedure wouldn't continue with it in place, so I had to comment it out.

I think you've found it there. If you commented out 'root-tar' in your dumptype declaration, then you also lost any configuration which was inherited from root-tar and its ancestors, including the authentication configuration. It looks like amcheck is trying to use 'bsd' authentication -- what do you have configured on the client?

Check your dumptype specifications, or post them here and someone will take a look

ddenton
June 12th, 2007, 10:33 AM
Dustin,

Any idea what might cause the root-tar directive in my amencryptsimple section to to cause a problem with the amanda.conf file?

dustin
June 12th, 2007, 11:10 AM
Can you post the relevant config sections so I can take a look? In particular, all of the dumptypes in amanda.conf and the offending entries in disklist.

I'm not sure what you mean by "amencryptsimple" section -- hopefully seeing the configs will show me

ddenton
June 12th, 2007, 11:37 AM
Dustin,

Here's the chunk of amanda.conf that was to be added per the aforementioned install instructions. Sorry if the mulitple posts is confusing. I don't know how it got posted twice, and different persons have responded to different posts.

Below is the bottom of the dumptype global section and the encrypt-simple section.

amanda.conf:

# index yes
# record no
# split_diskbuffer "/raid/amanda"
# fallback_splitsize 64m
auth "bsdtcp"
}

define dumptype encrypt-simple {
root-tar
comment "client simple symmetric encryption, dumped with tar"
encrypt client
compress fast
client_encrypt "/usr/sbin/amcryptsimple"
client_decrypt_option "-d"
}

This is the amandaserver xinetd conf file:

# default: on
#
# description: Amanda services for Amanda server and client.
#
service amanda
{
only_from = TESTBED001 TESTBED002.remitpro.com
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsdtcp amdump amindexd amidxtaped
}

Here's the only entry from my disklist file:

TESTBED002.remitpro.com /home/ddenton encrypt-simple

Here's the error I get when I try to run amcheck with the root-tar directive uncommented:

"/etc/amanda/DailySet1/amanda.conf", line 495: dumptype parameter expected
amcheck: errors processing config file "/etc/amanda/DailySet1/amanda.conf"

With everything set to bsdtcp, and the root-tar directive commented, I get these. This is the error from running amcheck:

WARNING: TESTBED002.remitpro.com: selfcheck request failed: timeout waiting for ACK
Client check: 1 host checked in 29.997 seconds, 1 problem found

This is the output from the debug file on the server:

mcheck: debug 1 pid 16173 ruid 505 euid 0: start at Tue Jun 12 14:27:29 2007
amcheck: debug 1 pid 16173 ruid 505 euid 505: rename at Tue Jun 12 14:27:29 2007
security_getdriver(name=BSD) returns 0x7eb0e0
security_handleinit(handle=0x8d37470, driver=0x7eb0e0 (BSD))
amcheck-clients: time 0.000: bind_portrange2: Try port 720: Available - Success
amcheck-clients: time 0.001: dgram_bind: socket bound to 0.0.0.0.720
amcheck-clients: dgram_send_addr(addr=0xbfefe9b0, dgram=0x7ec084)
amcheck-clients: time 0.002: (sockaddr_in *)0xbfefe9b0 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x7ec084->socket = 4
changer_query: changer return was 25 1
changer_query: searchable = 0
changer_find: looking for NULL changer is searchable = 0
amcheck-clients: dgram_send_addr(addr=0xbfefe8a0, dgram=0x7ec084)
amcheck-clients: time 10.000: (sockaddr_in *)0xbfefe8a0 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x7ec084->socket = 4
amcheck-clients: dgram_send_addr(addr=0xbfefe8a0, dgram=0x7ec084)
amcheck-clients: time 19.999: (sockaddr_in *)0xbfefe8a0 = { 2, 10080, 192.168.100.232 }
amcheck-clients: dgram_send_addr: 0x7ec084->socket = 4
security_seterror(handle=0x8d37470, driver=0x7eb0e0 (BSD) error=timeout waiting for ACK)
security_close(handle=0x8d37470, driver=0x7eb0e0 (BSD))
amcheck: pid 16173 finish time Tue Jun 12 14:27:59 2007

I think the only thing not included is the amencryptsimple script itself, but that was copied and pasted from the install instructions.

dustin
June 12th, 2007, 11:50 AM
I think that the problem is that your encrypt-simple dumptype is defined before root-tar -- that would cause the "dumptype parameter expected" error.

Try moving things around so that your dumptype follows all of the dumptypes on which it depends. Then it should properly inherit the auth "bsdtcp" from the global dumptype, and hopefully your communications problems wil be at an end!

ddenton
June 12th, 2007, 01:31 PM
Dustin,

Well, I'm no longer getting te previous error message, but now a new one:

ERROR: NAK amandaclient.mydomain.com: user amandabackup from amandaserver is not allowed to execute the service noop: Please add "amdump" to the line in /var/lib/amanda/.amandahosts
Client check: 1 host checked in 0.081 seconds, 1 problem found

This is my .amandahosts file from the server:

localhost root amindexd amidxtaped
localhost amandabackup amdump
localhost.localdomain root amindexd amidxtaped
localhost.localdomain amandabackup amdump
amandaclient.mydomain.com root amindexd amidxtaped
amandaserver.mydomain.com root amindexd amidxtaped
amandaserver.mydomain.com amandabackup admump

This is the .amandahosts file from the client:

localhost amandabackup amdump
localhost.localdomain amandabackup amdump
amandaclient.remitpro.com amandabackup amdump
amandaserver.remitpro.com amandabackup amdump

If I'm reading this right, the amandabackup user from my server can't execute a command on the client. So I added the 4th line to my client's .amandahosts file with no luck.

dustin
June 12th, 2007, 02:44 PM
Try adding 'amandaserver amandabackup amdump' to the client's .amandahosts.

ddenton
June 13th, 2007, 05:53 AM
Dustin,

After some permission/ownership tweaking on the client's .amandahosts file, the amcheck finally passed!

I attempted to do an amdump DailySet1, and was emailed the following. If I'm reading it correctly, there's a password issue?




These dumps were to tape DailySet1-01.
The next tape Amanda expects to use is: a new tape.
The next new tape already labelled is: DailySet1-02.

FAILURE AND STRANGE DUMP SUMMARY:
amandaclient.mydomain.com /home/ddenton lev 0 FAILED [dumper returned FAILED]
amandaclient.mydomain.com /home/ddenton lev 0 FAILED [compress returned 1, /bin/tar returned 2]
amandaclient.mydomain.com /home/ddenton lev 0 FAILED [compress returned 1, /bin/tar returned 2]
amandaclient.mydomain.com /home/ddenton lev 0 FAILED [dumper returned FAILED]


STATISTICS:
Total Full Incr.
-------- -------- --------
Estimate Time (hrs:min) 0:00
Run Time (hrs:min) 0:00
Dump Time (hrs:min) 0:00 0:00 0:00
Output Size (meg) 0.0 0.0 0.0
Original Size (meg) 0.0 0.0 0.0
Avg Compressed Size (%) -- -- --
Filesystems Dumped 0 0 0
Avg Dump Rate (k/s) -- -- --

Tape Time (hrs:min) 0:00 0:00 0:00
Tape Size (meg) 0.0 0.0 0.0
Tape Used (%) 0.0 0.0 0.0
Filesystems Taped 0 0 0

Chunks Taped 0 0 0
Avg Tp Write Rate (k/s) -- -- --

USAGE BY TAPE:
Label Time Size % Nb Nc
DailySet1-01 0:00 0K 0.0 0 0


FAILED AND STRANGE DUMP DETAILS:

/-- amandaclient.mydomain.com /home/ddenton lev 0 FAILED [compress returned 1, /bin/tar returned 2]
sendbackup: start [amandaclient.mydomain.com:/home/ddenton level 0]
sendbackup: info BACKUP=/bin/tar
sendbackup: info RECOVER_CMD=/bin/gzip -dc |/bin/tar -f - ...
sendbackup: info COMPRESS_SUFFIX=.gz
sendbackup: info end
? gpg: failed to create temporary file `/var/lib/amanda/.gnupg/.#lk0x3cc188.amandaclient.4005': No such file or directory ? gpg: keyblock resource `/var/lib/amanda/.gnupg/pubring.gpg': general error ? gpg: error creating passphrase: invalid passphrase ? gpg:[stdin]: symmetric encryption failed: invalid passphrase ?
? gzip: stdout: Broken pipe
? sendbackup: index tee cannot write [Broken pipe]
| Total bytes written: 71680 (70KiB, ?/s)
? gtar: -: Cannot write: Broken pipe
? gtar: Error is not recoverable: exiting now ? index returned 1
sendbackup: error [compress returned 1, /bin/tar returned 2]
\--------

/-- amandaclient.mydomain.com /home/ddenton lev 0 FAILED [compress returned 1, /bin/tar returned 2]
sendbackup: start [amandaclient.mydomain.com:/home/ddenton level 0]
sendbackup: info BACKUP=/bin/tar
sendbackup: info RECOVER_CMD=/bin/gzip -dc |/bin/tar -f - ...
sendbackup: info COMPRESS_SUFFIX=.gz
sendbackup: info end
? gpg: failed to create temporary file `/var/lib/amanda/.gnupg/.#lk0x616188.amandaclient.4012': No such file or directory ? gpg: keyblock resource `/var/lib/amanda/.gnupg/pubring.gpg': general error ? gpg: error creating passphrase: invalid passphrase ? gpg:[stdin]: symmetric encryption failed: invalid passphrase ?
? gzip: stdout: Broken pipe
? sendbackup: index tee cannot write [Broken pipe]
| Total bytes written: 51200 (50KiB, ?/s)
? gtar: -: Wrote only 8192 of 10240 bytes ? gtar: Error is not recoverable: exiting now ? index returned 1
sendbackup: error [compress returned 1, /bin/tar returned 2]
\--------


NOTES:
planner: Adding new disk amandaclient.mydomain.com:/home/ddenton.
taper: tape DailySet1-01 kb 0 fm 0 [OK]


DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- ------------- amandaclient.r -me/ddenton 0 FAILED --------------------------------------------

(brought to you by Amanda version 2.5.1p2)

ddenton
June 13th, 2007, 06:09 AM
Dustin...

I placed a word in the .am_passphrase file and now it seems to have backed something up, despite another gpg error. Here's the log from the backup job (/etc/amanda/DailySet1/).

DISK planner amandaclient.mydomain.com /home/ddenton
START planner date 20070613085408
INFO planner Adding new disk amandaclient.mydomain.com:/home/ddenton.
START driver date 20070613085408
STATS driver startup time 0.021
FINISH planner date 20070613085408 time 0.103
START taper datestamp 20070613085408 label DailySet1-02 tape 0
STRANGE dumper amandaclient.mydomain.com /home/ddenton 0 [sec 7.598 kb 7634 kps 1004.6 orig-kb 8070]
sendbackup: start [amandaclient.mydomain.com:/home/ddenton level 0]
sendbackup: info BACKUP=/bin/tar
sendbackup: info RECOVER_CMD=/bin/gzip -dc |/bin/tar -f - ...
sendbackup: info COMPRESS_SUFFIX=.gz
sendbackup: info end
? gpg: failed to create temporary file `/var/lib/amanda/.gnupg/.#lk0x529188.TESTBED002.4040': No such file or directory
? gpg: keyblock resource `/var/lib/amanda/.gnupg/pubring.gpg': general error
| Total bytes written: 8263680 (7.9MiB, 1.2MiB/s)
? gpg: can't create `/var/lib/amanda/.gnupg/random_seed': No such file or directory
sendbackup: size 8070
sendbackup: end
SUCCESS chunker amandaclient.mydomain.com /home/ddenton 20070613085408 0 [sec 7.647 kb 7634 kps 1002.4]
STATS driver estimate amandaclient.mydomain.com /home/ddenton 20070613085408 0 [sec 3 nkb 8102 ckb 4096 kps 1024]
SUCCESS taper amandaclient.mydomain.com /home/ddenton 20070613085408 0 [sec 0.157 kb 7680 kps 48785.4 {wr: writers 240 rdwait 0.093 wrwait 0.059 filemark 0.000}]
INFO taper tape DailySet1-02 kb 7680 fm 1 [OK]
FINISH driver date 20070613085408 time 9.001

ddenton
June 13th, 2007, 06:33 AM
Try adding 'amandaserver amandabackup amdump' to the client's .amandahosts.

Sorry, forgot to tell you that this was what allowed me to pass the amcheck.

I hate to say this, but now I'm having trouble with the amrecover command from the client. My xinetd.d configs are what the setup instructions specified, with the addition of the only_from directives. With those directives in place, I get the following error:

AMRECOVER Version 2.5.1p2. Contacting server on TESTBED001.remitpro.com ...
[request failed: recv error: Connection reset by peer]

If I comment the directives, I get this:
AMRECOVER Version 2.5.1p2. Contacting server on amandaserver.mydomain.com ...
NAK: user root from amandaclient is not allowed to execute the service amindexd: Please add "amindexd amidxtaped" to the line in /var/lib/amanda/.amandahosts

Now I checked my .amandahosts files on both machines. The server has:

localhost root amindexd amidxtaped
localhost amandabackup amdump
localhost.localdomain root amindexd amidxtaped
localhost.localdomain amandabackup amdump
TESTBED002.remitpro.com root amindexd amidxtaped
TESTBED001.remitpro.com root amindexd amidxtaped
TESTBED001.remitpro.com amandabackup amdump

And the client has this:

localhost amandabackup amdump
localhost.localdomain amandabackup amdump
TESTBED002.remitpro.com amandabackup amdump
TESTBED001.remitpro.com amandabackup amdump
TESTBED001 amandabackup amdump

Have I missed something else? I think I have everything in place. Also, I can ping the FQDN of each server from the other, and I've restarted xinetd.

Thanks a million for your help. It's greatly appreciated.

ktill
June 13th, 2007, 09:46 AM
>? gpg: failed to create temporary file >`/var/lib/amanda/.gnupg/.#lk0x529188.TESTBED002.4040': No such file or directory
>? gpg: keyblock resource `/var/lib/amanda/.gnupg/pubring.gpg': general error
>| Total bytes written: 8263680 (7.9MiB, 1.2MiB/s)
>? gpg: can't create `/var/lib/amanda/.gnupg/random_seed': No such file or directory

the above are just warnings. To prevent them from happening in the next dump.
log in as amanda user.
mkdir /var/lib/amanda/.gnupg/

ddenton
June 13th, 2007, 10:11 AM
Ktill,

Any idea why amrecover is failing?

ktill
June 13th, 2007, 10:41 AM
server: amandaserver.mydomain.com
client: amandaclient


add the following to server's /var/lib/amanda/.amandahosts file

amandaclient root amindexd amidxtaped
amandaclient.mydomain.com root amindexd amidxtaped

ddenton
June 13th, 2007, 10:48 AM
server: amandaserver.mydomain.com
client: amandaclient


add the following to server's /var/lib/amanda/.amandahosts file

amandaclient root amindexd amidxtaped
amandaclient.mydomain.com root amindexd amidxtaped

The second of the two bottom statements was already in the file. I added the first of them, with no change. This is the error message:

AMRECOVER Version 2.5.1p2. Contacting server on amandaclient.mydomain.com ...
[request failed: recv error: Connection reset by peer]

ktill
June 13th, 2007, 10:55 AM
please consult amrecover manpage.

> AMRECOVER Version 2.5.1p2. Contacting server on amandaclient.mydomain.com

it's connecting to amandaclient. Isn't it the client?


Try:

amrecover -s amandaserver.mydomain.com -t amandaserver.mydoman.com

ddenton
June 13th, 2007, 11:08 AM
My apologies for the confusion, let me clarify. The client and server are separate machines. I'm running amrecover from the client machine. The error message I gave you is from the client. The .amandahosts files for the respective machines are a few posts back.
The amcheck and amdump commands run from the server seem to work fine. No errors...

ktill
June 13th, 2007, 01:15 PM
here is the basic idea.

amrecover connect to the tape/index server

tape/index server's /var/lib/amanda/.amandahosts file needs to have the following line:

client-fqdn root amindexd amidxtaped


so run:

amrecover -s amandaserver.mydomain.com -t amandaserver.mydoman.com

ddenton
June 13th, 2007, 01:51 PM
Ok, I must be in need of a nap. I commented out my only_from xinetd conf statements and amrecover started working. I got it to run all the way up to the extract command. I set my host, set my disk, added selections, and set my local directory, and set my date. When I do an "ls", I see a directory listed that should have been backed up on the last amdump, now when I give the extract command, it says I must have tape DailySet1-06 loaded.

Running "/usr/sbin/amtape DailySet1 current" from the server shows that this tape is loaded. So now, when I continue with the extract command, and say yes to the next two questions, it tells me that the file I selected isn't in the archive. The email that I received after the amdump job ran indicates that something was backed up. The only thing I see that I probably shouldn't is a few GPG errors in the email, but a previous poster indicated those were just warnings. Here's the error output from running the extract command:

Extracting files using tape drive chg-disk on host TESTBED001.remitpro.com.
Load tape DailySet1-06 now
Continue [?/Y/n/s/t]? y
tar: ./mondo_stuff/mondo-doc-2.2.2-1.rhel4.noarch.rpm: Not found in archive
tar: Error exit delayed from previous errors
Extractor child exited with status 2

If possible, can you give me the command steps to specifying a particular file on a particular tape, so I can compare my steps against it? I think I'm missing something small, or maybe my backup isn't actually backing up.

Thank you VERY much for your help.

ktill
June 13th, 2007, 02:10 PM
>the command steps to specifying a particular file on a particular tape
http://wiki.zmanda.com/index.php/Amrecover

Also make sure the exact file /var/lib/amanda/.am_passphrase is in the client as well as the server.

ddenton
June 14th, 2007, 06:48 AM
It seems I had a syntax error when using amrecover, specifying the tape to use. I resolved that issue, but now I get s segmentation fault when I execute the extract command. This post has come a long way from the original question, so I'll post a new thread.

Thanks to Dustin and Ktill for the help you've provided. Hope to hear from you on the next thread!