PDA

View Full Version : Amanda problem plz help


tuhin
February 27th, 2007, 10:02 PM
Dear Sir,

I have just Insall amanda. I want to keep backup data in harddrive. I have installed both server and client rpm.

In Server when I am giving amcheck DailySet1 i am getting the following error.

========================================
ERROR: backup.ranksitt.com: [can not read/write /etc/amandates: Permission denied]
Client check: 1 host checked in 0.071 seconds, 1 problem found
===========================================


/tmp/amanda/amrecover.20070228112711.debug files is bellow

================================================== =======
amcheck: debug 1 pid 25638 ruid 500 euid 0: start at Wed Feb 28 11:53:06 2007
amcheck: debug 1 pid 25638 ruid 500 euid 500: rename at Wed Feb 28 11:53:06 2007
security_getdriver(name=bsd) returns 0x954100
security_handleinit(handle=0x96bbc08, driver=0x954100 (BSD))
amcheck-clients: time 0.003: bind_portrange2: Skip port 747: Owned by fujitsu-dev.
amcheck-clients: time 0.005: bind_portrange2: Skip port 748: Owned by ris-cm.
amcheck-clients: time 0.018: bind_portrange2: Try port 749: Available - Success
amcheck-clients: time 0.018: dgram_bind: socket bound to 0.0.0.0.749
amcheck-clients: dgram_send_addr(addr=0xbf999c00, dgram=0x9550c4)
amcheck-clients: time 0.020: (sockaddr_in *)0xbf999c00 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
amcheck-clients: time 0.031: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.031: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: time 0.031: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.031: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr(addr=0xbf999a90, dgram=0x9550c4)
amcheck-clients: time 0.032: (sockaddr_in *)0xbf999a90 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
amcheck-clients: time 0.032: no feature set from host backup.ranksitt.com
security_getdriver(name=bsd) returns 0x954100
security_handleinit(handle=0x96bcdf8, driver=0x954100 (BSD))
amcheck-clients: dgram_send_addr(addr=0xbf999870, dgram=0x9550c4)
amcheck-clients: time 0.033: (sockaddr_in *)0xbf999870 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
security_close(handle=0x96bbc08, driver=0x954100 (BSD))
amcheck-clients: time 0.038: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.038: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: time 0.046: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.046: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr(addr=0xbf999a90, dgram=0x9550c4)
amcheck-clients: time 0.046: (sockaddr_in *)0xbf999a90 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
security_close(handle=0x96bcdf8, driver=0x954100 (BSD))
changer_query: changer return was 25 1
changer_query: searchable = 0
changer_find: looking for NULL changer is searchable = 0
amcheck: pid 25638 finish time Wed Feb 28 11:53:06 2007
~
==============================================


When I am taking back up i am getting the following mail.


==============================================

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

FAILURE AND STRANGE DUMP SUMMARY:
backup.ranksitt.com /soft lev 0 FAILED [missing size line from sendbackup]
backup.ranksitt.com /soft lev 0 FAILED [missing size line from sendbackup]

STATISTICS:
Total Full Incr.
-------- -------- --------
Estimate Time (hrs:min) 0:00
Run Time (hrs:min) 0:04
Dump Time (hrs:min) 0:00 0:00 0:00
Output Size (meg) 579.4 579.4 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) 289.7 289.7 0.0
Tape Used (%) 0.3 0.3 0.0
Filesystems Taped 1 1 0

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

USAGE BY TAPE:
Label Time Size % Nb Nc
DailySet1-03 0:00 296672K 0.3 1 0


FAILED AND STRANGE DUMP DETAILS:

