claudyus / LXC-Web-Panel

LXC Web Panel improved for lxc 1.0+
http://claudyus.github.io/LXC-Web-Panel/
Other
221 stars 68 forks source link

LWP 0.8 fails to start on Ubuntu (missing lwp.service) #91

Closed arruor closed 8 years ago

arruor commented 9 years ago

I got missing 'lwp.service' when installing or configuring LWP on Ubuntu. Unfortunately lwp.service file is not presented in .deb archive. PoC:

root@gatekeeper:/usr/local/src# dpkg -i lwp_0.8_all.deb 
Selecting previously unselected package lwp.
(Reading database ... 187091 files and directories currently installed.)
Preparing to unpack lwp_0.8_all.deb ...
Unpacking lwp (0.8) ...
Setting up lwp (0.8) ...
 * missed /etc/lwp/lwp.conf file
 * cannot read config files. Exit!
invoke-rc.d: lwp.service doesn't exist but the upstart job does. Nothing to start or stop until a systemd or init job is present.
Processing triggers for ureadahead (0.100.0-19) ..
root@gatekeeper:/etc/lwp# cp lwp.example.conf lwp.conf
root@gatekeeper:/etc/lwp# service lwp restart
Failed to restart lwp.service: Unit lwp.service failed to load: No such file or directory.
root@gatekeeper:/etc/lwp# service lwp start
Failed to start lwp.service: Unit lwp.service failed to load: No such file or directory.
root@gatekeeper:/etc/lwp# dpkg -L lwp | grep lwp\.service
root@gatekeeper:/etc/lwp# dpkg -L lwp | grep service
arruor commented 9 years ago

Temporary workaround:

sudo wget https://raw.githubusercontent.com/claudyus/LXC-Web-Panel/master/debian/lwp.service -O /lib/systemd/system/lwp.service
sudo apt-get install lwp # (or sudo dpkg -i /path/to/lwp.deb)
claudyus commented 9 years ago

the 0.8 release is not the most recent one. Please try to install a more recent version using this procedure https://github.com/claudyus/LXC-Web-Panel#installation-on-deb-based-system

arruor commented 9 years ago

I used your repository from github.io, still no lwp.service file with version 0.8-25-g62597b1.

root@gatekeeper:/var/lwp# apt-get --purge remove lwp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-blinker python-flask python-itsdangerous python-jinja2 python-ldap python-markupsafe python-pyinotify python-werkzeug
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  lwp*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1073 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 187322 files and directories currently installed.)
Removing lwp (0.8-25-g62597b1) ...
Purging configuration files for lwp (0.8-25-g62597b1) ...
dpkg: warning: while removing lwp, directory '/etc/lwp' not empty so not removed
root@gatekeeper:/var/lwp# rm -fr /etc/lwp
root@gatekeeper:/var/lwp# rm -f /lib/systemd/system/lwp.service 
root@gatekeeper:/var/lwp# apt-cache policy lwp
lwp:
  Installed: (none)
  Candidate: 0.8-25-g62597b1
  Version table:
     0.8-25-g62597b1 0
        500 http://claudyus.github.io/LXC-Web-Panel/ debian/ Packages
root@gatekeeper:/var/lwp# service lwp status
sh: 0: getcwd() failed: No such file or directory
● lwp.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

авг 25 10:27:48 gatekeeper systemd[1]: lwp.service lacks both ExecStart= and ExecStop= setting. Refusing.
авг 25 10:30:38 gatekeeper systemd[1]: Stopped LXC Web Panel.
авг 25 10:30:49 gatekeeper systemd[1]: Stopped LXC Web Panel.
авг 25 10:32:27 gatekeeper systemd[1]: Started LXC Web Panel.
авг 25 10:32:27 gatekeeper systemd[1]: Starting LXC Web Panel...
авг 25 11:27:07 gatekeeper systemd[1]: Stopping LXC Web Panel...
авг 25 11:27:07 gatekeeper systemd[1]: Stopped LXC Web Panel.
авг 25 11:27:16 gatekeeper systemd[1]: Stopped LXC Web Panel.
авг 25 11:27:23 gatekeeper systemd[1]: Stopped LXC Web Panel.
авг 25 11:36:12 gatekeeper systemd[1]: Stopped LXC Web Panel.
root@gatekeeper:/var/lwp# apt-get --reinstall install lwp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  lwp
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/203 kB of archives.
After this operation, 1073 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  lwp
Install these packages without verification? [y/N] y
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Selecting previously unselected package lwp.
(Reading database ... 187255 files and directories currently installed.)
Preparing to unpack .../lwp_0.8-25-g62597b1_all.deb ...
Unpacking lwp (0.8-25-g62597b1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up lwp (0.8-25-g62597b1) ...
 * missed /etc/lwp/lwp.conf file
 * cannot read config files. Exit!
invoke-rc.d: lwp.service doesn't exist but the upstart job does. Nothing to start or stop until a systemd or init job is present.
Processing triggers for ureadahead (0.100.0-19) ...
root@gatekeeper:/var/lwp# cp /etc/lwp/lwp.example.conf /etc/lwp.conf
root@gatekeeper:/var/lwp# service lwp restart
sh: 0: getcwd() failed: No such file or directory
Failed to restart lwp.service: Unit lwp.service failed to load: No such file or directory.
root@gatekeeper:/var/lwp# apt-cache policy lwp
lwp:
  Installed: 0.8-25-g62597b1
  Candidate: 0.8-25-g62597b1
  Version table:
 *** 0.8-25-g62597b1 0
        500 http://claudyus.github.io/LXC-Web-Panel/ debian/ Packages
        100 /var/lib/dpkg/status
root@gatekeeper:/var/lwp# cd /usr/local/src/
root@gatekeeper:/usr/local/src# mkdir lwp; cd lwp
root@gatekeeper:/usr/local/src/lwp# wget http://claudyus.github.io/LXC-Web-Panel/debian/lwp_0.8-25-g62597b1_all.deb
--2015-08-25 11:46:06--  http://claudyus.github.io/LXC-Web-Panel/debian/lwp_0.8-25-g62597b1_all.deb
Resolving claudyus.github.io (claudyus.github.io)... 23.235.43.133
Connecting to claudyus.github.io (claudyus.github.io)|23.235.43.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 203066 (198K) [application/octet-stream]
Saving to: ‘lwp_0.8-25-g62597b1_all.deb’

lwp_0.8-25-g62597b1_all.deb                     100%[======================================================================================================>] 198,31K  --.-KB/s   in 0,1s   

2015-08-25 11:46:07 (1,58 MB/s) - ‘lwp_0.8-25-g62597b1_all.deb’ saved [203066/203066]

root@gatekeeper:/usr/local/src/lwp# ar x lwp_0.8-25-g62597b1_all.deb 
root@gatekeeper:/usr/local/src/lwp# ls -l
total 408
-rw-r--r-- 1 root root   2653 авг 25 11:46 control.tar.gz
-rw-r--r-- 1 root root 199540 авг 25 11:46 data.tar.xz
-rw-r--r-- 1 root root      4 авг 25 11:46 debian-binary
-rw-r--r-- 1 root root    620 авг 25 11:46 _gpgbuilder
-rw-r--r-- 1 root root 203066 юни 18 23:48 lwp_0.8-25-g62597b1_all.deb
root@gatekeeper:/usr/local/src/lwp# tar xf data.tar.xz
root@gatekeeper:/usr/local/src/lwp# mkdir pkg-data-dir pkg-contgrol-dir
root@gatekeeper:/usr/local/src/lwp# tar xf data.tar.xz -C pkg-data-dir
root@gatekeeper:/usr/local/src/lwp# tar xf control.tar.gz -C pkg-contgrol-dir
root@gatekeeper:/usr/local/src/lwp# find . -name "lwp.service"
root@gatekeeper:/usr/local/src/lwp# grep service pkg-contgrol-dir/md5sums

Still no lwp.service available.

root@gatekeeper:/usr/local/src/lwp# cp /etc/lwp/lwp.example.conf /etc/lwp.conf
root@gatekeeper:/usr/local/src/lwp# service lwp restart
Failed to restart lwp.service: Unit lwp.service failed to load: No such file or directory.

Please let me know if I'm doing something wrong, but I cannot find systemd file within .deb archive. Thank you in advance.

claudyus commented 8 years ago

hope that this is now resolved at least in 0.9. See readme for upgrade

thetuyo commented 8 years ago

Thanks! It has been fixed. Works perfectly and thanks for all the updates.