Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

9P on linux

137 views
Skip to first unread message

jhutc...@gmail.com

unread,
Jan 14, 2008, 4:56:55 AM1/14/08
to
I am having trouble getting 9P working on my linux box. Firstly u9fs:
I have followed the directions on http://www.t3x.org/bits/plan9_on_u9fs.html
and put put this line in /etc/inetd.conf

u9fs stream tcp nowait root /root/bin/u9fs u9fs -Dz -a
p9any /scratch/p9root

the only client I have even been able to run is this one:
http://www.lava.net/~newsham/plan9/

when I try to connect with it using: ./cl.py glenda localhost
I get 'localhost: Connection refused'

this is my /tmp/u9fs.log:
u9fs
kill 24633
<- Tversion tag 65535 msize 16384 version '9P2000'
-> Rversion tag 65535 msize 8216 version '9P2000'
<- Tauth tag 1 afid 10 uname glenda aname
p9anyauth: afid 10
-> Rauth tag 1 qid (0000000000000001 0 A)
<- Tread tag 1 fid 10 offset 0 count 128
p9anyread: afid 10 state 0
-> Rread tag 1 count 12 '7039736b 31406c6f 63616c00'
<- Twrite tag 1 fid 10 offset 12 count 12 '7039736b 31206c6f 63616c00'
p9anywrite: afid 10 state 1
-> Rwrite tag 1 count 12
<- Twrite tag 1 fid 10 offset 24 count 8 '79a74fbb a471ed31'
p9anywrite: afid 10 state 2
-> Rwrite tag 1 count 8
<- Tread tag 1 fid 10 offset 32 count 141
p9anyread: afid 10 state 3
-> Rread tag 1 count 141 '01676c65 6e646100 00000000 00000000 00000000
00000000 00000000 006c6f63 616c0000 00000000 00000000 00000000
00000000 00000000 00000000 00000000'
u9fs: couldn't read message
last unix error: No such file or directory

I have created a user called 'glenda' with password 'glenda' and
copied that into /scratch/p9root/etc also I have created /scratch/
p9root/etc/u9fs.key with:
glenda
glenda
local

I have also tried various combinations of usenames and passwords and '-
a none' for u9fs in inetd.conf none of which has worked.

Secondly, when I have tried the 9pfuse client I get this:

root@box:~/9pfuse# ./9pfuse 'tcp!127.0.0.1!564' /mnt
error: fid unknown or out of range
connect error: fid unknown or out of range

I can't find any information on this error either. If anyone can help
with either of these problems, please do. If all you can say is "RTFM"
believe me I have RTFM many times and despite the supposedly simple
nature of these tools, they remain non-intuitive for a novice like me.

Rodolfo kix García

unread,
Jan 14, 2008, 5:15:15 AM1/14/08
to
Probably is stupid but ...

after editing inetd.conf you reloaded the service with /etc/init.d/inetd
restart ?

slds.


--
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)

Eric Van Hensbergen

unread,
Jan 14, 2008, 8:38:53 AM1/14/08
to

This looks like things are falling down in auth. Why don't you try an
unauthenticated connection first?

>
> root@box:~/9pfuse# ./9pfuse 'tcp!127.0.0.1!564' /mnt
> error: fid unknown or out of range
> connect error: fid unknown or out of range
>

Harder to tell what is going on without any kind of log, but I'm
suspicious its once again some sort of auth problem. You may want to
switch from u9fs to spfs (or one of the other servers).

-eric

sqweek

unread,
Jan 14, 2008, 1:54:13 PM1/14/08
to
On Jan 14, 2008 6:56 PM, <jhutc...@gmail.com> wrote:
> I am having trouble getting 9P working on my linux box. Firstly u9fs:
> I have followed the directions on http://www.t3x.org/bits/plan9_on_u9fs.html
> and put put this line in /etc/inetd.conf
>
> u9fs stream tcp nowait root /root/bin/u9fs u9fs -Dz -a
> p9any /scratch/p9root
>
> the only client I have even been able to run is this one:
> http://www.lava.net/~newsham/plan9/

I'd recommend running with p9p[1] for testing. Here's my setup (wren
is the server, nightingale the client):
wren:/etc/inetd.conf:31:564 stream tcp nowait root
/usr/local/bin/u9fs u9fs -a p9any

nightingale$ 9 factotum
nightingale$ srv -a wren
Adding key for proto=p9sk1 authdom=sqweek.dnsdojo.org ...
User [sqweek]:
Password: *********

nightingale$ 9p ls wren/home
d-rwxr-xr-x M 0 sqweek users 1024 Jan 10 16:43 sqweek

Brief explanation - "9 factotum" starts up the password manager (for
lack of a better term), and "srv -a wren" starts an authenticated
connection to my server (via tcp on port 564, since I didn't specify).
Both of these commands place a socket in my 'namespace' directory,
/tmp/ns.sqweek.:0, for further communication. srv then communicates
with factotum to achieve authentication, and finally the 9p command
uses the "wren" socket that srv created. I also mount it with
9p2000.ko using "mount -t 9p -o proto=unix,noextend
/tmp/ns.sqweek.:0/wren /home/sqweek/n/wren".

[1] http://swtch.com/plan9port/

0 new messages