/-- backup.ranksitt.com /soft lev 0 FAILED [missing size line from sendbackup]
sendbackup: start [backup.ranksitt.com:/soft 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
| Total bytes written: 866805760 (827MiB, 6.7MiB/s)
sendbackup: warning [opening /etc/amandates: Permission denied]sendbackup: size 846490
sendbackup: end
? dumper: strange [missing size line from sendbackup]
\--------

/-- backup.ranksitt.com /soft lev 0 FAILED [missing size line from sendbackup]
sendbackup: start [backup.ranksitt.com:/soft 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
| Total bytes written: 866805760 (827MiB, 6.9MiB/s)
sendbackup: warning [opening /etc/amandates: Permission denied]sendbackup: size 846490
sendbackup: end
? dumper: strange [missing size line from sendbackup]
\--------


NOTES:
planner: Adding new disk backup.ranksitt.com:/soft.
taper: tape DailySet1-03 kb 296672 fm 1 [OK]


DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- -------------
backup.ranks /soft 0 N/A 296672 -- N/A N/A 0:06 48056.6 PARTIAL

(brought to you by Amanda version 2.5.1p1)
=================================================

From Client machine when i am going for recovering data, giving the command as root user, amrecover its not showing anything. the debug file is bellow:

amrecover: debug 1 pid 13032 ruid 0 euid 0: start at Wed Feb 28 11:27:11 2007
Reading conf file "/etc/amanda/amanda-client.conf".
Could not open conf file "/etc/amanda/DailySet1/amanda-client.conf": No such file or directory
amrecover: debug 1 pid 13032 ruid 0 euid 0: rename at Wed Feb 28 11:27:11 2007
security_getdriver(name=bsd) returns 0x278100
security_handleinit(handle=0x85de568, driver=0x278100 (BSD))
amrecover: bind_portrange2: Try port 919: Available - Permission denied
amrecover: bind_portrange2: Try port 920: Available - Permission denied
amrecover: bind_portrange2: Try port 921: Available - Permission denied
amrecover: bind_portrange2: Try port 922: Available - Permission denied
amrecover: bind_portrange2: Skip port 993: Owned by imaps.
amrecover: bind_portrange2: Skip port 994: Owned by ircs.
amrecover: bind_portrange2: Skip port 995: Owned by pop3s.
amrecover: bind_portrange2: Skip port 996: Owned by vsinet.
amrecover: bind_portrange2: Skip port 997: Owned by maitrd.
amrecover: bind_portrange2: Skip port 998: Owned by puparp.
amrecover: bind_portrange2: Skip port 999: Owned by applix.
amrecover: bind_portrange2: Skip port 1000: Owned by cadlock2.
amrecover: bind_portrange2: Try port 1001: Available - Permission denied
amrecover: bind_portrange2: Try port 1002: Available - Permission denied
amrecover: bind_portrange2: Try port 1003: Available - Permission denied
amrecover: bind_portrange2: Try port 1004: Available - Permission denied
amrecover: bind_portrange2: Try port 1005: Available - Permission denied
amrecover: bind_portrange2: Try port 1006: Available - Permission denied
amrecover: bind_portrange2: Try port 1007: Available - Permission denied
amrecover: bind_portrange2: Try port 1008: Available - Permission denied

mrecover: bind_portrange2: Skip port 542: Owned by commerce.
amrecover: bind_portrange2: Try port 543: Available - Permission denied
amrecover: bind_portrange2: Try port 544: Available - Permission denied
amrecover: bind_portrange2: Skip port 567: Owned by banyan-rpc.
amrecover: bind_portrange2: Skip port 568: Owned by ms-shuttle.
amrecover: bind_portrange2: Skip port 569: Owned by ms-rome.
amrecover: bind_portrange2: Skip port 570: Owned by meter.
amrecover: bind_portrange2: Skip port 571: Owned by meter.
amrecover: bind_portrange2: Skip port 572: Owned by sonar.
amrecover: bind_portrange2: Skip port 573: Owned by banyan-vip.
amrecover: bind_portrange2: Skip port 574: Owned by ftp-agent.
amrecover: bind_portrange2: Skip port 575: Owned by vemmi.
amrecover: bind_portrange2: Skip port 576: Owned by ipcd.
amrecover: bind_portrange2: Skip port 577: Owned by vnas.
amrecover: bind_portrange2: Skip port 578: Owned by ipdd.
amrecover: bind_portrange2: Skip port 579: Owned by decbsrv.
amrecover: bind_portrange2: Skip port 580: Owned by sntp-heartbeat.
amrecover: bind_portrange2: Skip port 581: Owned by bdp.
amrecover: bind_portrange2: Skip port 582: Owned by scc-security.
amrecover: bind_portrange2: Skip port 583: Owned by philips-vc.
amrecover: bind_portrange2: Skip port 584: Owned by keyserver.
amrecover: bind_portrange2: Skip port 585: Owned by imap4-ssl.
amrecover: bind_portrange2: Try port 909: Available - Permission denied
amrecover: bind_portrange2: Try port 910: Available - Permission denied
amrecover: bind_portrange2: Skip port 911: Owned by xact-backup.
amrecover: bind_portrange2: Skip port 912: Owned by apex-mesh.
amrecover: bind_portrange2: Skip port 913: Owned by apex-edge.
amrecover: bind_portrange2: Try port 914: Available - Permission denied
amrecover: bind_portrange2: Try port 915: Available - Permission denied
amrecover: bind_portrange2: Try port 916: Available - Permission denied
amrecover: bind_portrange2: Try port 917: Available - Permission denied
amrecover: bind_portrange2: Try port 918: Available - Permission denied
amrecover: bind_portrange2: Try port 919: Available - Permission denied
amrecover: bind_portrange2: Try port 920: Available - Permission denied
amrecover: bind_portrange2: Try port 921: Available - Permission denied
amrecover: bind_portrange2: Try port 922: Available - Permission denied
amrecover: bind_portrange2: Try port 923: Available - Permission denied
amrecover: bind_portrange2: Try port 924: Available - Permission denied
amrecover: bind_portrange2: Try port 925: Available - Permission denied
amrecover: bind_portrange2: Try port 926: Available - Permission denied
amrecover: bind_portrange2: Try port 927: Available - Permission denied
amrecover: bind_portrange2: Try port 928: Available - Permission denied
amrecover: bind_portrange2: Try port 929: Available - Permission denied
amrecover: bind_portrange2: Try port 930: Available - Permission denied
amrecover: bind_portrange2: Try port 931: Available - Permission denied
amrecover: bind_portrange2: Try port 932: Available - Permission denied
amrecover: bind_portrange2: Try port 933: Available - Permission denied
amrecover: bind_portrange2: Try port 934: Available - Permission denied
amrecover: bind_portrange: all ports between 512 and 1023 busy
amrecover: dgram_bind: Could to bind to port in range: 512 - 1023.
amrecover: dgram_bind: socket bound to 0.0.0.0.32797
security_seterror(handle=0x85deab0, driver=0x278100 (BSD) error=unable to bind to a reserved port (got port 32797))
security_close(handle=0x85deab0, driver=0x278100 (BSD))

===============================================

Like this.

What to do? Plz help me out.

Thanks

shailen
February 28th, 2007, 09:36 AM
Hi can you post the contents of your /var/lib/amanda/.amandahosts file from your server and your client, can you also post the /etc/amanda-client.conf file from your client, please.

Also, can you check the xinetd logs at the server, to insure that the amanda services are being started.

Also, just to be sure. can you verify that the /etc/amandates, /etc/amanda/, & /var/lib/amanda/ are all owned by your amanda user (usually: amandabackup:disk)

We should first get amcheck to run successfully before even trying to backup/recover :)

tuhin
February 28th, 2007, 08:05 PM
My server name is amanda.ranksitt.net and client pc name is backup.ranksitt.com. here is the contents of server's files /var/lib/amanda/.amandahosts
==================================
localhost root amindexd amidxtaped
localhost amandabackup amdump
localhost.localdomain root amindexd amidxtaped
localhost.localdomain amandabackup amdump
backup.ranksitt.com root amindexd amidxtaped
================================

contensta of client pc's .amandahosts file

===============================
localhost amandabackup amdump
localhost.localdomain amandabackup amdump
amanda.ranksitt.net amandabackup amdump
================================

amanda is running at server side.

===============================

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 0.0.0.0:10080 0.0.0.0:*

================================

Checked /etc/amandates, /etc/amanda/, & /var/lib/amanda/ are all owned by your amanda user (usually: amandabackup:disk).

Thanks

tuhin

shailen
March 1st, 2007, 09:11 AM
can you run the following on the backup client. (backup.ranksitt.com)

ls -al /etc/amandates

Please insure that /etc/amandates is

1) owned by amandabackup:disk
2) file access permissions are set to 640

