Re: amrecover: cannot connect to host (connection refused)

2001-02-01 Thread John R. Jackson

After looking at this some more, I can't figure out why we are not
using the Amanda stream_client function which already does all the right
things (and does **not** bind specific host addresses).  So if someone
who's having this problem could give the following a try instead of the
previous attempt and let me know, I'd appreciate it.

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

 amrecover.diff


Re: amrecover: cannot connect to host (connection refused)

2001-01-30 Thread John R. Jackson

>This is what the amrecover sends to stdout:
>
>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>amrecover: Unexpected server end of file
>
>And this is what I found in /var/log/messages:
>...
>Jan 29 07:52:07 myhost xinetd[1318]: warning: can't get client
>address: Invalid argument

Stan Brown worked on this almost a year ago and came up with the following
patch, which I lost in my inbox (sigh).  Please give it a try and let
me know if it works so I can (finally) get it into a release.

>Jan 29 07:52:07 myhost xinetd[1318]: file descriptor of service
>amandaidx has been closed
>...
>This happens only the very first time, if I try to connect
>via amrecover the next time, nothing happens in the syslog,
>but the amrecover client barfs:
>
>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>amrecover: Error connecting to server: Connection refused

That's because xinetd was **very** unhappy :-) and shut down the amandaidx
service (see the message it logged).  So there isn't anyone listening
any more.

I don't know how xinetd does it, but other versions of inetd will reenable
a service after (e.g.) 10 minutes, or if you HUP them.

>Sebastian

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

 amrecover.diff


Re: amrecover: cannot connect to host (connection refused)

2001-01-30 Thread Sebastian Frankfurt

Gerhard den Hollander wrote:

> * Sebastian Frankfurt <[EMAIL PROTECTED]> (Tue, Jan 30, 2001 at 10:27:41AM +0100)
> 
>> Mack Earnhardt wrote:
>> 
>> 
>>> I was getting connection refused on amrecover for a while.  The 
>>> ..amandahosts file allowed access to root@localhost, but amrecover would 
>>> use root@servername and fail.  My solution was to use the server name 
>>> explicitly in both .amandahosts and disklist.
>>> 
>>> Hope this help one of your problems. :)
>> 
>> Well thanx for the tip, but it doesn't matter, what I put into
>> the .amandahosts because the error I get is:
>> 
>>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>>amrecover: Unexpected server end of file
> 
> 
> Did you check the files in /tmp/amanda 
> (on server and client) ?

I have had a look at them don't see anything wrong :-(


amrecover:

   amrecover: debug 1 pid 1554 ruid 0 euid 0 start time Tue Jan 30 
10:28:33 2001
   Error connecting to server
   amrecover: pid 1554 finish time Tue Jan 30 10:28:33 2001




I will attach all /tmp/amanda files.

thanx,

Sebastian

PS: rsh commands works properly for root and operator



amandad: debug 1 pid 1495 ruid 11 euid 11 start time Tue Jan 30 10:25:31 2001
amandad: version 2.4.1p1
amandad: build: VERSION="Amanda-2.4.1p1"
amandad:BUILT_DATE="Mon Aug 21 16:31:37 EDT 2000"
amandad:BUILT_MACH="Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 2 
09:11:51 EDT 1999 i686 unknown"
amandad:CC="gcc"
amandad: paths: bindir="/usr/bin" sbindir="/usr/sbin"
amandad:libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
amandad:CONFIG_DIR="/etc/amanda" DEV_PREFIX="/dev/"
amandad:RDEV_PREFIX="/dev/r" DUMP="/sbin/dump"
amandad:RESTORE="/sbin/restore" SAMBA_CLIENT="/usr/bin/smbclient"
amandad:GNUTAR="/bin/tar" COMPRESS_PATH="/usr/bin/gzip"
amandad:UNCOMPRESS_PATH="/usr/bin/gzip" MAILER="/usr/bin/Mail"
amandad:listed_incr_dir="/var/lib/amanda/gnutar-lists"
amandad: defs:  DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
amandad:DEFAULT_TAPE_SERVER="localhost"
amandad:DEFAULT_TAPE_DEVICE="/dev/null" HAVE_MMAP HAVE_SYSVSHM
amandad:LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE BSD_SECURITY
amandad:USE_AMANDAHOSTS CLIENT_LOGIN="operator" FORCE_USERID
amandad:HAVE_GZIP COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
amandad:COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"
got packet:

Amanda 2.4 REQ HANDLE 000-90D50508 SEQ 980846701
SECURITY USER operator
SERVICE sendbackup
OPTIONS hostname=localhost;
GNUTAR /etc 1 2001:1:27:2:25:7 OPTIONS 
|;bsd-auth;compress-fast;index;exclude-list=/usr/local/lib/amanda/exclude.gtar;


sending ack:

Amanda 2.4 ACK HANDLE 000-90D50508 SEQ 980846701


bsd security: remote host localhost user operator local user operator
amandahosts security check passed
amandad: running service "/usr/lib/amanda/sendbackup"
amandad: sending REP packet:

Amanda 2.4 REP HANDLE 000-90D50508 SEQ 980846701
CONNECT DATA 1297 MESG 1298 INDEX 1299
OPTIONS ;compress-fast;bsd-auth;index;exclude-list=/usr/local/lib/amanda/exclude.gtar;


amandad: got ack:

Amanda 2.4 ACK HANDLE 000-90D50508 SEQ 980846701


amandad: pid 1495 finish time Tue Jan 30 10:25:31 2001


amrecover: debug 1 pid 1639 ruid 0 euid 0 start time Tue Jan 30 10:59:36 2001
Error connecting to server
amrecover: pid 1639 finish time Tue Jan 30 10:59:36 2001


amtrmidx: debug 1 pid 1541 ruid 11 euid 11 start time Tue Jan 30 10:25:32 2001
/usr/lib/amanda/amtrmidx: version 2.4.1p1
Keeping 26 index files
localhost /etc
amtrmidx: pid 1541 finish time Tue Jan 30 10:25:40 2001


killpgrp: debug 1 pid 2007 ruid 11 euid 0 start time Sat Jan 27 03:16:49 2001
/usr/lib/amanda/killpgrp: version 2.4.1p1
sending SIGTERM to process group 2007
child process exited with status 3


runtar: debug 1 pid 1500 ruid 11 euid 0 start time Tue Jan 30 10:25:31 2001
gtar: version 2.4.1p1
running: /bin/tar: gtar --create --directory /etc --listed-incremental 
/var/lib/amanda/gnutar-lists/localhost_etc_1.new --sparse --one-file-system 
--ignore-failed-read --totals --file - . 


selfcheck: debug 1 pid 1453 ruid 11 euid 11 start time Tue Jan 30 10:20:01 2001
/usr/lib/amanda/selfcheck: version 2.4.1p1
checking disk /etc: device /etc: OK
selfcheck: pid 1453 finish time Tue Jan 30 10:20:01 2001


sendbackup: debug 1 pid 1496 ruid 11 euid 11 start time Tue Jan 30 10:25:31 2001
/usr/lib/amanda/sendbackup: got input request: GNUTAR /etc 1 2001:1:27:2:25:7 OPTIONS 
|;bsd-auth;compress-fast;index;exclude-list=/usr/local/lib/amanda/exclude.gtar;
  parsed request as: program `GNUTAR' disk `/etc' lev 1 since 2001:1:27:2:25:7 opt 
`|;bsd-auth;compress-fast;index;exclude-list=/usr/local/lib/amanda/exclude.gtar;'
sendbackup: exclude list file "/usr/local/lib/amanda/exclude.gtar" does not exist, 
ignoring
  waiting for connect on 1297, then 1298, then 1299
  got all connections
sendback

Re: amrecover: cannot connect to host (connection refused)

2001-01-30 Thread Gerhard den Hollander

* Sebastian Frankfurt <[EMAIL PROTECTED]> (Tue, Jan 30, 2001 at 10:27:41AM +0100)
> Mack Earnhardt wrote:
> 
> > I was getting connection refused on amrecover for a while.  The 
> > ..amandahosts file allowed access to root@localhost, but amrecover would 
> > use root@servername and fail.  My solution was to use the server name 
> > explicitly in both .amandahosts and disklist.
> > 
> > Hope this help one of your problems. :)
> 
> Well thanx for the tip, but it doesn't matter, what I put into
> the .amandahosts because the error I get is:
> 
>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>amrecover: Unexpected server end of file

Did you check the files in /tmp/amanda 
(on server and client) ?

Kind regards,
 --
Gerhard den Hollander   Phone +31-10.280.1515
Technical Support Jason Geosystems BV   Fax   +31-10.280.1511
   (When calling please note: we are in GMT+1)
[EMAIL PROTECTED]  POBox 1573
visit us at http://www.jasongeo.com 3000 BN Rotterdam  
JASON...#1 in Reservoir CharacterizationThe Netherlands

  This e-mail and any attachment is/are intended solely for the named
  addressee(s) and may contain information that is confidential and privileged.
   If you are not the intended recipient, we request that you do not
 disseminate, forward, distribute or copy this e-mail message.
  If you have received this e-mail message in error, please notify us
   immediately by telephone and destroy the original message.



Re: amrecover: cannot connect to host (connection refused)

2001-01-30 Thread Sebastian Frankfurt

Mack Earnhardt wrote:

> I was getting connection refused on amrecover for a while.  The 
> ..amandahosts file allowed access to root@localhost, but amrecover would 
> use root@servername and fail.  My solution was to use the server name 
> explicitly in both .amandahosts and disklist.
> 
> Hope this help one of your problems. :)

Well thanx for the tip, but it doesn't matter, what I put into
the .amandahosts because the error I get is:

   AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
   amrecover: Unexpected server end of file


That means, amrecover is able to connect to the localhost
and amandaidx has been started but unexpected closed
seen in the log:

   Jan 29 07:51:51 myhost xinetd[1318]: xinetd Version 2.1.8.9pre11
   started with
   Jan 29 07:51:51 myhost xinetd[1318]: libwrap
   Jan 29 07:51:51 myhost xinetd[1318]: options compiled in.
   Jan 29 07:51:51 myhost xinetd[1318]: Started working: 8 available
   services
   Jan 29 07:51:54 myhost xinetd: xinetd startup succeeded
   Jan 29 07:52:07 myhost xinetd[1318]: warning: can't get client
   address: Invalid argument
   Jan 29 07:52:07 myhost xinetd[1318]: file descriptor of service
   amandaidx has been closed
   Jan 29 07:52:07 myhost xinetd[1318]: select reported EBADF but no bad
   file descriptors were found

any other suggestions? I'm a bit confused about this.

thanx in advance,

Sebastian

> 
> -Mack
> 
> Sebastian Frankfurt wrote:
> 
>> Hello,
>> 
>> I am using RedHat 7.0 with xinetd-2.1.8.9pre11-1.
>> amcheck and amdump are working properly, but if I want
>> to restore files from dump using amrecover, the tool
>> is not working.
>> Everything is called from the same host (localhost).
>> 
>> This is what the amrecover sends to stdout:
>> 
>>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>>amrecover: Unexpected server end of file
>> 
>> 
>> And this is what I found in /var/log/messages:
>> 
>>Jan 29 07:51:51 myhost xinetd[1318]: xinetd Version 2.1.8.9pre11
>> started with
>>Jan 29 07:51:51 myhost xinetd[1318]: libwrap
>>Jan 29 07:51:51 myhost xinetd[1318]: options compiled in.
>>Jan 29 07:51:51 myhost xinetd[1318]: Started working: 8 available
>> services
>>Jan 29 07:51:54 myhost xinetd: xinetd startup succeeded
>>Jan 29 07:52:07 myhost xinetd[1318]: warning: can't get client
>> address: Invalid argument
>>Jan 29 07:52:07 myhost xinetd[1318]: file descriptor of service
>> amandaidx has been closed
>>Jan 29 07:52:07 myhost xinetd[1318]: select reported EBADF but no bad
>> file descriptors were found
>> 
>> 
>> I think, the problem is:
>> 
>>  warning: can't get client address: Invalid argument
>> 
>> but do you know when this could happened?
>> 
>> 
>> This happens only the very first time, if I try to connect
>> via amrecover the next time, nothing happens in the syslog,
>> but the amrecover client barfs:
>> 
>>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>>amrecover: Error connecting to server: Connection refused
>> 
>> 
>> It is possible for operator and root to do an rsh localhost .
>> 




Re: amrecover: cannot connect to host (connection refused)

2001-01-29 Thread Mack Earnhardt

I was getting connection refused on amrecover for a while.  The 
.amandahosts file allowed access to root@localhost, but amrecover would 
use root@servername and fail.  My solution was to use the server name 
explicitly in both .amandahosts and disklist.

Hope this help one of your problems. :)

-Mack

Sebastian Frankfurt wrote:

> Hello,
> 
> I am using RedHat 7.0 with xinetd-2.1.8.9pre11-1.
> amcheck and amdump are working properly, but if I want
> to restore files from dump using amrecover, the tool
> is not working.
> Everything is called from the same host (localhost).
> 
> This is what the amrecover sends to stdout:
> 
>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>amrecover: Unexpected server end of file
> 
> 
> And this is what I found in /var/log/messages:
> 
>Jan 29 07:51:51 myhost xinetd[1318]: xinetd Version 2.1.8.9pre11
> started with
>Jan 29 07:51:51 myhost xinetd[1318]: libwrap
>Jan 29 07:51:51 myhost xinetd[1318]: options compiled in.
>Jan 29 07:51:51 myhost xinetd[1318]: Started working: 8 available
> services
>Jan 29 07:51:54 myhost xinetd: xinetd startup succeeded
>Jan 29 07:52:07 myhost xinetd[1318]: warning: can't get client
> address: Invalid argument
>Jan 29 07:52:07 myhost xinetd[1318]: file descriptor of service
> amandaidx has been closed
>Jan 29 07:52:07 myhost xinetd[1318]: select reported EBADF but no bad
> file descriptors were found
> 
> 
> I think, the problem is:
> 
>  warning: can't get client address: Invalid argument
> 
> but do you know when this could happened?
> 
> 
> This happens only the very first time, if I try to connect
> via amrecover the next time, nothing happens in the syslog,
> but the amrecover client barfs:
> 
>AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
>amrecover: Error connecting to server: Connection refused
> 
> 
> It is possible for operator and root to do an rsh localhost .
> 
> The permissions for /root/.rhosts
> -rw---1 root root25 Jan 28 23:44 /root/.rhosts
> 
> The permissions for /root/.amandahosts
> -rw---1 operator disk   107 Jan 29 00:29 /root/.amandahosts
> 
> Amanda-User: operator
> User Operator is in 'disk' group.
> 
> If you need the information of /etc/xinet.d/am*
> I will attach these files. I tried to use the amanda inetd-entries
> w/o tcp_wrappers, but the errors are still the same.
> 
> I will also put the debug output of /tmp/amanda to this mail.
> 
> So, I am not subscribed to the mailing list, please
> do a CC to mailto:[EMAIL PROTECTED]
> 
> Any suggestions?
> 
> thanx in advance,
> 
> Sebastian
> 
> 
> 
> 
> # default: on
> #
> # description: Part of the Amanda server package
> 
> service amanda
> {
>   socket_type = dgram
>   protocol= udp
>   wait= yes
>   user= operator
>   group   = disk
>   server  = /usr/lib/amanda/amandad 
>   disable = no
> }
> 
> 
> 
> 
> # default: off
> #
> # description: Part of the Amanda server package
> #
> 
> service amandaidx
> {
>   socket_type = stream
>   protocol= tcp
>   wait= yes
>   user= operator
>   group   = disk
>   server  = /usr/lib/amanda/amindexd 
>   disable = no
> }
> 
> 
> 
> 
> # default: off
> #
> # description: Part of the amanda server package
> #
> 
> service amidxtape
> {
>   socket_type = stream
>   protocol= tcp
>   wait= no
>   user= operator
>   group   = disk
>   server  = /usr/lib/amanda/amidxtaped
>   disable = no
> }
> 
> 
> 
> 
> amandad: debug 1 pid 932 ruid 11 euid 11 start time Mon Jan 29 07:34:19 2001
> amandad: version 2.4.1p1
> amandad: build: VERSION="Amanda-2.4.1p1"
> amandad:BUILT_DATE="Mon Aug 21 16:31:37 EDT 2000"
> amandad:BUILT_MACH="Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 
>2 09:11:51 EDT 1999 i686 unknown"
> amandad:CC="gcc"
> amandad: paths: bindir="/usr/bin" sbindir="/usr/sbin"
> amandad:libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
> amandad:CONFIG_DIR="/etc/amanda" DEV_PREFIX="/dev/"
> amandad:RDEV_PREFIX="/dev/r" DUMP="/sbin/dump"
> amandad:RESTORE="/sbin/restore" SAMBA_CLIENT="/usr/bin/smbclient"
> amandad:GNUTAR="/bin/tar" COMPRESS_PATH="/usr/bin/gzip"
> amandad:UNCOMPRESS_PATH="/usr/bin/gzip" MAILER="/usr/bin/Mail"
> amandad:   

amrecover: cannot connect to host (connection refused)

2001-01-28 Thread Sebastian Frankfurt

Hello,

I am using RedHat 7.0 with xinetd-2.1.8.9pre11-1.
amcheck and amdump are working properly, but if I want
to restore files from dump using amrecover, the tool
is not working.
Everything is called from the same host (localhost).

This is what the amrecover sends to stdout:

AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
amrecover: Unexpected server end of file


And this is what I found in /var/log/messages:

Jan 29 07:51:51 myhost xinetd[1318]: xinetd Version 2.1.8.9pre11
started with
Jan 29 07:51:51 myhost xinetd[1318]: libwrap
Jan 29 07:51:51 myhost xinetd[1318]: options compiled in.
Jan 29 07:51:51 myhost xinetd[1318]: Started working: 8 available
services
Jan 29 07:51:54 myhost xinetd: xinetd startup succeeded
Jan 29 07:52:07 myhost xinetd[1318]: warning: can't get client
address: Invalid argument
Jan 29 07:52:07 myhost xinetd[1318]: file descriptor of service
amandaidx has been closed
Jan 29 07:52:07 myhost xinetd[1318]: select reported EBADF but no bad
file descriptors were found


I think, the problem is:

  warning: can't get client address: Invalid argument

but do you know when this could happened?


This happens only the very first time, if I try to connect
via amrecover the next time, nothing happens in the syslog,
but the amrecover client barfs:

AMRECOVER Version 2.4.1p1. Contacting server on localhost ...
amrecover: Error connecting to server: Connection refused


It is possible for operator and root to do an rsh localhost .

The permissions for /root/.rhosts
-rw---1 root root25 Jan 28 23:44 /root/.rhosts

The permissions for /root/.amandahosts
-rw---1 operator disk   107 Jan 29 00:29 /root/.amandahosts

Amanda-User: operator
User Operator is in 'disk' group.

If you need the information of /etc/xinet.d/am*
I will attach these files. I tried to use the amanda inetd-entries
w/o tcp_wrappers, but the errors are still the same.

I will also put the debug output of /tmp/amanda to this mail.

So, I am not subscribed to the mailing list, please
do a CC to mailto:[EMAIL PROTECTED]

Any suggestions?

thanx in advance,

Sebastian



# default: on
#
# description: Part of the Amanda server package

service amanda
{
socket_type = dgram
protocol= udp
wait= yes
user= operator
group   = disk
server  = /usr/lib/amanda/amandad 
disable = no
}



# default: off
#
# description: Part of the Amanda server package
#

service amandaidx
{
socket_type = stream
protocol= tcp
wait= yes
user= operator
group   = disk
server  = /usr/lib/amanda/amindexd 
disable = no
}



# default: off
#
# description: Part of the amanda server package
#

service amidxtape
{
socket_type = stream
protocol= tcp
wait= no
user= operator
group   = disk
server  = /usr/lib/amanda/amidxtaped
disable = no
}



amandad: debug 1 pid 932 ruid 11 euid 11 start time Mon Jan 29 07:34:19 2001
amandad: version 2.4.1p1
amandad: build: VERSION="Amanda-2.4.1p1"
amandad:BUILT_DATE="Mon Aug 21 16:31:37 EDT 2000"
amandad:BUILT_MACH="Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 2 
09:11:51 EDT 1999 i686 unknown"
amandad:CC="gcc"
amandad: paths: bindir="/usr/bin" sbindir="/usr/sbin"
amandad:libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
amandad:CONFIG_DIR="/etc/amanda" DEV_PREFIX="/dev/"
amandad:RDEV_PREFIX="/dev/r" DUMP="/sbin/dump"
amandad:RESTORE="/sbin/restore" SAMBA_CLIENT="/usr/bin/smbclient"
amandad:GNUTAR="/bin/tar" COMPRESS_PATH="/usr/bin/gzip"
amandad:UNCOMPRESS_PATH="/usr/bin/gzip" MAILER="/usr/bin/Mail"
amandad:listed_incr_dir="/var/lib/amanda/gnutar-lists"
amandad: defs:  DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
amandad:DEFAULT_TAPE_SERVER="localhost"
amandad:DEFAULT_TAPE_DEVICE="/dev/null" HAVE_MMAP HAVE_SYSVSHM
amandad:LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE BSD_SECURITY
amandad:USE_AMANDAHOSTS CLIENT_LOGIN="operator" FORCE_USERID
amandad:HAVE_GZIP COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
amandad:COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"
got packet:

Amanda 2.4 REQ HANDLE 000-90D50508 SEQ 980750029
SECURITY USER operator
SERVICE sendbackup
OPTIONS hostname=localhost;
GNUTAR /etc 1 2001:1:27:2:25:7 OPTIONS 
|;bsd-auth;compress-fast;index;exclude-list=/usr/local/lib/amanda/exclude.gtar;


sending ack:

Amanda 2.4 ACK HANDLE 000-90D50508 SEQ 980750029
-