Error 502 after update 2.6

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
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 4, 2024 - 4:32 PM

Good morning,

I updated our WAPT server to version 2.6 and I now have a 502 error on the web page and I can no longer log in to the admin console.

I followed this documentation: https://www.wapt.fr/fr/doc/wapt-server-upgrade.html

I'm stuck on the Keberos verification because I don't know how to enter credentials, but the configuration is theoretically correct. Here's the error message:

Code: Select all

{'success': False, 'groups': [], 'error': False, 'msg': 'Kerberos EGssApi: Failed to acquire credentials for specified user - No credentials were supplied, or the credentials were unavailable or inaccessible'}
- Installed WAPT version: upgraded from 2.5 to 2.6
- Server OS: Linux debian 12
- Operating system of the administration machine: Windows 11
Last edited by Sphinx on Dec 10, 2024 - 5:24 PM, edited 1 time.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 5, 2024 - 10:17 AM

Hello Sphinx,

are there any server-side logs? Is the Kerberos module properly loaded in Nginx? Did you successfully run the postconf? Are you using a DNS name to connect? Do you receive a service ticket on the client side when you try to connect, etc.?

The WAPT server's web interface is now protected by authentication (login/password or Kerberos).

Was the Kerberos configuration working before?

Best regards,

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
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 5, 2024 - 10:59

Hello,

I reverted to a previous snapshot to continue using WAPT while I try to figure out what's wrong, but I'm going to try the update again to see if there's anything in the logs and if the Kerberos module loads correctly.

I followed the documentation for the update carefully, and I even had to add the line `dns_lookup_realm = true` to `/etc/krb5.conf`. I also ran the postconf script.

What do you mean by "a client-side service ticket"?

And yes, Kerberos works perfectly in version 2.5.

Thank you for your help!
fschelfaut
Messages: 30
Registration: Nov 7, 2024 - 12:22

December 5, 2024 - 12:08 PM

Good morning,

Once you upgraded to WAPT version 2.6, did you run the following script? /opt/wapt/waptserver/scripts/testing-ldap-connectivity.sh
It allows you to test and validate the WAPT server configuration!

In your file krb5.conf Do you only have these settings? (Everything else can be removed):

Code: Select all

[libdefaults]
  default_realm = MYDOMAIN.LAN
  dns_lookup_kdc = true
  dns_lookup_realm = true
Flavien,
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 5, 2024 - 4:07 PM

Good morning,

Yes, I was referring to the script /opt/wapt/waptserver/scripts/testing-ldap-connectivity.sh when I mentioned this error in my first message:
I'm stuck on the Keberos verification because I don't know how to enter credentials, but the configuration is theoretically correct. Here's the error message:

Code: Select all

{'success': False, 'groups': [], 'error': False, 'msg': 'Kerberos EGssApi: Failed to acquire credentials for specified user - No credentials were supplied, or the credentials were unavailable or inaccessible'}

As I said, I had to add the line "dns_lookup_realm = true" to krb5.conf, the other two were already present.
When you say I can delete everything else, is it recommended to do so? Because I have lines after in my current configuration.

Thank you for your help
Last edited by Sphinx on Dec 10, 2024 - 5:25 PM, edited 1 time.
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 10, 2024 - 3:29 PM

Good morning,

I tried running the update again and I'm getting this error in the waptserver logs:

Code: Select all

 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1199: ordinal not in range(128)
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 10, 2024 - 4:37 PM

Hello Sphinx,

this message lacks some context. There must be other things on the line; what comes before/after?

Regards,

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
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 10, 2024 - 5:19 PM

Yes, I have those lines above

Code: Select all

2024-12-10T15:14:37.911627+01:00 SRVWAPT waptserver[55255]: WaptMemcache server started on port 11212
2024-12-10T15:14:37.911785+01:00 SRVWAPT waptserver[55255]: 2024-12-10T14:14:36
2024-12-10T15:14:37.911813+01:00 SRVWAPT waptserver[55255]: OK started
2024-12-10T15:14:37.911833+01:00 SRVWAPT waptserver[55255]: Keys Count 1
2024-12-10T15:14:37.911847+01:00 SRVWAPT waptserver[55255]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1199: ordinal not in range(128)
2024-12-10T15:18:34.814776+01:00 SRVWAPT waptserver[612]: Traceback (most recent call last):
2024-12-10T15:18:34.814855+01:00 SRVWAPT waptserver[612]:   File "<string>", line 92, in <module>
2024-12-10T15:18:34.814890+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/waptserver/model.py", line 52, in <module>
2024-12-10T15:18:34.815140+01:00 SRVWAPT waptserver[612]:     from waptserver.app import app
2024-12-10T15:18:34.815172+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/waptserver/app.py", line 36, in <module>
2024-12-10T15:18:34.815468+01:00 SRVWAPT waptserver[612]:     app = FlaskApp(__name__, static_folder='./templates/static')
2024-12-10T15:18:34.815508+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/waptserver/app.py", line 28, in __init__
2024-12-10T15:18:34.815518+01:00 SRVWAPT waptserver[612]:     self.conf = load_config()
2024-12-10T15:18:34.815527+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/waptserver/config.py", line 203, in load_config
2024-12-10T15:18:34.815994+01:00 SRVWAPT waptserver[612]:     _config.read(cfgfile)
2024-12-10T15:18:34.816027+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/lib/python3.9/configparser.py", line 697, in read
2024-12-10T15:18:34.816936+01:00 SRVWAPT waptserver[612]:     self._read(fp, filename)
2024-12-10T15:18:34.816984+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/lib/python3.9/configparser.py", line 1020, in _read
2024-12-10T15:18:34.817155+01:00 SRVWAPT waptserver[612]:     for lineno, line in enumerate(fp, start=1):
2024-12-10T15:18:34.817196+01:00 SRVWAPT waptserver[612]:   File "/opt/wapt/lib/python3.9/encodings/ascii.py", line 26, in decode
2024-12-10T15:18:34.817638+01:00 SRVWAPT waptserver[612]:     return codecs.ascii_decode(input, self.errors)[0]
2024-12-10T15:18:34.817676+01:00 SRVWAPT waptserver[612]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1199: ordinal not in range(128)
Sphinx
Messages: 8
Registration: December 4, 2024 - 3:41 PM

December 17, 2024 - 3:56 PM

Hello,

I'm writing to bring up my problem again.
Does anyone have any idea what might be causing it?

Sincerely.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

December 17, 2024 - 5:43 PM

It looks like a waptserver.ini file that isn't encoded in UTF-8 but contains non-ASCII characters?
Are there any accented characters or anything like that in your server configuration file?
Tranquil IT
Answer