this file will most probably be EMPTY if you've NEVER ran a backup on your system.

the /etc/amandates file on "backup.ranksitt.com" should look like this.

-rw-r----- 1 amandabackup disk 56 2007-02-28 15:30 amandates


once you've done that then go ahead and run amcheck and it should complete successfully.

If it doesn't please post the OUTPUT of amcheck here.

If amcheck completes successfully then you can proceed to run your backup.

Thanks!

-Shailen

My server name is amanda.ranksitt.net and client pc name is backup.ranksitt.com. here is the contents of server's files /var/lib/amanda/.amandahosts
==================================
localhost root amindexd amidxtaped
localhost amandabackup amdump
localhost.localdomain root amindexd amidxtaped
localhost.localdomain amandabackup amdump
backup.ranksitt.com root amindexd amidxtaped
================================

contensta of client pc's .amandahosts file

===============================
localhost amandabackup amdump
localhost.localdomain amandabackup amdump
amanda.ranksitt.net amandabackup amdump
================================

amanda is running at server side.

===============================

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 0.0.0.0:10080 0.0.0.0:*

================================

Checked /etc/amandates, /etc/amanda/, & /var/lib/amanda/ are all owned by your amanda user (usually: amandabackup:disk).

Thanks

tuhin

tuhin
March 2nd, 2007, 09:58 PM
Dear Sir,

