From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) I cannot get amrecover to connect to my remote tape server. I use "amrecover -s gw.rupa.com -t gw.rupa.com -d /dev/st0" which has index and tape server. Reproducible: Always Steps to Reproduce: 1. look above 2. 3. Actual Results: [root@shakti /]# amrecover -C DailySet1 -s gw.rupa.com -t gw.rupa.com -d /dev/st0 AMRECOVER Version 2.4.1p1. Contacting server on gw.rupa.com ... amrecover: Error connecting to server: Invalid argument The strace implies that the connect() statement is simply "wrong" but I don't see what is obviously wrong. A telnet to the expected port works: [root@shakti /tmp]# telnet 192.168.1.1 10082 Trying 192.168.1.1... Connected to 192.168.1.1. Escape character is '^]'. 220 gw AMANDA index server (2.4.1p1) ready. Running amrecover on the tape server works as expected. Expected Results: The amrecover should have worked. Here is the relavent info from strace: getpid() = 26908 bind(3, {sin_family=AF_INET, sin_port=htons(796), sin_addr=inet_addr ("127.0.0.1" )}}, 16) = 0 connect(3, {sin_family=AF_INET, sin_port=htons(10082), sin_addr=inet_addr ("192.1 68.1.1")}}, 16) = -1 EINVAL (Invalid argument) write(2, "amrecover: Error connecting to s"..., 56) = 56 write(10, "Error connecting to server\n", 27) = 27
Could you try the amanda-devel-2.4.2-3 RPMs in Rawhide? These should fix a number of issues...
[root@shakti /]# rpm -qa | grep amanda amanda-2.4.2-3 amanda-client-2.4.2-3 amanda-server-2.4.2-3 amanda-devel-2.4.2-3 (from Rawhide) [root@shakti /]# strace -o /tmp/amrecover.trace /usr/sbin/amrecover -s gw.rupa.com AMRECOVER Version 2.4.2. Contacting server on gw.rupa.com ... amrecover: Error connecting to server: Invalid argument [snip of trace] getpid() = 19007 time(NULL) = 981756957 bind(3, {sin_family=AF_INET, sin_port=htons(604), sin_addr=inet_addr("127.0.0.1" )}}, 16) = 0 connect(3, {sin_family=AF_INET, sin_port=htons(10082), sin_addr=inet_addr("192.1 68.1.1")}}, 16) = -1 EINVAL (Invalid argument) write(2, "amrecover: Error connecting to s"..., 56) = 56 write(10, "Error connecting to server\n", 27) = 27 time([981756957]) = 981756957 getpid() = 19007 write(10, "amrecover: pid 19007 finish time"..., 58) = 58 close(10) = 0 munmap(0x40017000, 4096) = 0 munmap(0x40018000, 4096) = 0 _exit(1) = ?
Ok, from looking at the strace... We're binding with fd3 and then connecting with fd3? That doesn't seem right. Shouldn't the connect be on a new fd (say 4)?
Could you try the 2.4.2p1-1 RPMS at http://people.redhat.com/teg/ ?
There is now amanda-2.4.2p1-2 RPMs at the above URL... could you please try it?
Still no good: [root@shakti /]# strace -o /tmp/amanda/trc /usr/sbin/amrecover -s gw.rupa.com - t gw.rupa.com -d /dev/nst0 AMRECOVER Version 2.4.2p1. Contacting server on gw.rupa.com ... amrecover: Error connecting to server: Invalid argument [root@shakti /]# tail -12 /tmp/amanda/trc time(NULL) = 982891683 bind(3, {sin_family=AF_INET, sin_port=htons(942), sin_addr=inet_addr ("127.0.0.1")}}, 16) = 0 connect(3, {sin_family=AF_INET, sin_port=htons(10082), sin_addr=inet_addr ("192.168.1.1")}}, 16) = -1 EINVAL (Invalid argument) write(2, "amrecover: Error connecting to s"..., 56) = 56 write(10, "Error connecting to server\n", 27) = 27 time([982891683]) = 982891683 getpid() = 27403 write(10, "amrecover: pid 27403 finish time"..., 58) = 58 close(10) = 0 munmap(0x40017000, 4096) = 0 munmap(0x40018000, 4096) = 0 _exit(1) = ?
From the amanda-users mailing list -- looks like the current amanda-242-branch fixes this problem. Two emails of interest. To: Casey Scott <kc> Cc: amanda-users Subject: Re: amrecover from client Reply-To: jrj.edu Date: Mon, 19 Mar 2001 17:30:49 -0500 From: "John R. Jackson" <jrj.purdue.edu> Sender: owner-amanda-users Precedence: bulk > I can not get amrecover to work from any clients. ... >When I try to run amrecover, I get the following error: > >#amrecover -C daily -s tapeserver > >amrecover: Error connecting to server: Invalid arguement. That section of code has been reworked in the latest 2.4.2 sources to deal with some bind() issues that may also be causing what you're seeing. Any chance you could get and install the latest stuff? >C Scott John R. Jackson, Technical Software Specialist, jrj ========== From: "John R. Jackson" <jrj.purdue.edu> Subject: Re: amrecover from client To: C Scott <kc> Cc: amanda-users Date: Mon, 19 Mar 2001 17:47:51 -0500 Reply-To: jrj.edu X-Sent: 21 hours, 53 minutes, 51 seconds ago >I am using 2.4.2p1. Should I try a development release? The changes I'm thinking of were done after 2.4.2p1 and are in the amanda-242-branch of CVS. I'd give you a set of patches except they were a little more extensive than just a few lines of diffs because they got tangled up in some other minor tweaks. >C Scott John R. Jackson, Technical Software Specialist, jrj
Could you obtain that patch set?
Unfortunately, the answer is: From: "John R. Jackson" <jrj.purdue.edu> Subject: Re: amrecover "connection refused" on tapeserver To: Thomas Halm <thalm> Cc: "amanda, mail-list" <amanda-users> Date: Wed, 28 Mar 2001 15:22:57 -0500 Reply-To: jrj.edu X-Sent: 6 days, 19 hours, 29 minutes, 42 seconds ago >i had read about problems with amrecover 2.4.2p1 in this list. I know I >need some patches to fix this problem. >Where can i get the patches and install notes? It would be difficult to supply patches for that problem. As I recall, the changes got tangled up in some other things, and there are dependencies on other patches. The best thing to do would be to get the latest CVS sources on the 2.4.2 branch. See the FAQ at www.amanda.org for instructions. >Thomas Halm John R. Jackson, Technical Software Specialist, jrj
2.4.2p2 is out which fixes this. 2.4.2p2-1 RPMs will show up in Rawhide some day, and at http://people.redhat.com/teg/amanda/ for a limited time.