Fail to retrieve audit log in WEB UI

Hi !

I’m working in company where I deployed VPN solution for remote access with MFA (privacyidea).
I want to migrate the servers into a Galera MariaDB Cluster but before I do that, I want to fix one issue I encounter that is I can’t see the audit log anymore in the web UI.

as you can see in the image below

error_audit_PI

It says: "
Failed to retrieve a valid JSON response from the server PrivacyIdea"

I search on the forum and no one as already encounter this issue :confused:

Do you have an idea ? I have the 3.5.2 version of PI and I have installed it with apt get on NGINX server.

Thanks !

  • Take a look in the browser developer mode
  • Take a look in the log file.
1 Like

Hello,

i have the same problem.
We want to use privacyIDEA for MFA with freeradius.
I made a fresh installation of Ubuntu 20.04 LTS, updated everything and installed freeradius.
Then i followed this guide: 2.2. Ubuntu Packages — privacyIDEA 3.6 documentation to install privacyIDEA 3.6.2
Now when i try to show the audit log, i get the same error as above.
privacyIDEA-error

This is in the error.log:

2021/07/30 14:34:55 [error] 4594#4594: *256 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: *client-ip*, server: privacyidea, request: "GET /audit/?action=**&action_detail=**&administrator=**&client=**&date=**&duration=**&info=**&page=1&page_size=10&policies=**&privacyidea_server=**&realm=**&resolver=**&serial=**&sortorder=desc&startdate=**&success=**&tokentype=**&user=** HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/app/privacyidea/privacyidea.socket:", host: "*host-ip*", referrer: "https://*host-ip*/"

Maybe someone here has an idea why this could be. Did I do something wrong?
Thank you in advance!

Many greetings

EDIT: Sorry, I forgot to say that this is also the privacyidea-nginx version.

Hello Colin,

how did you install privacyIDEA. I checked a default setup on Ubuntu 20.04 with privacyidea-nginx, which shows no errors.

ii  privacyidea                          3.6.2-1focal                      amd64        two-factor authentication system e.g. for OTP devices
ii  privacyidea-nginx                    3.6.2-1focal                      all          2FA system. This is a meta package to install privacyidea with nginx

Best regards,

Henning

1 Like

Hello Henning,

first of all, I would like to thank you for taking the time to investigate the problem.

As I wrote above, I followed every step in the documentation under point:
2. Installation → 2.2 Ubuntu Packages.

I am using a VM that runs under HyperV, i don’t know if that matters.
I have to admit that I’m not a Linux pro.
But I get along pretty well with command lines, which is why I don’t assume that I made a mistake during the installation. But you never know.

So I installed the VM with Ubuntu 20.04 LTS.
I updated everything with apt-get update and apt-get upgrade.
Then I installed freeradius.

After that i followed the documentation:

  1. Added the repository
  • downloaded the key
  • checked the fingerprint of the key
  • added the key to the machine
  • added the repository for focal with:
    add-apt-repository http://lancelot.netknights.it/community/focal/stable
  1. Installed privacyIDEA
  • apt update
  • apt install privacyidea-nginx
  1. Installed FreeRADIUS plugin
  • apt-get install privacyidea-radius

I’ve tried this several times, but always with the same result. i even tried ubuntu 18.04.
Then I installed the apache2 version, which apparently works. (the audit log can be read but there is one line with the name “missing line” which always shows an error if i open the audit.)
privacyIDEA-error_apache

I also got the authentication to work with Radius.

However, I also have a problem with the apache2 version, which does not fit the topic here.
If possible, I would like to try to get the nginx version to work.

Thanks for your support!

Best regards,

Colin

Hi Colin,
so your subject is wrong. You obviously fetch the audit log, right?

The red mark is a feature, because we can not know, if the last entry you are seeing is really the last entry.

1 Like

Hello cornelinux,

thank you for your reply.

I can read the audit log with the apache2 version, but not with the nginx version.
Please excuse me if I have not expressed myself correctly.
After trying it several times with nginx, i also installed the apache2 version to see if it works.

Thanks for the information regarding the “missing line” I wasn’t sure if this is normal.

Best regards,

Colin

Hi there,

I just found the issue myself !

The audit logs are displayed… when I’m in private session on Google Chrome !
On the normal session, it does not display, that’s a bit weird, I cleared the cookies and cache nothing changes…

As you can see below the detail:

privacyidea_bug

I will try some tweak to find what is the source of the issue.

1 Like

Hi,

thank you for your research, see github pull request from @plettich
https://github.com/NetKnights-GmbH/ubuntu/pull/52

BR

Julio

1 Like

Perfect, now it works without any problems.
I increased the buffer size as described.
If someone still has the problem (the file path may differ, I’m using Ubuntu):

Go to the file /etc/uwsgi/apps-available/privacyidea.xml
and add this: <buffer-size>8192</buffer-size>

Thank you all for your support!

With best regards
Colin

1 Like