Wednesday, January 30, 2008

Date::Manip and /dev/null: cannot create

I've seen this problem before where Date::Manip couldn't find the Timezone

sh: /dev/null: cannot create
sh: /dev/null: cannot create
ERROR: Date::Manip unable to determine TimeZone.
Date::Manip::Date_TimeZone called at /usr/local/lib/perl5/site_perl/5.8.0/Date/Manip.pm line 629
Date::Manip::Date_Init() called at /usr/local/lib/perl5/site_perl/5.8.0/Date/Manip.pm line 747
Date::Manip::ParseDateString('today') called at /usr/local/lib/perl5/site_perl/5.8.0/Date/Manip.pm line 1683
Date::Manip::UnixDate('today') called at test.cgi line 10

I have previously solved it by manually settting the Timezone with $Date::Manip::TZ, but for some reason that wasn't working today.

After a bit of digging, turned out /dev/null had gone crazy

> ls -la /devices/pseudo/mm@0:null
crwxrwxr-x 1 jboss jboss 13, 2 Jan 30 11:06 /devices/pseudo/mm@0:null


Owned by JBOSS? Thats a bit strange.. Not sure yet how it got like that, but a quick

chown root:sys
/devices/pseudo/mm@0:null
chmod o+w
/devices/pseudo/mm@0:null

and everything was working correctly again.

Lesson of the day.. Don't trust Java, its obviously its fault :)


1 comment:

Anonymous said...

It's truly very complicated in this active life to listen news on Television, thus I simply use web for that purpose, and obtain the most up-to-date news.

Here is my site ... XRay Technician