Any known issues with logging i.e. log-rotating is broken?

Hi!
Are there any known issues with the logging functionalty of privacyidea?
I have privacyIDEA 3.9 running in DEBUG-Mode and it seems to me, pi is logging randomly in all the log files, see:

-rw-r--r--  1 privacyidea privacyidea  476600 Dec  8 13:47 privacyidea.log
-rw-r--r--  1 privacyidea privacyidea 2677886 Dec  8 14:03 privacyidea.log.1
-rw-r--r--  1 privacyidea privacyidea 7964383 Dec  8 13:48 privacyidea.log.2
-rw-r--r--  1 privacyidea privacyidea 6492662 Dec  7 11:51 privacyidea.log.3
-rw-r--r--  1 privacyidea privacyidea 2483113 Dec  8 13:46 privacyidea.log.4
-rw-r--r--  1 privacyidea privacyidea 4175565 Dec  8 13:47 privacyidea.log.5

Shouldn’t the expected behavior be that old logs are in privacyidea.log.x and recent ones are in privacyidea.log?

In pi.cfg, I have:

# PI_LOGFILE = '....'
PI_LOGLEVEL = 10

PI is running on Debian 12 in a venv with python 3.8.18 as user ‘privacyidea’, installed via pip.

Maybe, someone can help me with that?

To my knowledge Debian 12 ships Python 3.11.
Python 3.11 is not supported by privacyIDEA, yet.

I am not sure, if this is the reason. You could actually look into the file entries.
Check for ntp?
Check the logic of you setup. Some redundt file system - who writes these files?

But you need to stick to Python 3.10 max.

Yes, I know. This is the (ansible) way, I install Python before I setup a virtual environment with it:

the variables:

python_version: "3.8.18"
#############
arr: "{{ python_version | split('.') }}"
py_ver: "{{ arr[0] }}.{{ arr[1] }}"
#############

destination: "/usr/local/share"

The task file:

---
- name: install prerequisites
  ansible.builtin.apt:
    name:
      - build-essential
      - zlib1g-dev
      - libncurses5-dev
      - libgdbm-dev
      - libnss3-dev
      - libssl-dev
      - libsqlite3-dev
      - libreadline-dev
      - libffi-dev
      - curl
      - libbz2-dev
    update_cache: true


- name: download Python {{ python_version }}
  ansible.builtin.unarchive:
    dest: "/root"
    src: "https://www.python.org/ftp/python/{{ python_version }}/Python-{{ python_version }}.tgz"
    remote_src: true
    creates: "/root/Python-{{ python_version }}"

- name: Move it
  ansible.builtin.command:
    cmd: "mv /root/Python-{{ python_version }} {{ destination }}/python{{ py_ver }}"

- name: Configure
  ansible.builtin.command:
    chdir: "{{ destination }}/python{{ py_ver }}"
    cmd: "./configure --enable-optimizations"

- name: Install Python {{ python_version }} besides system-wide Python version
  ansible.builtin.command:
    chdir: "{{ destination }}/python{{ py_ver }}"
    cmd: "make altinstall"
    creates: "/usr/local/bin/python{{ py_ver }}"

The head of the privacyidea install task file:

---
# installation tasks file for privacyidea

- name: privacyidea Installation
  block:
    - name: Set up venv and install stuff
      ansible.builtin.pip:
        chdir: "{{ pi_dir }}"
        virtualenv: "{{ pi_dir }}"
        virtualenv_command: "/usr/local/bin/python{{ py_ver }} -m venv"
        name:
          - pip
          - wheel
          - pymysql-sa
          - pexpect
          - gunicorn
          - cx_Oracle
        state: latest

    - name: Install privacyidea requirements
      ansible.builtin.pip:
        chdir: "{{ pi_dir }}"
        virtualenv: "{{ pi_dir }}"
        virtualenv_command: "/usr/local/bin/python{{ py_ver }} -m venv"
        virtualenv_python: "python{{ py_ver }}"
        requirements: "https://raw.githubusercontent.com/privacyidea/privacyidea/v{{ pi_version }}/requirements.txt"

    - name: Install privacyidea
      ansible.builtin.pip:
        chdir: "{{ pi_dir }}"
        virtualenv: "{{ pi_dir }}"
        virtualenv_command: "/usr/local/bin/python{{ py_ver }} -m venv"
        name: "privacyidea=={{ pi_version }}"
  become: true
  become_user: "{{ sys_user }}"

with

  • sys_user: “privacyidea”
  • pi_dir: “/opt/privacyidea”
  • py_ver: “3.8”
  • pi_version: “3.9”