the /etc/amandates file on "backup.ranksitt.com" is looking like this.

-rw-r----- 1 amandabackup disk 56 2007-02-28 15:30 amandates


Stiall i am getting the error.

sh-3.1$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps/amanda: 9613404 KB disk space available, using 9511004 KB
slot 4: read label `DailySet1-04', date `X'
NOTE: skipping tape-writable test
Tape DailySet1-04 label ok
NOTE: conf info dir /etc/amanda/DailySet1/curinfo does not exist
NOTE: it will be created on the next run.
Server check took 0.174 seconds

Amanda Backup Client Hosts Check
--------------------------------
ERROR: backup.ranksitt.com: [can not read/write /etc/amandates: Permission denied]
Client check: 1 host checked in 0.053 seconds, 1 problem found

(brought to you by Amanda 2.5.1p1)



/tmp/amanda/server/DailySet1/amcheck.20070303114832.debug files contain he following:

================================================== ====================

amcheck: debug 1 pid 28891 ruid 500 euid 0: start at Sat Mar 3 11:48:32 2007
amcheck: debug 1 pid 28891 ruid 500 euid 500: rename at Sat Mar 3 11:48:32 2007
security_getdriver(name=bsd) returns 0x954100
security_handleinit(handle=0x9195c08, driver=0x954100 (BSD))
amcheck-clients: time 0.015: bind_portrange2: Try port 783: Available - Success
amcheck-clients: time 0.016: dgram_bind: socket bound to 0.0.0.0.783
amcheck-clients: dgram_send_addr(addr=0xbfebfd70, dgram=0x9550c4)
amcheck-clients: time 0.017: (sockaddr_in *)0xbfebfd70 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
amcheck-clients: time 0.035: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.036: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: time 0.037: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.037: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr(addr=0xbfebfc00, dgram=0x9550c4)
amcheck-clients: time 0.037: (sockaddr_in *)0xbfebfc00 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
amcheck-clients: time 0.037: no feature set from host backup.ranksitt.com
security_getdriver(name=bsd) returns 0x954100
security_handleinit(handle=0x9196e00, driver=0x954100 (BSD))
amcheck-clients: dgram_send_addr(addr=0xbfebf9e0, dgram=0x9550c4)
amcheck-clients: time 0.038: (sockaddr_in *)0xbfebf9e0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
security_close(handle=0x9195c08, driver=0x954100 (BSD))
amcheck-clients: time 0.047: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.047: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: time 0.052: dgram_recv(dgram=0x9550c4, timeout=0, fromaddr=0x9650b0)
amcheck-clients: time 0.053: (sockaddr_in *)0x9650b0 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr(addr=0xbfebfc00, dgram=0x9550c4)
amcheck-clients: time 0.053: (sockaddr_in *)0xbfebfc00 = { 2, 10080, 202.40.176.36 }
amcheck-clients: dgram_send_addr: 0x9550c4->socket = 4
security_close(handle=0x9196e00, driver=0x954100 (BSD))
changer_query: changer return was 25 1
changer_query: searchable = 0
changer_find: looking for NULL changer is searchable = 0
amcheck: pid 28891 finish time Sat Mar 3 11:48:33 2007
================================================== =======================

Thanks and waiting for your reply.

Tuhin

shailen
March 5th, 2007, 10:24 AM
Can you please post the operating system that your backup client and server are running.

Also, what versions of amanda did you install on these? did you use the rpm packages? or compile from source?

can you copy/paste the entries for

amandabackup from /etc/passwd file

as well as

disk from /etc/groups file.

please copy/paste the entire line for each of these users.

Also, another thing to try, is to rename the exisiting /etc/amandates file to amandates.old
then login as the amandabackup user and type touch /etc/amandates

then insure the permissions are correct on the /etc/amandates file (which they should be as long as the above command is ran as root)

then run amcheck and see if we get the same error.

Thanks!

-Shailen

tuhin
March 5th, 2007, 07:55 PM
Dear Sir,

operating system at both server and client are

Linux amanda.ranksitt.net 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686 i686 i386 GNU/Linux


version of amanda is amanda-backup_server-2.5.1p1-1.fc5

I used rpm package

entries of amandabackup user in /etc/passwd file is

amandabackup:x:500:6:Amanda:/var/lib/amanda:/bin/sh

and for disk in group

disk:x:6:root

I renamed the file /etc/amandates to /etc/amandates.old and tried to touch /etc/amandates to create new file as amandabackup user. But couldn't. it its telling permission denied. As /etc directory has the following permison.

drwxr-xr-x 85 root root 12288 Mar 6 09:43 etc


Plz advice.

Thanks for your cooperation.

tuhin
Dhaka, BD.

shailen
March 6th, 2007, 09:04 AM
I'm sorry please create the file as root.

then assign it the proper permissions.

touch /etc/amandates
chown amandabackup:disk /etc/amandates
chmod 640 /etc/amandates

Then try to run amcheck on your backup server.

Thanks!

-Shailen

tuhin
March 6th, 2007, 08:46 PM
Dear sir,

Still the same error.

Amanda Backup Client Hosts Check
--------------------------------
ERROR: backup.ranksitt.com: [can not read/write /etc/amandates: Permission denied]
Client check: 1 host checked in 0.044 seconds, 1 problem found


Thanks

Tuhin
Dhaka, BD.

ktill
March 7th, 2007, 07:57 AM
Hi,

is amanda service started by user amandabackup on the client?

amanda client service file should look similar to the following:

/etc/xinetd.d/amandaclient

service amanda
{
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
}

tuhin
March 7th, 2007, 08:19 PM
My /etc/xinetd.d/amanda file looks like this.

service amanda
{
only_from = amanda.ranksitt.net
socket_type = dgram
protocol = udp
wait = yes
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsd amdump
disable = no
}



Thanks

Tuhin

agrumpysnoozer
March 8th, 2007, 09:22 AM
I actually have the same problem as the OP, so I've been following along on the troubleshooting steps in this thread, hoping to find a resolution.

The client in question is a CentOS box, using the RHEL4 rpm. I have four other boxes all with an identical configuration which all work fine. It's strange, so far, this one client box is the only one I've seen that has a permissions issue with the amandates file.

ktill
March 8th, 2007, 10:23 AM
what is the permission on directory /etc, please list output of
ls -lad /etc. On my system, it's:

ls -lad /etc
drwxr-xr-x 86 root root 12288 Mar 8 09:33 /etc



Is SELinux running? sestatus will tell.

agrumpysnoozer
March 8th, 2007, 11:16 AM
drwxr-xr-x 89 root root 12288 Mar 8 04:31 /etc

and here is the result of sestatus:

SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 21
Policy from config file: targeted

agrumpysnoozer
March 8th, 2007, 11:22 AM
In my case at least, it's an issue with SELinux policy. I ran setenforce 0 to temporarily switch from enforcing to permissive and reran the amcheck and the problem was resolved. The OP may want to try this to see if it resolves his issue as well.

I'll be changing my SELinux policy accordingly. Thanks for nudging my brain in the right direction.