[SOLVED]: twist Unknown command epoptes - epoptes daemon does not start

Bug #1509679 reported by ABIX - Adam Jurkiewicz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Epoptes
Invalid
Undecided
Unassigned

Bug Description

I have Ubuntu 12.04 with 3.13 Kernel and XFCE 4.10.

Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Nauczyciel-ThinkPad-T510 3.13.0-51-generic #84~precise1-Ubuntu SMP Wed Apr 15 21:46:23 UTC 2015 i686 i686 i386 GNU/Linux

First, I tried to install epoptes 0.5.5 from standard Ubuntu PPA - it failed to start:

ii epoptes 0.5.5-0ubuntu0.1 Computer lab management tool
ii epoptes-client 0.5.5-0ubuntu0.1 Computer lab management tool (client)

 * Starting the epoptes daemon
Usage: twistd [options]
Options:
      --savestats save the Stats object rather than the text output of the
                       profiler.
  -o, --no_save do not save state on shutdown
  -e, --encrypted The specified tap/aos file is encrypted.
  -n, --nodaemon don't daemonize, don't use default umask of 0077
      --originalname Don't try to change the process name
      --syslog Log to syslog, not to file
      --euid Set only effective user-id rather than real user-id.
                       (This option has no effect unless the server is running
                       as root, in which case it means not to shed all
                       privileges after binding ports, retaining the option to
                       regain privileges in cases such as spawning processes.
                       Use with caution.)
  -l, --logfile= log to a specified file, - for stdout
      --logger= A fully-qualified name to a log observer factory to use
                       for the initial log observer. Takes precedence over
                       --logfile and --syslog (when available).
  -p, --profile= Run in profile mode, dumping results to specified file
      --profiler= Name of the profiler to use (profile, cprofile, hotshot).
                       [default: hotshot]
  -f, --file= read the given .tap file [default: twistd.tap]
  -y, --python= read an application from within a Python file (implies
                       -o)
  -s, --source= Read an application from a .tas file (AOT format).
  -d, --rundir= Change to a supplied directory before running [default:
                       .]
      --prefix= use the given prefix when syslogging [default: twisted]
      --pidfile= Name of the pidfile [default: twistd.pid]
      --chroot= Chroot to a supplied directory before running
  -u, --uid= The uid to run as.
  -g, --gid= The gid to run as.
      --umask= The (octal) file creation mask to apply.
      --help-reactors Display a list of possibly available reactor names.
      --version Print version information and exit.
      --spew Print an insanely verbose log of everything that happens.
                       Useful when debugging freezes or locks in complex code.
  -b, --debug Run the application in the Python Debugger (implies
                       nodaemon), sending SIGUSR2 will drop into debugger
  -r, --reactor= Which reactor to use (see --help-reactors for a list of
                       possibilities)
      --help Display this help and exit.

twistd reads a twisted.application.service.Application out of a file and runs
it.
Commands:
    conch A Conch SSH service.
    dns A domain name server.
    ftp An FTP server.
    inetd An inetd(8) replacement.
    mail An email service
    manhole An interactive remote debugger service accessible via
                     telnet and ssh and providing syntax coloring and basic line
                     editing functionality.
    manhole-old An interactive remote debugger service.
    news A news server.
    portforward A simple port-forwarder.
    procmon A process watchdog / supervisor
    socks A SOCKSv4 proxy service.
    telnet A simple, telnet-based remote debugging service.
    turtle Throttling proxy a given set of destination hostnames
    web A general-purpose web server which can serve from a
                     filesystem or application resource.
    words A modern words server
    xmpp-router An XMPP Router server

/usr/bin/twistd: Unknown command: epoptes

OK, I think, could be, I will try to add PPA and install the newest one.

Czytanie list pakietów...
Budowanie drzewa zależności...
Odczyt informacji o stanie...
Zostaną zainstalowane następujące dodatkowe pakiety:
  epoptes-client faketime iperf python-netifaces python-pycha
Zostaną zainstalowane następujące NOWE pakiety:
  epoptes epoptes-client faketime iperf python-netifaces python-pycha
0 aktualizowanych, 6 nowo instalowanych, 0 usuwanych i 1 nieaktualizowanych.
Konieczne pobranie 0 B/432 kB archiwów.
Po tej operacji zostanie dodatkowo użyte 2922 kB miejsca na dysku.
Kontynuować [T/n]? Wybieranie wcześniej niewybranego pakietu iperf.
(Odczytywanie bazy danych ...
(Odczytywanie bazy danych ... 5%
[...]
(Odczytywanie bazy danych ... 100%
(Odczytywanie bazy danych ... 383033 pliki i katalogi obecnie zainstalowane.)
Rozpakowanie iperf (z .../iperf_2.0.5-2.1_i386.deb) ...
Wybieranie wcześniej niewybranego pakietu python-netifaces.
Rozpakowanie python-netifaces (z .../python-netifaces_0.6-2ubuntu1_i386.deb) ...
Wybieranie wcześniej niewybranego pakietu python-pycha.
Rozpakowanie python-pycha (z .../python-pycha_0.6.0-3_all.deb) ...
Wybieranie wcześniej niewybranego pakietu faketime.
Rozpakowanie faketime (z .../faketime_0.8-1_i386.deb) ...
Wybieranie wcześniej niewybranego pakietu epoptes.
Rozpakowanie epoptes (z .../epoptes_0.5.8-1~ubuntu12.04.1_all.deb) ...
Wybieranie wcześniej niewybranego pakietu epoptes-client.
Rozpakowanie epoptes-client (z .../epoptes-client_0.5.8-1~ubuntu12.04.1_all.deb) ...
Przetwarzanie wyzwalaczy dla man-db...
Przetwarzanie wyzwalaczy dla python-twisted-core...
Przetwarzanie wyzwalaczy dla hicolor-icon-theme...
Przetwarzanie wyzwalaczy dla gnome-menus...
Przetwarzanie wyzwalaczy dla desktop-file-utils...
Przetwarzanie wyzwalaczy dla ureadahead...
Konfigurowanie iperf (2.0.5-2.1) ...
Konfigurowanie python-netifaces (0.6-2ubuntu1) ...
Konfigurowanie python-pycha (0.6.0-3) ...
Konfigurowanie faketime (0.8-1) ...
Konfigurowanie epoptes (0.5.8-1~ubuntu12.04.1) ...
Dodawanie grupy "epoptes" (GID 127)...
Gotowe.
Generating a 1024 bit RSA private key
.......++++++
.....++++++
writing new private key to '/etc/epoptes/server.key'
-----

A new OpenSSL certificate has been generated for epoptes.
Please ensure that you transfer /etc/epoptes/server.crt
to your clients by issuing `epoptes-client -c` from your
regular workstations or from your LTSP chroots.

 * Starting the epoptes daemon  Usage: twistd [options]
Options:
      --savestats save the Stats object rather than the text output of the
                       profiler.
  -o, --no_save do not save state on shutdown
  -e, --encrypted The specified tap/aos file is encrypted.
  -n, --nodaemon don't daemonize, don't use default umask of 0077
      --originalname Don't try to change the process name
      --syslog Log to syslog, not to file
      --euid Set only effective user-id rather than real user-id.
                       (This option has no effect unless the server is running
                       as root, in which case it means not to shed all
                       privileges after binding ports, retaining the option to
                       regain privileges in cases such as spawning processes.
                       Use with caution.)
  -l, --logfile= log to a specified file, - for stdout
      --logger= A fully-qualified name to a log observer factory to use
                       for the initial log observer. Takes precedence over
                       --logfile and --syslog (when available).
  -p, --profile= Run in profile mode, dumping results to specified file
      --profiler= Name of the profiler to use (profile, cprofile, hotshot).
                       [default: hotshot]
  -f, --file= read the given .tap file [default: twistd.tap]
  -y, --python= read an application from within a Python file (implies
                       -o)
  -s, --source= Read an application from a .tas file (AOT format).
  -d, --rundir= Change to a supplied directory before running [default:
                       .]
      --prefix= use the given prefix when syslogging [default: twisted]
      --pidfile= Name of the pidfile [default: twistd.pid]
      --chroot= Chroot to a supplied directory before running
  -u, --uid= The uid to run as.
  -g, --gid= The gid to run as.
      --umask= The (octal) file creation mask to apply.
      --help-reactors Display a list of possibly available reactor names.
      --version Print version information and exit.
      --spew Print an insanely verbose log of everything that happens.
                       Useful when debugging freezes or locks in complex code.
  -b, --debug Run the application in the Python Debugger (implies
                       nodaemon), sending SIGUSR2 will drop into debugger
  -r, --reactor= Which reactor to use (see --help-reactors for a list of
                       possibilities)
      --help Display this help and exit.

twistd reads a twisted.application.service.Application out of a file and runs
it.

Commands:
    conch A Conch SSH service.
    dns A domain name server.
    ftp An FTP server.
    inetd An inetd(8) replacement.
    mail An email service
    manhole An interactive remote debugger service accessible via
                     telnet and ssh and providing syntax coloring and basic line
                     editing functionality.
    manhole-old An interactive remote debugger service.
    news A news server.
    portforward A simple port-forwarder.
    procmon A process watchdog / supervisor
    socks A SOCKSv4 proxy service.
    telnet A simple, telnet-based remote debugging service.
    turtle Throttling proxy a given set of destination hostnames
    web A general-purpose web server which can serve from a
                     filesystem or application resource.
    words A modern words server
    xmpp-router An XMPP Router server

/usr/bin/twistd: Unknown command: epoptes

[ OK ]
Konfigurowanie epoptes-client (0.5.8-1~ubuntu12.04.1) ...
update-rc.d: warning: epoptes-client stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)

And epoptes does not run. Can anyone have any idea?

Revision history for this message
Fotis Tsamis (ftsamis) wrote :

Can you please give us the output of:
dpkg -l epoptes
dpkg -L epoptes
ls /usr/lib/python2.7/dist-packages/twisted/plugins/
python /usr/lib/python2.7/dist-packages/twisted/plugins/epoptesd.py

Please copy-paste the full terminal session as you type these commands and get the results.

Revision history for this message
ABIX - Adam Jurkiewicz (a-jurkiewicz) wrote :

In attachment I provide all information.
I realized that I don't have python service_identity, I install it, but problem still exist.

Revision history for this message
Fotis Tsamis (ftsamis) wrote :

For some reason you have a local installation of python2.7 in /usr/local/, which is the cause of your problems. Ubuntu 12.04 comes with python2.7 preinstalled, and your local python installation overrides that, taking priority.

Therefore twisted is looking for plugins at /usr/local/lib/python2.7/... , instead of /usr/lib/python2.7/.... As a result it cannot find epoptes, since it's installed in the system default path, not in your local python installation.

Please remove your local python2.7 installation, and try again. Or, even better, do a fresh ubuntu installation, in case you have other misconfigurations in your system.

Marking as invalid.

Changed in epoptes:
status: New → Invalid
Revision history for this message
ABIX - Adam Jurkiewicz (a-jurkiewicz) wrote :

Dear @ftsamis - thank you!
Works perfectly, when I remove local python2.7 ;-) I event don't remember, when and why I installed it (i think Anaconda or Canopy..., or maybe some my tests. Nevertheless - now epoptes starts without any warning ;-)

Paco (pacoc)
summary: - twist Unknown command epoptes - epoptes daemon does not starta
+ [SOLVED] twist Unknown command epoptes - epoptes daemon does not start
Revision history for this message
Paco (pacoc) wrote :

Hello all :-)

I am updating this thread in case anyone comes here from openSUSE

Distributor ID: openSUSE Leap
Release: 42.3
Epoptes: epoptes-0.5.9_bzr0.545-68.2.rpm
Repository: openSUSE-Education

I had this very same bug a few days ago and it was due to python3-Twisted being installed after some upgrading.

As a result both the /etc/alternatives/twistd and /usr/bin/twistd links pointed to /usr/bin/twistd-3.4 instead of /usr/bin/twistd-2.7

so epotes-server.service won't start, and "systemctl status epoptes" shows "/usr/bin/twistd: Unknown command: epoptes"

Solution: do one of the following
- uninstall python3-Twisted
- or manually change /usr/bin/twistd link to point to /usr/bin/twistd-2.7
- or manually change /etc/alternatives/twisted link to point to /usr/bin/twistd-2.7

That worked for me, and now Epoptes server runs OK again.

I have updated the subject as [SOLVED]. I don't know if this is the correct way to mark the bug as solved, so please excuse me and correct it if I am wrong.

Thanks for the great work :-)

summary: - [SOLVED] twist Unknown command epoptes - epoptes daemon does not start
+ [SOLVED]: twist Unknown command epoptes - epoptes daemon does not start
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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