Problems installing WAPT server 1.5 on Debian 8

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
link6
Messages: 6
Registration: January 5, 2018 - 5:46 PM

January 12, 2018 - 4:55 PM

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
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

January 12, 2018 - 9:11 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
link6
Messages: 6
Registration: January 5, 2018 - 5:46 PM

January 13, 2018 - 10:22 PM

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... :)
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

January 15, 2018 - 3:35 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
link6
Messages: 6
Registration: January 5, 2018 - 5:46 PM

January 15, 2018 - 10:39 PM

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 ;)
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

January 16, 2018 - 1:00 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
link6
Messages: 6
Registration: January 5, 2018 - 5:46 PM

January 17, 2018 - 4:22 PM

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
totof
Messages: 1
Registration: January 29, 2018 - 11:58 PM

January 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.
link6
Messages: 6
Registration: January 5, 2018 - 5:46 PM

January 30, 2018 - 06:49

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!
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

January 30, 2018 - 11:37

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.
Locked