OpenVZ Forum


Home » General » Support » [SOLVED]: CentOS 5.2 HN and VPS - man and less problems in VPS
[SOLVED]: CentOS 5.2 HN and VPS - man and less problems in VPS [message #34878] Tue, 10 February 2009 11:18 Go to next message
_sgb_ is currently offline  _sgb_
Messages: 3
Registered: February 2009
Junior Member
Hi all,

I can't run man or less inside a VPS. Piping the results of any command into less just returns to the command line, however 'more' works. Using the command 'man' returns the following error:
Quote:


# man bash
Error executing formatting or display command.
System command (cd /usr/share/man && (echo ".ll 13.9i"; echo ".nr LL 13.9i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man1/bash.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c --legacy ISO-8859-1 -mandoc 2>/dev/null | /usr/bin/less -is) exited with status 256.
No manual entry for bash



Something that I suspect is related to the same problem; the -p switch on the mysql client does not prompt for a password:
Quote:


# mysql -hlocalhost -uroot -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)



However, specifying it on the command line works fine:
Quote:


# mysql -hlocalhost -uroot -pMYSQLPASSWORD
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>




I'm not entirely sure what will be relevant to the issue, so here's the background.
I am running CentOS 5.2 with kernel version 2.6.18-92.1.13.el5.028stab059.6PAE. I created my own CentOS 5.2 minimal template and followed the recommendations to disable the udev start in
/etc/rc.d/rc.sysinit
I have made the dev files for null,ptmx,random,urandom, ttyp and ptyp and there seems to be no trouble there.

Networking is fine, updates and installs work fine from inside the VPS, websites are fine...

I would expect this to be something small that I have missed, and it's more of an annoyance than a problem. Has anyone any ideas?

Regards,

SGB

[Updated on: Tue, 10 February 2009 15:32]

Report message to a moderator

[SOLVED]: CentOS 5.2 HN and VPS - man and less problems in VPS [message #34879 is a reply to message #34878] Tue, 10 February 2009 15:31 Go to previous messageGo to next message
_sgb_ is currently offline  _sgb_
Messages: 3
Registered: February 2009
Junior Member
Using
strace less filename
I was able to figure out that there was an issue with the tty it was trying to use. Sure enough, an invalid tty existed:
-bash-3.2# ll /dev/tty
-rw-r--r-- 1 root root 16 Feb 10 15:15 /dev/tty

Removing this tty solved the problem with man and less, but it returned after a short time while I was using the VPS. I've since worked out where it came from. The mysql client creates it.

Quote:


-bash-3.2# rm /dev/tty
-bash-3.2# ls -l /dev/tty
ls: /dev/tty: No such file or directory
-bash-3.2# mysql -uroot -hlocalhost -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
-bash-3.2# ls -l /dev/tty
-rw-r--r-- 1 root root 16 Feb 10 15:19 /dev/tty




To prevent this issue from occuring, you need to create the /dev/tty node

Quote:


-bash-3.2# mknod -m 666 /dev/tty c 5 0
-bash-3.2# ll /dev/tty
crw-rw-rw- 1 root root 5, 0 Feb 10 15:23 /dev/tty



I've checked through the various template creation howtos, and this step is only mentioned in the Arch linux template creation page. In all honesty, I wouldn't be certain that it is required on other systems, as I have not run any other OS as a VPS.

Regards,

sgb
Re: [SOLVED]: CentOS 5.2 HN and VPS - man and less problems in VPS [message #35278 is a reply to message #34879] Sun, 15 March 2009 05:22 Go to previous messageGo to next message
Peter Machell is currently offline  Peter Machell
Messages: 5
Registered: December 2007
Junior Member
Had exactly the same problem on Debian 4, after following the migration guide from P2V.

Luckily found your post. Removing and re-creating /dev/tty has also fixed this for me - thanks!
Re: [SOLVED]: CentOS 5.2 HN and VPS - man and less problems in VPS [message #39756 is a reply to message #35278] Fri, 28 May 2010 19:02 Go to previous message
renders is currently offline  renders
Messages: 1
Registered: May 2010
Junior Member
This saved my sanity as well.. I have a debian etch image that suddenly started giving me strange errors when running utilities such as mc, or man. I did the search on 'openvz command exited with status 256' and came across this posting. When I checked the dev folder, the tty node was totally different from the others nodes. I reset it using your suggestion and now on my problems have gone away. I can once again use mc, a favourite.

Thanks for the solution..

Rob
Previous Topic: Problem VPS Could Not Start Vps, Reason: vzquota
Next Topic: Public/Private IP Configuration
Goto Forum:
  


Current Time: Fri Apr 26 09:00:12 GMT 2024

Total time taken to generate the page: 0.01736 seconds