LTSP error: Can not write log, openpty() failed (/dev/pts not mounted?)

Bug #294403 reported by komputes
20
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Wishlist
Oliver Grawert

Bug Description

This error comes up when trying to add a package (dpkg) and probably other actions which write logs. We can chroot into the LTSP directory and attempt update/upgrade, yet we get the following error

Can not write log, openpty() failed (/dev/pts not mounted?)

/dev/pts is currently an empy directory. I believe that it should be mounted by the kernel(?). Is still not mounted in the LTSP chroot. The result is that logs cannot be written. in the ltsp path, syslog and dpkg.log are empty (most likely as a result of this). This was tested on Hardy + latest updates (both on the host and on the LTSP path through chroot) and has not been reproduced locally.

Found the following links when doing some research:

Links:
https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/224901
https://bugs.launchpad.net/ubuntu/+source/libvncserver/+bug/154979
http://www.nabble.com/dist-upgrade-of-chroot-td15002023.html
https://bugs.launchpad.net/ubuntu/+bug/224899
http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-October/002563.html
http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-October/002565.html
https://lists.ubuntu.com/archives/ubuntu-users/2007-September/124399.html
https://lists.ubuntu.com/archives/ubuntu-users/2007-September/124413.html
https://lists.ubuntu.com/archives/ubuntu-users/2007-September/124417.html
https://lists.ubuntu.com/archives/ubuntu-users/2007-September/124397.html

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi David,

Is there any other message that get printed leading up to the "Can not write log, openpty() failed (/dev/pts not mounted?)". It might be interesting for the developers to see.

Can you try for specific ltsp package versions rather than "Hardy and the latest updates".

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Oliver,

Would you also be able to take a look at this bug? Thanks.

Revision history for this message
komputes (komputes) wrote :

Sure, here is an sample of some errors I am geting on this LTSP setup (seems proc doesn't mount at boot):

root@ubuntu:~$ sudo chroot /opt/ltsp/i386/
[sudo] password for root:
root@ubuntu:/# sudo apt-get update
            [Hit and Get all Repos...]
Fetched 955kB in 2s (347kB/s)
Reading package lists... Done
root@ubuntu:/# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:/# sudo dpkg-reconfigure console-setup
invoke-rc.d: initscript console-setup, action "start" failed. ###ANOTHER ERROR MAY RELAE TO ISSUE
root@ubuntu:/# cat /var/log/syslog ###EMPTY

root@ubuntu:/# ls /etc/X11/
app-defaults fonts rgb.txt X xinit xkb Xresources xserver Xsession Xsession.d Xsession.options Xwrapper.config
root@ubuntu:/# dpkg-reconfigure xserver-xorg
grep: /proc/cmdline: No such file or directory
md5sum: /etc/X11/xorg.conf: No such file or directory
FATAL: Could not load /lib/modules/2.6.24-21-server/modules.dep: No such file or directory
grep: /proc/cpuinfo: No such file or directory
root@ubuntu:/# uname -r
2.6.24-21-server
root@ubuntu:/#
root@ubuntu:/# sudo apt-get install apg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  xserver-xorg-video-psb
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  apg
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.2kB of archives.
After this operation, 209kB of additional disk space will be used.
Get: 1 http://us.archive.ubuntu.com hardy/universe apg 2.2.3.dfsg.1-2 [53.2kB]
Fetched 53.2kB in 0s (85.4kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously deselected package apg.
(Reading database ... 20059 files and directories currently installed.)
Unpacking apg (from .../apg_2.2.3.dfsg.1-2_i386.deb) ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up apg (2.2.3.dfsg.1-2) ...

Revision history for this message
Oliver Grawert (ogra) wrote :

this is no error, just a warning, i'll make sure /dev/pts gets mounted in future versions to suppress the log noise, but please note that this is a barely cosmetical issue and can not cause any failures of the client build process. setting to whishlist, milestoning for 9.04

Changed in ltsp:
assignee: nobody → ogra
importance: Undecided → Wishlist
milestone: none → ubuntu-9.04
status: New → Triaged
Revision history for this message
Oliver Grawert (ogra) wrote :

some notes about the last log above, please make sure to mount /proc if you chroot into the client chroot as described in teh documentation, some packages need that (i.e. console-setup). what is the reason that this report is makred private, there are no security issues with a not mounted /dev/pts

Revision history for this message
Oliver Grawert (ogra) wrote :

because you dont want to run a syslog daemon on a thin client as well no other logfiles should be written (only ldm.log for deugging prposes should exist on a booted client) dist-upgrades are not suggested on ltsp clients either.
if you want logging, remote syslogging on the server should be enabled and a dns server needs to be established, by default no logging is switched on in ltsp5 but can indeed optionally be set up.

http://wiki.ltsp.org/twiki/bin/view/Ltsp/LtspDocumentationUpstream should have a chapter about this iirc.

Revision history for this message
komputes (komputes) wrote :

Oliver, so after reading the documentation you pointed me to, if I understand correctly lts.conf should contain the following line to log all LTSP actions.

    SYSLOG_HOST=server

Do I need to specify the server name? If I just specify it as it is written above, does this get placed in /var/log/syslog on the LTSP server?

Revision history for this message
Oliver Grawert (ogra) wrote :

no, SYSLOG_HOST always defaults to "server" anyway, you dont need to set anything on the client side, all you need to do is to enable remote logging on the server (note that syslog has a bad habit of doing DNS lookups, so if you want to have the remote logging at decent speed you will also need to set up a DNS server or /etc/hosts with an entry for each client)

Revision history for this message
Oliver Grawert (ogra) wrote :

i forgot ... for switching on remote syslogging on the server have a look at /etc/default/syslogd

komputes (komputes)
description: updated
komputes (komputes)
visibility: private → public
Revision history for this message
Oliver Grawert (ogra) wrote :

fix committed upstream

Changed in ltsp (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Oliver Grawert (ogra) wrote :

fixed in 5.1.78-0ubuntu1

Changed in ltsp (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.