ParadoxAlarmInterface / pai

Paradox Magellan, Spectra and EVO, with MQTT, Signal, Pushbullet, Pushover and others
https://gitter.im/paradox-alarm-interface
Eclipse Public License 2.0
348 stars 92 forks source link

Time init failure after 2.2.5 #203

Closed ipetrovits closed 3 years ago

ipetrovits commented 3 years ago

Alarm system

Environment

Git branch

:latest at docker hub

Describe the bug

PAI is not working with this release, producing time sync errors

To Reproduce

Use the below tags for docker image: :latest :2.3.0 :dev-latest

Workaround

Hardcode the below tag to docker image: :2.2.5

Logs

Terminal and file logging set to DEBUG.

Terminal: This repeats

Current thread 0xb6f66390 (most recent call first):,
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time,
PermissionError: [Errno 1] Operation not permitted

File: no log being generated even with DEBUG set

yozik04 commented 3 years ago

Hi. How you installed PAI?

ipetrovits commented 3 years ago

Hi. How you installed PAI?

Hi, via Docker image, compose file:

version: "3"
services:
  pai:
    container_name: pai
    image: paradoxalarminterface/pai:2.2.5
    restart: unless-stopped
    network_mode: "host"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /opt/pai/config:/etc/pai:ro
      - /opt/pai/log:/var/log/pai
      - /opt/pai/data:/data

Config holds a tailored pai.conf, data maybe totally unneccesary, i don't remember why i made that.. its there since may, 2020.

yozik04 commented 3 years ago

Can you send more log? Use Keybase to encrypt.

ipetrovits commented 3 years ago

Can you send more log? Use Keybase to encrypt.

I have no log file being generated after i use image later than 2.2.5. If i revert back to 2.2.5, logs are generated with the required level. Misread the date in the earlier file, hence i posted log lines. Now i edited the post as well.

yozik04 commented 3 years ago

I have installed same 2.3.0 docker image and it works without problems on my server. Make sure these are accessible:

ipetrovits commented 3 years ago

I have installed same 2.3.0 docker image and it works without problems on my server. Make sure these are accessible:

  • /etc/localtime:/etc/localtime:ro
  • /etc/timezone:/etc/timezone:ro

Using tag :2.2.5 i can log in into terminal and the cat of these files are the same as on the host. Using :latest i can't even get a shell with Docker. Also tried recreating the config file from example, no success.

yozik04 commented 3 years ago

Is 2.3.1 working?

ipetrovits commented 3 years ago

Is 2.3.1 working?

No. same symptoms.

yozik04 commented 3 years ago

I am curios if you can run python:3.7-alpine and python:3.9-alpine docker containers on RPI4 or they fail with same problem.

yozik04 commented 3 years ago

I have built dev branch with python:3.9-alpine. It might help, but can not guarantee.

ipetrovits commented 3 years ago

I have built dev branch with python:3.9-alpine. It might help, but can not guarantee.

Thanks, here are the results:

pai:dev-latest: Fatal Python error: init_interp_main: can't initialize time Python runtime state: core initialized PermissionError: [Errno 1] Operation not permitted Current thread 0xb6f32390 (most recent call first):

python:3.9-alpine: Fatal Python error: init_interp_main: can't initialize time Python runtime state: core initialized PermissionError: [Errno 1] Operation not permitted Current thread 0xb6f3b390 (most recent call first): python:3.7-alpine: Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time PermissionError: [Errno 1] Operation not permitted Current thread 0xb6fb8390 (most recent call first):
ipetrovits commented 3 years ago

Found this: https://github.com/linuxserver/docker-papermerge/issues/4

this instantly resolved my issue: https://docs.linuxserver.io/faq

For RPI4 i need to update libseccomp2 on host to newer version than in the official buster repo.

wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.4.4-1~bpo10+1_armhf.deb
sudo dpkg -i libseccomp2_2.4.4-1~bpo10+1_armhf.deb

Thanks for your time and help!!!!

yozik04 commented 3 years ago

Great, you got it working!