Showing posts with label OpenIndiana. Show all posts
Showing posts with label OpenIndiana. Show all posts

Sunday, 10 April 2011

Solaris/OpenIndiana NFS server to Ubuntu NFS host - 4294967294 problem

Error keywords seen:  User and Group set to 4294967294 instead of UID/GID expected

Operating System: Open Indiana oi_148 (Solaris) and Ubuntu 11.04 (Natty Narwhal)

Software: NFS v4


When mounting an nfs shared directory from an OpenIndiana home server, the directory ownership was set to 4294967294:4294967294, despite the ownership on the server being 1000:1000, and the equivalent UID / GID being set up on the client machine.


The solution is to edit the config file /etc/default/nfs-common - the two lines required are:


NEED_STATD="no"
NEED_IDMAPD="yes"



This is enough to change the reported ownership from 4294967294 to 'nobody:nogroup' - which is progress, of a sort.



Our next requirement is to make sure that the nfs client and the nfs server are both using the same domain name.  On the client, change /etc/idmapd.conf so that the domain parameter is correct - in my case, 'homenetwork'.

Domain = homenetwork

Secondly, on the server, make sure that the domainname is correctly set.  As this is running a Solaris(-based) OS, it's very easy - just create or edit the contents of /etc/defaultdomain so that it contains (nothing more than) the correct domain:

homenetwork

And you're done - reboot both sides for luck, and everything should now appear as you expect.

Wednesday, 9 February 2011

CPAN problem with Compress::Zlib

Perl Version:  5.8.4 
Operating System: OpenIndiana oi_148
Error Message(s) seen:
Undefined subroutine &Compress::Zlib::gzopen called at /usr/perl5/5.8.4/lib/CPAN/Tarzip.pm line 122


This error showed up while installing a module called Config::Crontab.  It potentially could have caused problems with installing any module though, as I'm pretty sure that it's down to missing dependencies for Compress::Zlib.

The error presented itself as follows:

 cpan[2]> install Config::Crontab
Running install for module 'Config::Crontab'
Running make for S/SC/SCOTTW/Config-Crontab-1.30.tar.gz
CPAN: LWP::UserAgent loaded ok (v5.835)
Fetching with LWP:
  ftp://mirror.ox.ac.uk/sites/www.cpan.org/authors/id/S/SC/SCOTTW/Config-Crontab-1.30.tar.gz
CPAN: Digest::SHA loaded ok (v5.50)
Fetching with LWP:
  ftp://mirror.ox.ac.uk/sites/www.cpan.org/authors/id/S/SC/SCOTTW/CHECKSUMS
Catching error: "Undefined subroutine &Compress::Zlib::gzopen called at /usr/perl5/5.8.4/lib/CPAN/Tarzip.pm line 122.\cJ" at /usr/perl5/5.8.4/lib/CPAN.pm line 391
    CPAN::shell() called at -e line 1

As this suggests a problem with Compress::Zlib, I tried to update it:
cpan[3]> install Compress::Zlib
Compress::Zlib is up to date (2.033).j

The solution was to remove Compress::Zlib and reinstall it, which then picked up missing dependencies and installed them:

root@ph_opensolaris:/root# ls /usr/perl5/site_perl/5.8.4/Compress/
Zlib.pm
root@ph_opensolaris:/root# rm /usr/perl5/site_perl/5.8.4/Compress/Zlib.pm

cpan[1]> install Compress::Zlib



Problems using CPAN / Perl Modules with OpenSolaris (& OpenIndiana)

Perl version: 5.8.4
Operating System: OpenIndiana oi_148 (I imagine that OpenSolaris also sees these problems)
Error Message(s) seen:  
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: SHA.c: linker input file unused because linking not done
[...]
cc: SHA.o: No such file or directory
cc: no input files
Make had returned bad status, install seems impossible


The key errors here are the 'unrecognised option' and 'language not recognised' messages, which are coming from cc.  cc on OpenIndiana is a link from /usr/gnu/bin/cc to /usr/sfw/bin/gcc - and gcc is not recognising some of the flags that are passed to it.

 These are specified in this file:

/usr/perl5/5.8.4/lib/i86pc-solaris-64int/Config.pm

by the lines:

cccdlflags='-KPIC'

and,

optimize='-xO3 -xspace -xildoff'

To solve the problem, we need to remove (all) the offending entries, so that these two lines read:

cccdlflags=''

and,

optimize=''