PDA

View Full Version : xinetd fail to start amindexd on eth0 but works on localhost



nokernel
August 21st, 2006, 12:22 PM
So here is a good one.

I am having some problems to connect to my server using amrecover. The thing is that it works if I try to connect to the localhost, but it fails on the public Interface.

Same thing if I try to telnet in to the port of amindexd. When I try to connect to my public interface I see in the xinetd logs that he tries to start /usr/local/libexec/amindexd but fails. There is no amindexd*.debug file created at this time.

The owner/permission on that amindexd file is good, since it works if I connect to the localhost.

Here is my xinetd entry

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

Anyone have a clue?

paddy
August 21st, 2006, 01:52 PM
Are you running amrecover as root?

Is .amandahosts on the server set up to allow access as root?

Paddy

nokernel
August 22nd, 2006, 07:21 AM
Yes I run amrecover as root. For now I am trying amrecover on the backup host. I tryed with my firewall down, but the thing is not the firewall or .amandahost it is that amaindexd is not starting when I try to connect to anything else than localhost.

paddy
August 22nd, 2006, 07:58 AM
Can you please send output of amrecover command? Any amrecover errors?
Any information in amrecover debug logs on the client?

Which version of amanda are you using?

Can you try connecting using amrecover -s option?

#amrecover -s "amanda tape server" <configuration name>

Paddy

nokernel
August 22nd, 2006, 08:07 AM
I am running amrecover 2.4.4p4

Here is the command
amrecover -t host -s host

And the output
amrecover: Unexpected end of file, check amindexd*debug on server host

And there is no amindexd*debug created.

If I look at xinetd's log
Aug 22 11:53:36 localhost xinetd[27147]: START: amandaidx pid=27197 from=132.204.202.186
Aug 22 11:53:36 localhost xinetd[27197]: FAIL: amandaidx address from=132.204.202.186

So this is why there is no debug files on the server host.
I am getting the same error if I turn off my firewall.

And the thing works if I do
amrecover -s localhost -t localhost

ktill
August 22nd, 2006, 12:30 PM
amidxtape also needs to be in xinetd entry, example:

service amidxtape
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amanda
group = disk
groups = yes
server = /usr/local/libexec/amidxtaped
}

add the above entry, restart xinetd to see if there is any error message in /var/log/messages.

Then on the server:
amcleanup config_name

finally try recover by doing:
amrecover config_name -t host -s host

nokernel
August 24th, 2006, 07:03 AM
Yes unfortunately amidxtape is already in xinetd conf. What I understand in all that it is that amandaidx dont want to bind to a network interface other than localhost.

I am really out of ideas now, I have the vague feeling that I am turning in circle.

nokernel
August 25th, 2006, 07:26 AM
And here is the solution of the problem!

I am using gentoo. They have some default sets into xinetd.conf and one of those defaults is

only_from localhost

So I removed the only_from localhost line and I am now able to connect to the index server from anywhere I want!