Page 1 of 1

Problems installing WAPT server 1.5 on Debian 8

Published: January 12, 2018 - 4:55 PM
by link6
Good morning,

I'm trying to install WAPT server on a Debian 8 system on a Proxgroup VPS. I'm using Debian 8 because Proxgroup doesn't offer a Debian 9 installation option.

By following the tutorial here: https://www.wapt.fr/fr/doc-1.5/Installa ... ebian.html

When configuring the system language, I get the following error:

Code: Select all

root@SERVEUR:~# localectl set-locale LANG=en_US.utf8
-bash: localectl: command not found
Then :

Code: Select all

root@SERVEUR:~# localectl status
-bash: localectl: command not found
Then, after correctly installing ntp:

Code: Select all

root@SERVEUR:~# systemctl ntpd.service enable
-bash: systemctl: command not found
I'm not very experienced and I don't really know what localectl is, but that seems to be the problem!

FURTHER

During server installation:

Code: Select all

apt-get install tis-waptserver tis-waptrepo tis-waptsetup
I'm having a problem with systemctl:

Code: Select all

Setting up tis-waptserver (1.5.1.15-tisdeb8-4514-329043f0) ...
/bin/sh: 1: systemctl: not found
Traceback (most recent call last):
  File "/var/lib/dpkg/info/tis-waptserver.postinst", line 17, in <module>
    run('systemctl enable  waptserver')
  File "/var/lib/dpkg/info/tis-waptserver.postinst", line 12, in run
    return subprocess.check_output(*args, shell=True, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'systemctl enable  waptserver' returned non-zero exit status 127
dpkg: error processing package tis-waptserver (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 tis-waptserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't know how to install localectl and systemctl. Is this because it's a VPS?
What can I do???

Thank you in advance for your help

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 12, 2018 - 9:11 PM
by dcardon
Hi link6,

your VPS installation is really minimal! The two commands you're missing are provided by systemd. The command line below should do the trick:
`apt-get install systemd systemd-sysv`.

You'll need to reboot the machine for dbus to start up correctly.

Denis

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 13, 2018 - 10:22 PM
by link6
Hi Denis, thank you for your help, I was able to make progress thanks to it!
Actually, I reinstalled my VPS on Debian 8 and then upgraded it to 9.3, and so the packages you indicated were present.

Now, after correctly installing NTP, I have:

Code: Select all

root@SERVEUR:~# systemctl ntpd.service enable
Unknown operation ntpd.service.
Also :
No matter how many times I modify the /etc/hostname file, after rebooting the file the modification is lost!

The server installation ended with an error:

Code: Select all

apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up tis-waptserver (1.5.1.15-tisdeb9-4514-329043f0) ...
Setting up pid and log files
Cleaning up leftovers
Tightening up permissions
Restarting rsyslog
Failed to restart rsyslog.service: No such method 'RestartUnit'
See system logs and 'systemctl status rsyslog.service' for details.
Traceback (most recent call last):
  File "/var/lib/dpkg/info/tis-waptserver.postinst", line 92, in <module>
    run('systemctl restart rsyslog')
  File "/var/lib/dpkg/info/tis-waptserver.postinst", line 12, in run
    return subprocess.check_output(*args, shell=True, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'systemctl restart rsyslog' returned non-zero exit status 1
dpkg: error processing package tis-waptserver (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 tis-waptserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
And

Code: Select all

root@SERVEUR:~# systemctl status rsyslog.service
Failed to get properties: No such interface ''
Any ideas?

Thank you for your help, which allows me to improve my skills a bit... :)

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 15, 2018 - 3:35 PM
by dcardon
link6 wrote: Jan 13, 2018 - 10:22 PM Now, after correctly installing NTP, I have:

Code: Select all

root@SERVEUR:~# systemctl ntpd.service enable
Unknown operation ntpd.service.
With systemd, the order of arguments is reversed (it takes a little while to get used to, but you get used to it eventually...)

Code: Select all

systemctl restart ntpd
Also :
No matter how many times I modify the /etc/hostname file, after rebooting the file the modification is lost!

Can you check that you don't have Network-Manager enabled?

Code: Select all

systemctl status network-manager
If it's installed, you can delete it

Code: Select all

systemctl stop network-manager
 systemctl disable network-manager
 
link6 wrote: Jan 13, 2018 - 10:22 PM The server installation ended with an error:

Code: Select all

apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.utf8"
Do you have local tests that are properly installed? It's a bit of a brute-force approach, but it should do the trick:

Code: Select all

apt-get install locales-all

Code: Select all

subprocess.CalledProcessError: Command 'systemctl restart rsyslog' returned non-zero exit status 1
dpkg: error processing package tis-waptserver (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 tis-waptserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@SERVEUR:~# systemctl status rsyslog.service
Failed to get properties: No such interface ''
Is rsyslog properly installed?

Code: Select all

apt-get install rsyslog
Denis

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 15, 2018 - 10:39 PM
by link6
Hello, thank you for your reply.

Indeed, systemctl works better in the other direction...

NTP is installed correctly, but still:

Code: Select all

Failed to enable unit: File ntpd.service: No such file or directory
Actually, I think that's normal on a recent distribution; from what I've read, the job is done by timedatectl:

Code: Select all

root@SERVEUR:~# timedatectl status
      Local time: Mon 2018-01-15 21:23:17 UTC
  Universal time: Mon 2018-01-15 21:23:17 UTC
        RTC time: n/a
       Time zone: Etc/UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no
However, network-manager is not installed and my /etc/hostname file reverts to the value I gave to proxgroup in the command of my VPS at each reboot.
With the order

Code: Select all

hostname xxx.mondomaine.fr
I have the same problem after rebooting. What can I do? It's very annoying!

The 3 server packages have now been installed without error! Yay!.

However, the post-configuration script crashes:

Code: Select all

Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable postgresql
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Traceback (most recent call last):
  File "/opt/wapt/waptserver/scripts/postconf.py", line 523, in <module>
    main()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 337, in main
    ensure_postgresql_db()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 177, in ensure_postgresql_db
    val = run(""" sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  """, cwd='/opt/wapt')
  File "/opt/wapt/waptserver/scripts/postconf.py", line 65, in run
    return subprocess.check_output(*args, shell=True, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ' sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  ' returned non-zero exit status 2
I have :

Code: Select all

root@SERVEUR:~# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
   Active: active (exited) since Mon 2018-01-15 21:27:47 UTC; 22min ago
 Main PID: 115 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

Jan 15 21:27:47 SERVEUR systemd[1]: postgresql.service: Failed to reset devices.
Jan 15 21:27:47 SERVEUR systemd[1]: Starting PostgreSQL RDBMS...
Jan 15 21:27:47 SERVEUR systemd[1]: Started PostgreSQL RDBMS.
Jan 15 21:27:47 SERVEUR systemd[1]: postgresql.service: Failed to reset devices.
Jan 15 21:42:51 srvwapt.link6.fr systemd[1]: postgresql.service: Failed to reset
lines 2-11/11 (END)
Thank you in advance for your insights ;)

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 16, 2018 - 1:00 PM
by dcardon
I just checked the documentation, and there is indeed a typo between the NTP service name under Debian and CentOS... I'll correct it early this afternoon:
`systemctl enable ntp` `
systemctl restart ntp`

Regarding your `/etc/hostname`, I don't have any specific knowledge about Proxmox to prevent this behavior. You can try the following command to prevent the kernel from changing the name (it's not pretty):
`chattr +i /etc/hostname`

I don't really have any idea why PostgreSQL isn't running on your container. Is it a Proxmox instance with LXC or OpenVZ?

Denis

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 17, 2018 - 4:22 PM
by link6
Thanks again!
Listen, I have no idea if it's Proxmox or something else... It's all completely beyond me, and it's hosted with Proxgroup.

I'm thinking of doing a clean install from Debian 8.7 to see if that helps. Is WAPT 1.5 theoretically compatible?

See you soon,
Sébastien

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 30, 2018 - 00:01
by totof
I have the same problem with postgres after installation

Code: Select all


making a backup copy of the configuration file
Synchronizing state for postgresql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d postgresql defaults
Executing /usr/sbin/update-rc.d postgresql enable
psql: n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
	Le serveur est-il actif localement et accepte-t-il les connexions sur la
 	socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?
Traceback (most recent call last):
  File "/opt/wapt/waptserver/scripts/postconf.py", line 522, in <module>
    main()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 336, in main
    ensure_postgresql_db()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 177, in ensure_postgresql_db
    val = run(""" sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  """, cwd='/opt/wapt')
  File "/opt/wapt/waptserver/scripts/postconf.py", line 65, in run
    return subprocess.check_output(*args, shell=True, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ' sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  ' returned non-zero exit status 2

Code: Select all

root@srvwapt:/# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
   Active: active (exited) since lun. 2018-01-29 23:46:52 CET; 12min ago
 Main PID: 7837 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

janv. 29 23:46:52 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:46:52 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:48:06 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:48:56 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:49:21 srvwapt systemd[1]: Started PostgreSQL RDBMS.

I'm running in an LXC container in case that helps.

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 30, 2018 - 06:49
by link6
Hi,
I ended up reinstalling my VPS with Debian 9.3 and everything went back to normal.
Unfortunately, I don't know how to help you!

Re: Problems installing WAPT server 1.5 on Debian 8

Published: January 30, 2018 - 11:37
by sfonteneau
totof wrote: Jan 30, 2018 - 00:01 I have the same problem with postgres after installation

Code: Select all


making a backup copy of the configuration file
Synchronizing state for postgresql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d postgresql defaults
Executing /usr/sbin/update-rc.d postgresql enable
psql: n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
	Le serveur est-il actif localement et accepte-t-il les connexions sur la
 	socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?
Traceback (most recent call last):
  File "/opt/wapt/waptserver/scripts/postconf.py", line 522, in <module>
    main()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 336, in main
    ensure_postgresql_db()
  File "/opt/wapt/waptserver/scripts/postconf.py", line 177, in ensure_postgresql_db
    val = run(""" sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  """, cwd='/opt/wapt')
  File "/opt/wapt/waptserver/scripts/postconf.py", line 65, in run
    return subprocess.check_output(*args, shell=True, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ' sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';"  ' returned non-zero exit status 2

Code: Select all

root@srvwapt:/# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
   Active: active (exited) since lun. 2018-01-29 23:46:52 CET; 12min ago
 Main PID: 7837 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

janv. 29 23:46:52 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:46:52 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:48:06 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:48:56 srvwapt systemd[1]: Started PostgreSQL RDBMS.
janv. 29 23:49:21 srvwapt systemd[1]: Started PostgreSQL RDBMS.

I'm running in an LXC container in case that helps.

Debian?

I was able to run wapt server on proxmox with LXC so there's no reason why it shouldn't work.