Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/init.d/nfs start <<< Fails to start. [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
petty123
n00b
n00b


Joined: 17 Sep 2007
Posts: 30

PostPosted: Wed Sep 26, 2007 4:39 am    Post subject: /etc/init.d/nfs start <<< Fails to start. [solved Reply with quote

I'm trying to install a new NFS server/client. Everything went well up until I've tried to start the nfs server...

This is the std output:

Code:

amd64-4400 sasc-ng # /etc/init.d/nfs start
 * Starting idmapd ...                                                               [ !! ]
 * Starting gssd ...
warning: unable to open /etc/gssapi_mech.conf: errno 2 (No such file or directory)
rpc.gssd: Problem with gssapi library                                                [ !! ]
 * Starting svcgssd ...
warning: unable to open /etc/gssapi_mech.conf: errno 2 (No such file or directory)   [ !! ]
 * Starting NFS statd ...                                                            [ ok ]
 * Exporting NFS directories ...
exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.201/24:/nfsroot".
  Assuming default behaviour ('subtree_check').
  NOTE: this default will change with nfs-utils version 1.1.0                        [ ok ]
 * Starting NFS daemon ...
 * Error starting NFS daemon                                                         [ !! ]
 * Starting NFS mountd ...                                                           [ ok ]


This is the /var/log/messages:

Code:

Sep 25 21:22:35 amd64-4400 login(pam_unix)[5288]: session opened for user root by (uid=0)
Sep 25 21:22:35 amd64-4400 login[5757]: ROOT LOGIN  on 'tty2'
Sep 25 21:29:06 amd64-4400 mountd[5747]: Caught signal 15, un-registering and exiting.
Sep 25 21:29:06 amd64-4400 rpc.statd[5729]: Caught signal 15, un-registering and exiting.
Sep 25 21:29:12 amd64-4400 rpc.idmapd[6129]: main: open(/var/lib/nfs/rpc_pipefs/nfs): No such file or directory
Sep 25 21:29:12 amd64-4400 rpc.gssd[6131]: warning: no gssapi mechanisms loaded!
Sep 25 21:29:12 amd64-4400 rpc.gssd[6131]: Unable to obtain list of supported mechanisms. Check that gss library is properly configured.
Sep 25 21:29:12 amd64-4400 rpc.svcgssd[6133]: warning: no gssapi mechanisms loaded!
Sep 25 21:29:12 amd64-4400 rpc.svcgssd[6133]: Unable to obtain list of supported mechanisms. Check that gss library is properly configured.
Sep 25 21:29:12 amd64-4400 rpc.svcgssd[6133]: ERROR: Problem with gssapi library
Sep 25 21:29:12 amd64-4400 rpc.statd[6139]: Version 1.0.11 Starting
Sep 25 21:29:12 amd64-4400 rpc.statd[6139]: gethostbyname error for amd64-4400
Sep 25 21:29:12 amd64-4400 exportfs[6146]: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.201/24:/nfsroot".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0
Sep 25 21:29:12 amd64-4400 nfsd[6151]: nfssvc: Function not implemented
Sep 25 21:29:12 amd64-4400 rc-scripts: Error starting NFS daemon


Looks like is looking for some missing config files, but I have no clue where to get them from..
Any networt gurus around, please? .
.


Last edited by petty123 on Wed Sep 26, 2007 9:43 am; edited 3 times in total
Back to top
View user's profile Send private message
Kosmas
Apprentice
Apprentice


Joined: 14 Sep 2006
Posts: 280
Location: Greece

PostPosted: Wed Sep 26, 2007 6:30 am    Post subject: Reply with quote

Hello,

When the NFS is compiled with kerberos flag you need the following dependencies that have gssapi:

    net-libs/librpcsecgss
    net-libs/libgssglue
    app-crypt/mit-krb5


Emerge those and you will have support for kerberos

Alternatively you can tell nfs not to compile and use kerberos.

Hope I helped
Kosmas.
Back to top
View user's profile Send private message
petty123
n00b
n00b


Joined: 17 Sep 2007
Posts: 30

PostPosted: Wed Sep 26, 2007 6:48 am    Post subject: Reply with quote

Kosmas wrote:
Hello,

When the NFS is compiled with kerberos flag you need the following dependencies that have gssapi:

    net-libs/librpcsecgss
    net-libs/libgssglue
    app-crypt/mit-krb5


Emerge those and you will have support for kerberos

Alternatively you can tell nfs not to compile and use kerberos.

Hope I helped
Kosmas.


When I saw your message, I was hopping none of the above packages were installed, but unfortunately I have all three.

At your suggestion, I've also tried to emerge nfs-utils with USE="-kerberos", but the result was the same: nfs deamon does not start.

However the error messages changed somewhat (the gssapi error disappeared from eliminating kerberos and I also fixed gethostname error):

Code:

Sep 26 00:50:23 amd64-4400 login[5300]: ROOT LOGIN  on 'tty1'
Sep 26 00:52:46 amd64-4400 rpc.idmapd[16288]: main: open(/var/lib/nfs/rpc_pipefs/nfs): No such file or directory
Sep 26 00:52:46 amd64-4400 rpc.statd[16294]: Version 1.0.11 Starting
Sep 26 00:52:46 amd64-4400 exportfs[16301]: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.201/24:/nfsroot".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0
Sep 26 00:52:46 amd64-4400 nfsd[16306]: nfssvc: Function not implemented
Sep 26 00:52:46 amd64-4400 rc-scripts: Error starting NFS daemon


But the problem is still unsolved. But thanks for answering, Kosmas.


Last edited by petty123 on Wed Sep 26, 2007 7:58 am; edited 2 times in total
Back to top
View user's profile Send private message
Kosmas
Apprentice
Apprentice


Joined: 14 Sep 2006
Posts: 280
Location: Greece

PostPosted: Wed Sep 26, 2007 7:54 am    Post subject: Reply with quote

I know this is a stupid question to ask and you probably already have done it but is the portmap service started?
Back to top
View user's profile Send private message
petty123
n00b
n00b


Joined: 17 Sep 2007
Posts: 30

PostPosted: Wed Sep 26, 2007 8:00 am    Post subject: Reply with quote

I should apologize to everyone. I really feel terible.

I solved the problem. I started finally tht NSF deamon. It was just a stupid mistake: I had a mix-up in the grub config file and was booting the wrong kernel (with no NFS support).
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sun Oct 07, 2007 4:16 pm    Post subject: Reply with quote

Hi there!

I have the same problem but, that messages apper:
Code:
* Starting gssd ...
  warning: unable to open /etc/gssapi_mech.conf: errno 2 (No such file or directory)
  rpc.gssd: Problem with gssapi library
* Starting svcgssd ...
  warning: unable to open /etc/gssapi_mech.conf: errno 2 (No such file or directory)

NFS and Portmap start without problems.
These packages are all installed:
Code:
net-libs/librpcsecgss
net-libs/libgssglue
app-crypt/mit-krb5

What's going on?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Oct 07, 2007 9:45 pm    Post subject: Reply with quote

Is /etc/gssapi_mech.conf present on that system?
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sun Oct 07, 2007 9:54 pm    Post subject: Reply with quote

desultory wrote:
Is /etc/gssapi_mech.conf present on that system?

No it isn't.
I also tried to do revdep-rebuild --library=gssapi but, there are no missing packages.
Do you think I have to re-emerge net-fs/nfs-utils ?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Oct 07, 2007 10:01 pm    Post subject: Reply with quote

The missing file is a configuration file, not a library.
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sun Oct 07, 2007 10:03 pm    Post subject: Reply with quote

Ok, I tried to emerge again nfs-utils and it didn't create a new one actually.
What can I do?
I'm sure I didn't manually deleted it.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
petty123
n00b
n00b


Joined: 17 Sep 2007
Posts: 30

PostPosted: Mon Oct 08, 2007 12:45 am    Post subject: Reply with quote

fbcyborg wrote:
Ok, I tried to emerge again nfs-utils and it didn't create a new one actually.
What can I do?
I'm sure I didn't manually deleted it.


Your problem is generated by kerberos. If you emerge nfs-utils with USE="-kerberos" your error will disappear. If you do not need the security, nfs-utils work just fine without kerberos.

To get gssapi working correctly you must properly configure kerberos, and GENERATE the right keys.

Each principal has a secret key known only to it and Kerberos. Principals includes servers, such as an FTP server or X server, and human users, whose key is their password. Users gain access to services by getting Kerberos tickets for those services from a Kerberos server.

Here is an example of gssapi_mech.conf:

Code:

# GSSAPI Mechanism Definitions
#
# This configuration file determines which GSS-API mechanisms
# the gssd code should use
#
# NOTE:
# The initiaiization function "mechglue_internal_krb5_init"
# is used for the MIT krb5 gssapi mechanism.  This special
# function name indicates that an internal function should
# be used to determine the entry points for the MIT gssapi
# mechanism funtions.
#
# library                               initialization function
# ================================   ==========================
# The MIT K5 gssapi library, use special function for initialization.
/usr/lib/libgssapi_krb5.so     mechglue_internal_krb5_init
#
# The SPKM3 gssapi library function.  Use the function spkm3_gss_initialize.
# /usr/local/gss_mechs/spkm/spkm3/libgssapi_spkm3.so    spkm3_gss_initialize


Try searching for kerberos keys in this forum and on google.
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Mon Oct 08, 2007 8:55 am    Post subject: Reply with quote

Thank you petty,

I placed your config file in /etc directory and I don't receive that error messages anymore.
But I noticed that "[!!]" appear on the same row of "* Starting svcgssd ..." so I checked /var/log/message file, wich reports the following errors:
Code:
rpc.svcgssd[5424]: warning: no gssapi mechanisms loaded!
rpc.svcgssd[5424]: Unable to obtain list of supported mechanisms. Check that gss library is properly configured.
rpc.svcgssd[5424]: ERROR: Problem with gssapi library
rpc.svcgssd[5430]: warning: no gssapi mechanisms loaded!
rpc.svcgssd[5430]: Unable to obtain list of supported mechanisms. Check that gss library is properly configured.
rpc.svcgssd[5430]: ERROR: Problem with gssapi library
rpc.svcgssd[5428]: ERROR: GSS-API: error in gss_acquire_cred(): Unspecified GSS failure.  Minor code may provide more information - No such file or directory
rpc.svcgssd[5428]: Unable to obtain credentials for 'nfs'
rpc.svcgssd[5428]: unable to obtain root (machine) credentials
rpc.svcgssd[5428]: do you have a keytab entry for nfs/<your.host>@<YOUR.REALM> in /etc/krb5.keytab?

I think there was a trobule when I unmerged old libgssapi. libgssglue package is the substitute, isn't it? Maybe that substitution caused some problem.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
petty123
n00b
n00b


Joined: 17 Sep 2007
Posts: 30

PostPosted: Mon Oct 08, 2007 7:35 pm    Post subject: Reply with quote

I see no reason to go with half backed solutions, just to get rid of error messages....

IMHO, there are just two basic choices:

1. Get rid of kerberos by re-emerging nfs-utils with USE="-kerberos"

2. Implement fully ALL kerberos requirements.

Personally, I used option 1. Option 2 is a lot more complex, and unless you satisfy all kerberos needs, you shall have all sorts of errors.

Good luck!
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Thu Oct 11, 2007 2:18 pm    Post subject: Reply with quote

OK, thank you. Solved.

Note that on my notebook I don't have any trouble with kerberos USE flag enabled in nfs-utils package.. Why????
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum