2007-01-08 10:33:13

by oudoubah

[permalink] [raw]
Subject: nfs over ssh : invalid protocol

Hi,

I try to mount a nfs share over ssh with this commands (in a script) :
ssh -f -L${NFSPORT}:${IPSERVER}:2049 -L${NFSMOUNTPORT}:${IPSERVER}:32767
-l root ${IPSERVER} sleep 60
mount -t nfs -o
tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=$NFSPORT,mountport=$NFSMOUNTPORT
$NOMSERVER:/$REPSERVER $REP

The tunnel is OK. The mount command works on some servers, but on other
servers i have an error message. Here is what i see on the term :
ssh -f -L38000:10.0.0.1:2049 -L38001:10.0.0.1:32767 -l save 10.0.0.1 sleep 60
[OK]
mount -t nfs -o
tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=38000,mountport=38001
localhost:/images /tmp/save.11601
mount to NFS server 'localhost' failed: possible invalid protocol.
[KO]

There is a firewall between the two servers, and only the port 22 and 111
are open.

Do you have any idea?

Thanks!

Oudoubah


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2007-01-08 13:34:56

by Pierre Lombard

[permalink] [raw]
Subject: Re: nfs over ssh : invalid protocol

On 1/8/07, [email protected] <[email protected]> wrote:

> I try to mount a nfs share over ssh with this commands (in a script) :
> ssh -f -L${NFSPORT}:${IPSERVER}:2049 -L${NFSMOUNTPORT}:${IPSERVER}:32767
> -l root ${IPSERVER} sleep 60
> mount -t nfs -o
> tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=$NFSPORT,mountport=$NFSMOUNTPORT
> $NOMSERVER:/$REPSERVER $REP
>
> The tunnel is OK. The mount command works on some servers, but on other
> servers i have an error message. Here is what i see on the term :
> ssh -f -L38000:10.0.0.1:2049 -L38001:10.0.0.1:32767 -l save 10.0.0.1 sleep 60
> [OK]
> mount -t nfs -o
> tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=38000,mountport=38001
> localhost:/images /tmp/save.11601
> mount to NFS server 'localhost' failed: possible invalid protocol.
> [KO]

> There is a firewall between the two servers, and only the port 22 and 111
> are open.
>
> Do you have any idea?

Maybe mountd is not running on port 32767 for those very servers - did
you check with rpcinfo ?

--
Pierre

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-01-08 14:15:18

by oudoubah

[permalink] [raw]
Subject: Re: nfs over ssh : invalid protocol


>> ssh -f -L38000:10.0.0.1:2049 -L38001:10.0.0.1:32767 -l save 10.0.0.1
>> sleep 60
>> mount -t nfs -o
>> tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=38000,mountport=38001
>> localhost:/images /tmp/save.11601
>> mount to NFS server 'localhost' failed: possible invalid protocol.

>> There is a firewall between the two servers, and only the port 22 and
>> 111
>> are open.
>>

>
> Maybe mountd is not running on port 32767 for those very servers - did
> you check with rpcinfo ?

On the client :
# rpcinfo -p 10.0.0.1
program no_version protocole no_port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32765 status
100024 1 tcp 32765 status
100011 1 udp 32769 rquotad
100011 2 udp 32769 rquotad
100011 1 tcp 32769 rquotad
100011 2 tcp 32769 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 udp 57059 nlockmgr
100021 3 udp 57059 nlockmgr
100021 4 udp 57059 nlockmgr
100021 1 tcp 32768 nlockmgr
100021 3 tcp 32768 nlockmgr
100021 4 tcp 32768 nlockmgr
100005 1 udp 32767 mountd
100005 1 tcp 32767 mountd
100005 2 udp 32767 mountd
100005 2 tcp 32767 mountd
100005 3 udp 32767 mountd
100005 3 tcp 32767 mountd


On the nfs server :
#cat /etc/sysconfig/nfs
STATD_PORT=32765
STATD_OUTGOING_PORT=32766
MOUNTD_PORT=32767
LOCKD_TCPPORT=32768
RQUOTAD_PORT=32769

I have the problem on 2 computers. One is in the same network and is not
firewalled. I tried to mount the nfs (without ssh tunnel), and it works.
The problem appears only when i try to make the encapsulation.

(I don't know if my problem is best for nfs mailing-list or ssh mailing
list.)

Oudoubah


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-01-09 05:56:38

by Adrian Phillips

[permalink] [raw]
Subject: Re: nfs over ssh : invalid protocol

>>>>> "Oudoubah" == oudoubah <[email protected]> writes:

Oudoubah> There is a firewall between the two servers, and only
Oudoubah> the port 22 and 111 are open.

Try openvpn through one of these ports instead.

Sincerely,

Adrian Phillips

--
Who really wrote the works of William Shakespeare ?
http://www.pbs.org/wgbh/pages/frontline/shakespeare/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-01-09 08:50:06

by oudoubah

[permalink] [raw]
Subject: Re: nfs over ssh : invalid protocol

> Oudoubah> There is a firewall between the two servers, and only
> Oudoubah> the port 22 and 111 are open.
>
> Try openvpn through one of these ports instead.

One of the server is critical, so i'm not allowed to install anything on
it. But thanks for the advice.

> Does forcing the use of a protocol version (for instance nfsvers=3) help ?

It doesn't help

> Is it really possible to use statd/lockd over SSH? Otherwise, I would try
mounting with "nolock".

I tried with this option, but the error still occurs.


> If that fails, a Wireshark trace should give you a hint. Another hint is
> that some versions of Fedora and RHEL have a broken mount command (unless
> the updates are installed), see
>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140016.

The two servers are Red Hat 3.4.3-9.EL4. I'll search if i'm concerned by
the bug.
How can i do a wireshark trace?

Oudoubah


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs