Operating System - HP-UX
1832757 Members
3153 Online
110045 Solutions
New Discussion

Re: ftp between two HP-UX servers

 
SOLVED
Go to solution
Adrian Sobers2
Super Advisor

ftp between two HP-UX servers

I would like to ftp some files from one server (running HP-UX 11.11) to another server (running HP-UX 11.00).

Here is the situation:

ftp 2 files (IRDS.tar.Z, IRDS2.tar.Z) from this location on new server:

/opt/oracle/data/orabackup

to these locations on old server:

/opt/oracle12/newlogs (IRDS2.tar.Z goes here)
/opt/oracle10/backup (IRDS2.tar.Z goes here)

How do I go about this process? Latest quality and hardware enablement patches installed on both machines.
26 REPLIES 26
Sridhar Bhaskarla
Honored Contributor

Re: ftp between two HP-UX servers

Adrian,

Automating 'ftp' means hardcoding the passwords somewhere. Like .netrc or in the ftp script itself. The best way is to install openssh (you can get it from software.hp.com for free), setup public/private authentication and use 'sftp|scp' without passphrase mechanism.
If you are copying the files from systemA to systemB as the user 'oracle1 on systemA' and 'oracle2 on systemB', then follow these commands once you installed ssh.

$ssh-keygen -t dsa -N ''
( press enter for all questions)
cd .ssh
Copy id_dsa.pub file onto /tmp dir of. Logon to systemB
cd
mkdir .ssh
mv /tmp/id_dsa.key authorized_keys
chmod -R 700 ~/.ssh
(Logon to systemA)
scp some_file oracle2@systemB:/home/oracle2/some_file

It shouldn't ask for a password.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bob Smith_23
Advisor
Solution

Re: ftp between two HP-UX servers

on new server:

$ ftp oldserver


> bin
> lcd /opt/oracle/data/orabackup
> cd /opt/oracle12/newlogs
> put IRDS2.tar.Z
> cd /opt/oracle10/backup
> put IRDS2.tar.Z
> quit

$
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

When I ftp oldserver like:

# ftp 200.200.XXX.X

ftp timed out

happens all the time...
Bob Smith_23
Advisor

Re: ftp between two HP-UX servers

Sounds like ftp services may not be running on remote system.

If the IP was incorrect, you would get:

ftp: connect: No route to host
Sridhar Bhaskarla
Honored Contributor

Re: ftp between two HP-UX servers

Hi,

If you are able to ping to the server, then there is a good chance for any of these possibilities.

1. Firewall setup in between that is not allowing ftp access.
2. ftp is not enabled on the ohter host. Check the line 'ftp' in /etc/inetd.conf. It shouldn't be commented out.
3. ftp is disallowed on the other host. Check /var/adm/inetd.sec file for any filters. If you are using tcp_wrappers (you should see ftp line containing tcpd entry in your inetd.conf file.

For reasons 2 and 3, you will get 'connection refused' messages rather than timeout messages. But it doesn't hurt to validate them. For any changes related to 2 and 3, you will need to refresh inetd as (inetd -c)

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

Hi mate,
Since you are in the process of willing to learn all sorts, why not go for NFS, your RP5430 is a good candidate for a NFS server, the D350 would be the client:
You can use sam for this task:
export /opt/oracle/data/orabackup
configure to allow the other box for root access (you never know)
When done,On the D350, create a new mount point like I dont know /mt_nfs

Then mount the exported filesystem on it
mount :/opt/oracle/data/orabackup /mt_nfs
cd /mt_nfs, can you see your files? just copy them where you wish...

All the best
Victor.
P.S.
Be sure you have each box knowing about the other in /etc/host if you are not using DNS...
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

Could you please post more details steps Victor? I'm very green remember ;)

Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

On the old server, the only line in my inetd.sec that is uncommented is:

dtspc allow 127.0.0.1 loopback


In the inetd.conf here are the uncommented lines containing "ftp":

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

tftp dgram udp wait root /usr/lbin/tftpd tftpd\
/opt/ignite\
/var/opt/ignite




Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

Help? Anyone?

I can actually ftp from oldserver root prompt.

I cannot ftp from newserver root prompt.

:(
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

I can ftp newserver from newserver so it's not a problem with the ftp I'm assuming.


attached is the output from:

# netstat -r
Sridhar Bhaskarla
Honored Contributor

Re: ftp between two HP-UX servers

Hi Adrian,

Can you ping and telnet to the old server from new server?. If so, then the problem is only with ftp. If not, then it's a network problem that you would need to fix.

You would be checking ftpd configuration on 'old server'. Can you be able to ftp to the old server from any other server on the network?. How about ftp from old server to itself?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

I can ping from oldserver to newserver.

When I telnet from oldserver to newserver:

root:INLAND3>telnet 200.200.120.3
Trying...
Connected to 200.200.120.3.
Escape character is '^]'.
telnetd: /dev/pts/ta: No such file or directory
.
Local flow control off
Connection closed by foreign host.
root:INLAND3>


So is this network problem then?
Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

Sorry Adrian,
I wasnt feeling well and gone home, I will try my best to assist you but I feel very dizzy...

Lets see how you are configured network wise:
from
box1 -> ping box2
box2 -> ping box1
OK?
Now same but instead of ping-> nslookup
but with a) ip.address then hostnames

What do you have in the file /etc/nsswitch.conf?
Do you have a /etc/resolv.conf file?

Are the boxes declared in /etc/hosts?
What are the permissions on these files?
(read for every one?)

Courage!
Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

One reason if you are correctly configured (files /etc/hosts DNS...) to be able to ping and not telnet is network:
You may have some trouble with you lan interface: the interface in the box or speed/protocol mismatch it happens when it badly negociate with the switch port or if something changed...
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

I think it is a problem in the /etc/hosts file on new production server.

root:INLAND8>nslookup 200.200.120.8
Using /etc/hosts on: inland8

looking up FILES
Name: inland3.irdbb.com
Address: 200.200.120.8
Aliases: inland3

root:INLAND8>


if case is relevant then inland3 is supposed to be INLAND3 although the IP address shouldn't make a difference no?
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

I think it's problem with hosts file. Thing is it has bin listed as the owner. I can't seem to modify/save changes in the hosts file?
Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

type netstat -rn on both boxes and give us the output
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

Old Server output
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

New Server output
Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

Something i dont understand here...
Type ifconfig lan0
ifconfig lan1 on old and new box

You seem to have duplicate or its my fever...

There is a file for configuring network interfaces: /etc/rc.config.d/netconf
Check on both boxes that they have a different IP but the same netmask and gateway
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

output from new:

root:INLAND8>ifconfig lan1
lan1: flags=1843
inet 200.200.120.3 netmask ffffff00 broadcast 200.200.120.255


output from old:

root:INLAND3>ifconfig lan1
lan1: flags=843
inet 200.200.120.8 netmask ffffff00 broadcast 200.200.120.255
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

question in my netconf on oldserver I have this entry:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=200.200.120.3
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=200.200.120.255
INTERFACE_STATE[0]=down
DHCP_ENABLE[0]=0


but IP is NOT that it's actually:

200.200.120.8

there is another entry yet further down in the file:

IP_ADDRESS[1]=200.200.120.8
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=200.200.120.255
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0

which has the correct info....


is that wrong IP entry on old server in netconf the culprit? seems fishy...
Adrian Sobers2
Super Advisor

Re: ftp between two HP-UX servers

I'm out of office until 18th October. I'll leave this thread open and follow up then ok? Thanks a lot for all your help. It's Friday and this Oracle DBA has seen enough of UNIX for one week ;)

Victor BERRIDGE
Honored Contributor

Re: ftp between two HP-UX servers

Ok,
This means you had 2 cards configured lan0 whith the address of the other box but it is down I would be sure it is not connected in case somebody by accident brings it back up OR change the address...
So I wonder in the /etc/hosts of the old box if you dont have anything with the address X.X.X.3 with its own hostname...

Once you doublechecked these files and put them right I would suggest a man of lanadmin because I dont remember if -x or -X you need to see the configuration of your card one tells you how it is configured e.g. 100FD for 100Mb Full Duplex - the other is to set the value...
once you know how it is configured, check how the pots of you switches are, if you are using 100FD then be sure to fix both sides (port - box card) turning off Autonegociation