Bug 26567 - amrecover doesn't work with remote server
amrecover doesn't work with remote server
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: amanda (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-07 17:59 EST by Rupa Schomaker
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-04 11:52:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rupa Schomaker 2001-02-07 17:59:02 EST
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
Comment 1 Trond Eivind Glomsrxd 2001-02-08 12:38:10 EST
Could you try the  amanda-devel-2.4.2-3 RPMs in Rawhide? These should fix a
number of issues...
Comment 2 Rupa Schomaker 2001-02-09 18:10:07 EST
[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)                                = ?
Comment 3 Rupa Schomaker 2001-02-09 18:13:03 EST
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)?
Comment 4 Trond Eivind Glomsrxd 2001-02-16 19:27:54 EST
Could you try the 2.4.2p1-1 RPMS at http://people.redhat.com/teg/ ?
Comment 5 Trond Eivind Glomsrxd 2001-02-22 12:46:11 EST
There is now amanda-2.4.2p1-2 RPMs at the above URL... could you please try it?
Comment 6 Rupa Schomaker 2001-02-22 20:30:59 EST
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)                                = ?
Comment 7 Rupa Schomaker 2001-03-20 15:42:21 EST
From the amanda-users mailing list -- looks like the current amanda-242-branch 
fixes this problem.  Two emails of interest.

To: Casey Scott <kc@cdstech.net>
Cc: amanda-users@amanda.org
Subject: Re: amrecover from client 
Reply-To: jrj@cc.purdue.edu
Date: Mon, 19 Mar 2001 17:30:49 -0500
From: "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
Sender: owner-amanda-users@amanda.org
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@purdue.edu

==========

From: "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
Subject: Re: amrecover from client 
To: C Scott <kc@cdstech.net>
Cc: amanda-users@amanda.org
Date: Mon, 19 Mar 2001 17:47:51 -0500
Reply-To: jrj@cc.purdue.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@purdue.edu

Comment 8 Trond Eivind Glomsrxd 2001-03-21 14:26:50 EST
Could you obtain that patch set?
Comment 9 Rupa Schomaker 2001-04-04 11:51:55 EDT
Unfortunately, the answer is:

From: "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
Subject: Re: amrecover "connection refused" on tapeserver 
To: Thomas Halm <thalm@buw-eng.de>
Cc: "amanda, mail-list" <amanda-users@amanda.org>
Date: Wed, 28 Mar 2001 15:22:57 -0500
Reply-To: jrj@cc.purdue.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@purdue.edu
Comment 10 Trond Eivind Glomsrxd 2001-04-04 17:12:06 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.