Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Raspberry Pi: crash-loop on startup with 'Fatal Python error: pyinit_main: can't initialize time' #119

Closed
skruehoetl opened this issue Jan 24, 2021 · 4 comments

Comments

@skruehoetl
Copy link

Expected Behaviour

calibre-web starting

Current Behaviour

container starts but calibre-web gets locked in a loop of "pyinit_main: can't initialize time'

Steps to Reproduce

  1. start calibre-web container from docker-compose on Raspberry Pi cluster IN the swarm or OUTSIDE the swarm (same behavior)

Environment

OS: Raspbian Buster
CPU architecture: armhf
How docker service was installed: Docker repo (other linuxserver images working)

Command used to create docker container

copy from docker-compose:

version: "3.2"
services:
ebooks_kids:
image: ghcr.io/linuxserver/calibre-web
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:

- config_calibreweb_kids:/config

  - /served/volumes/calibre_config_calibreweb_kids:/config
  - /served/eLiterature/kids:/books
ports:
  - 8083:8083
deploy:
  replicas: 1
  restart_policy:
    condition: on-failure
    max_attempts: 5
  placement:
    constraints:
      - "node.role==worker"

Docker logs

(excerpt - it's looping)

ebooks_kids_1 | [cont-init.d] 99-custom-scripts: executing...
ebooks_kids_1 | [custom-init] no custom files found exiting...
ebooks_kids_1 | [cont-init.d] 99-custom-scripts: exited 0.
ebooks_kids_1 | [cont-init.d] done.
ebooks_kids_1 | [services.d] starting services
ebooks_kids_1 | [services.d] done.
ebooks_kids_1 | Fatal Python error: pyinit_main: can't initialize time
ebooks_kids_1 | Python runtime state: core initialized
ebooks_kids_1 | PermissionError: [Errno 1] Operation not permitted
ebooks_kids_1 |
ebooks_kids_1 | Current thread 0xb6f57460 (most recent call first):
ebooks_kids_1 |
ebooks_kids_1 | Fatal Python error: pyinit_main: can't initialize time
ebooks_kids_1 | Python runtime state: core initialized
ebooks_kids_1 | PermissionError: [Errno 1] Operation not permitted
ebooks_kids_1 |
ebooks_kids_1 | Current thread 0xb6fcd460 (most recent call first):
ebooks_kids_1 |

Story Mode

I'm running calibre-web on a ebooks_kids_1 | [cont-init.d] 30-config: exited 0.
small cluster of Raspberry Pis (4x RPi3, 1x RPi4). When I set it up some time ago, it worked fine but recently (I can't pin it down to an image update, sorry), the server fails to start up properly. Instead it keeps looping:

ebooks_kids_1 | Current thread 0xb6fc2460 (most recent call first):
ebooks_kids_1 |
ebooks_kids_1 | Fatal Python error: pyinit_main: can't initialize time
ebooks_kids_1 | Python runtime state: core initialized
ebooks_kids_1 | PermissionError: [Errno 1] Operation not permitted

  • First I thought, I'd screwed up the permissions of my config - but they seem to be fine. To make sure, I tested with a blank new docker volume and I got the same error message.
  • I tested the same on my /books mount but no change
  • Then I found a similar issue on Github for another linuxserver image: [BUG] Fatal Python Error: pyinit_main: can't initialize time docker-papermerge#4
  • I messed with a version of the Dockerfile, but failed trying to add the libseccomp2 binary with some permissions errors

Could someone with more docker know-how maybe look at this?

@project-bot project-bot bot added this to To do in Issue & PR Tracker Jan 24, 2021
@github-actions
Copy link

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

@Roxedus
Copy link
Member

Roxedus commented Jan 24, 2021

As noted in the readme, this image got rebased to focal. Check out this link https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal-and-alpine-3-13

@Roxedus Roxedus closed this as completed Jan 24, 2021
Issue & PR Tracker automation moved this from To do to Done Jan 24, 2021
@skruehoetl
Copy link
Author

As noted in the readme, this image got rebased to focal. Check out this link https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal-and-alpine-3-13

Thanks! I didn't get it that I had to update the host OS!

Sorry for bothering you...

@HarvsG
Copy link

HarvsG commented Mar 8, 2021

I Installed the updated version

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

But had no luck

I had to use 'run --privileged' - or rather toggled the 'privileged mode' in portainer. Not great for security

Raspberry pi 4

Edit: Updating my Pi, Docker and doing the above fix allowed me to get it running without privileged mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants