atauenis / webone

HTTP 1.x proxy that makes old web browsers usable again in the Web 2.0 world.
Other
518 stars 18 forks source link

Cannot enable webone.service in systemd #20

Closed mzryz closed 3 years ago

mzryz commented 3 years ago

Hi, I'm struggling to get WebOne to start automatically, using Rapsbian headless.

I try: sudo systemctl enable webone Created symlink /etc/systemd/system/default.target.wants/webone.service → /etc/systemd/system/webone.service.

test the proxy, nothing.. doesn't seem to be running in htop either... Load WebOne normally from the command line, proxy is working... Any ideas? Cheers
atauenis commented 3 years ago

What displays on sudo service webone status? Does sudo service webone start starts the proxy manually? If does, probably need to re-run systemctl disable webone & systemctl enable webone.

atauenis commented 3 years ago

Checked on a fresh Debian 10 x86_64 installation, yes, the bug presents (strange that it hasn't appear on Debian 11 test box):

atauenis@test:~$ sudo service webone status
● webone.service - WebOne HTTP Proxy Server
   Loaded: loaded (/etc/systemd/system/webone.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/atauenis/webone/wiki/
atauenis@test:~$ sudo nano /etc/WebOne/webone.conf
atauenis@test:~$ sudo systemctl enable webone
Created symlink /etc/systemd/system/default.target.wants/webone.service → /etc/systemd/system/webone.service.
atauenis@test:~$ sudo service webone start
atauenis@test:~$ sudo service webone status
● webone.service - WebOne HTTP Proxy Server
   Loaded: loaded (/etc/systemd/system/webone.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/atauenis/webone/wiki/

Feb 01 22:02:39 test systemd[1]: Started WebOne HTTP Proxy Server.
Feb 01 22:02:39 test WebOne[25741]: WebOne HTTP Proxy Server 0.10.4.0
Feb 01 22:02:39 test WebOne[25741]: (C) https://github.com/atauenis/webone
Feb 01 22:02:39 test WebOne[25741]: Using configuration file /etc/WebOne/webone.conf.
Feb 01 22:02:39 test WebOne[25741]: Cannot use log file /var/log/webone.log: Access to the path '/var/log/webone.log' is denied.
Feb 01 22:02:39 test WebOne[25741]: Error: log file is not available, please fix the problem. Exiting.
Feb 01 22:02:39 test systemd[1]: webone.service: Succeeded.
atauenis@test:~$

Trying to fix the service by running commands from postinst script by hand:

atauenis@test:~$ sudo touch /var/log/webone.log
atauenis@test:~$ sudo chmod 666 /var/log/webone.log
atauenis@test:~$ sudo service webone start
atauenis@test:~$ sudo service webone status
● webone.service - WebOne HTTP Proxy Server
   Loaded: loaded (/etc/systemd/system/webone.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-02-01 22:04:51 MSK; 3s ago
     Docs: https://github.com/atauenis/webone/wiki/
 Main PID: 25785 (WebOne)
    Tasks: 12 (limit: 4915)
   Memory: 9.5M
   CGroup: /system.slice/webone.service
           └─25785 /usr/local/bin/WebOne --daemon

Feb 01 22:04:51 test systemd[1]: Started WebOne HTTP Proxy Server.
Feb 01 22:04:51 test WebOne[25785]: WebOne HTTP Proxy Server 0.10.4.0
Feb 01 22:04:51 test WebOne[25785]: (C) https://github.com/atauenis/webone
Feb 01 22:04:52 test WebOne[25785]: Using configuration file /etc/WebOne/webone.conf.
Feb 01 22:04:52 test WebOne[25785]: Using event log file /var/log/webone.log.
Feb 01 22:04:52 test WebOne[25785]: The proxy runs in daemon mode. See all messages in the log file.
atauenis@test:~$

Working.

Seems that there is a bug in post-install script in .deb package.

atauenis commented 3 years ago

Re-uploaded Linux binaries of v.0.10.4, so they should not have this bug.

mzryz commented 3 years ago

Re-uploaded Linux binaries of v.0.10.4, so they should not have this bug.

Thank you for fixing so quickly!