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

[Alpine] [Armv7] [RaspberryPi] Problem with timeclock #51

Closed
odin568 opened this issue Jun 8, 2021 · 6 comments
Closed

[Alpine] [Armv7] [RaspberryPi] Problem with timeclock #51

odin568 opened this issue Jun 8, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@odin568
Copy link
Contributor

odin568 commented Jun 8, 2021

Hi,
I switched to 2.3.0 and also wanted to use the alpine based image instead of the regular one.
Unfortunatly I ran into an error. I assume it is because my RaspberryPi 3b+ does not have a realtime clock. I had the same problem in the past with a SpringBoot Schedule in a Java App. It did just not work at all - did not find a solution so worked around that problem.

Logs using 2.3.0-nginx1.21.0-alpine

/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
Starting the Nginx service
Starting the certbot autorenewal service
2037/06/08 18:50:16 [notice] 91#91: using the "epoll" event method
2037/06/08 18:50:16 [notice] 91#91: nginx/1.21.0
2037/06/08 18:50:16 [notice] 91#91: built by gcc 10.2.1 20201203 (Alpine 10.2.1_pre1) 
2037/06/08 18:50:16 [notice] 91#91: OS: Linux 5.10.17-v7+
2037/06/08 18:50:16 [notice] 91#91: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2037/06/08 18:50:16 [notice] 91#91: start worker processes
2037/06/08 18:50:16 [notice] 91#91: start worker process 113
2037/06/08 18:50:16 [notice] 91#91: start worker process 114
2037/06/08 18:50:16 [notice] 91#91: start worker process 116
2037/06/08 18:50:16 [notice] 91#91: start worker process 119
Starting certificate renewal process
Requesting an RSA certificate for 'XXXXXXXXXXXXXXXXx.de'
Fatal Python error: pyinit_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted
Current thread 0x76f16390 (most recent call first):
<no Python frame>
Certbot failed for 'XXXXXXXXXXXXXXX.de'. Check the logs for details.
2037/05/22 09:16:24 [notice] 211#211: signal process started
2037/06/08 18:36:08 [notice] 91#91: signal 1 (SIGHUP) received from 211, reconfiguring
2037/06/08 18:52:32 [notice] 91#91: reconfiguring
Certbot autorenewal service will now sleep 8d
/scripts/start_nginx_certbot.sh: line 99:    91 Segmentation fault      (core dumped) nginx -g "daemon off;"
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh

Same thing but with the 2.3.0-nginx1.21.0 image:

/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
Starting the Nginx service
Starting the certbot autorenewal service
2021/06/08 18:28:26 [notice] 91#91: using the "epoll" event method
2021/06/08 18:28:26 [notice] 91#91: nginx/1.21.0
2021/06/08 18:28:26 [notice] 91#91: built by gcc 8.3.0 (Debian 8.3.0-6) 
2021/06/08 18:28:26 [notice] 91#91: OS: Linux 5.10.17-v7+
2021/06/08 18:28:26 [notice] 91#91: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/06/08 18:28:26 [notice] 91#91: start worker processes
2021/06/08 18:28:26 [notice] 91#91: start worker process 111
2021/06/08 18:28:26 [notice] 91#91: start worker process 112
2021/06/08 18:28:26 [notice] 91#91: start worker process 113
2021/06/08 18:28:26 [notice] 91#91: start worker process 114
Starting certificate renewal process
Requesting an RSA certificate for 'XXXXXXXXXXXXX.de'
Certificate not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Certificate not yet due for renewal; no action taken.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Saving debug log to /var/log/letsencrypt/letsencrypt.log
2021/06/08 18:28:31 [notice] 209#209: signal process started
2021/06/08 18:28:31 [notice] 91#91: signal 1 (SIGHUP) received from 209, reconfiguring
2021/06/08 18:28:31 [notice] 91#91: reconfiguring
Certbot autorenewal service will now sleep 8d
2021/06/08 18:28:31 [notice] 91#91: using the "epoll" event method
2021/06/08 18:28:31 [notice] 91#91: start worker processes
2021/06/08 18:28:31 [notice] 91#91: start worker process 211
2021/06/08 18:28:31 [notice] 91#91: start worker process 212
2021/06/08 18:28:31 [notice] 91#91: start worker process 213
2021/06/08 18:28:31 [notice] 91#91: start worker process 214
2021/06/08 18:28:31 [notice] 113#113: gracefully shutting down
2021/06/08 18:28:31 [notice] 111#111: gracefully shutting down
2021/06/08 18:28:31 [notice] 114#114: gracefully shutting down
2021/06/08 18:28:31 [notice] 113#113: exiting
2021/06/08 18:28:31 [notice] 111#111: exiting
2021/06/08 18:28:31 [notice] 114#114: exiting
2021/06/08 18:28:31 [notice] 114#114: exit
2021/06/08 18:28:31 [notice] 111#111: exit
2021/06/08 18:28:31 [notice] 113#113: exit
2021/06/08 18:28:31 [notice] 112#112: gracefully shutting down
2021/06/08 18:28:31 [notice] 112#112: exiting
2021/06/08 18:28:31 [notice] 112#112: exit
2021/06/08 18:28:32 [notice] 91#91: signal 17 (SIGCHLD) received from 114
2021/06/08 18:28:32 [notice] 91#91: worker process 114 exited with code 0
2021/06/08 18:28:32 [notice] 91#91: signal 29 (SIGIO) received
2021/06/08 18:28:32 [notice] 91#91: signal 17 (SIGCHLD) received from 112
2021/06/08 18:28:32 [notice] 91#91: worker process 112 exited with code 0
2021/06/08 18:28:32 [notice] 91#91: worker process 113 exited with code 0
2021/06/08 18:28:32 [notice] 91#91: signal 29 (SIGIO) received
2021/06/08 18:28:32 [notice] 91#91: signal 17 (SIGCHLD) received from 111
2021/06/08 18:28:32 [notice] 91#91: worker process 111 exited with code 0
2021/06/08 18:28:32 [notice] 91#91: signal 29 (SIGIO) received
@JonasAlfredsson
Copy link
Owner

Huh, that is something new. As said before, I do not own a RasberryPi myself, so I have a hard time testing stuff like this.
However, some quick searching lead me to this comment (along with its source)

There seems to be an incompatibility with the latest Debian and Alpine (3.13) images and a too old library on the host machine. Can you try to update that and report back if it helped?

@JonasAlfredsson JonasAlfredsson added the bug Something isn't working label Jun 9, 2021
@odin568
Copy link
Contributor Author

odin568 commented Jun 16, 2021

Yeah, every post is at the end routing to the same issue...
For myself, I decided to not use the alpine image in this case in order not to touch the installed distro at all. Reason: Running in our local fire department and never know how long I maintain this. That was also the reason to switch to this nginx solution as it was hard after years to reverse engineer what I did 😄
But think with this solution it should work then. Will close this as not an issue with your work.
Cheers!

@odin568 odin568 closed this as completed Jun 16, 2021
@JonasAlfredsson
Copy link
Owner

Hmmm, this may be out of scope for you, but have you looked into automation tools such as Ansible for managing this deployment?

@odin568
Copy link
Contributor Author

odin568 commented Jun 18, 2021

Hey,
yeah sure. I am working with Ansible also in work. Problem is as I have built up quite some infrastructure for our fire department that there should be anyone else being able to understand what is happening. Most people I needed to convince that sending Excels to edit around by mail is not the best collaboration option - so want to make it as simple as possible.
That's why I stumbled about your Repo as yeah you need to know some basic docker stuff, but then you have the chance to see completely what is going on. In opposite I had a Raspi running and not even I - who set it up years before - could easily reverse engineer how things were installed on troubleshooting.
So now, my documentation is:

  • Install DietPI
  • Install Docker and Docker-Compose
  • Download generated docker-compose.yml from my repo where I extend your container (currently private repo, if you need an example repo can also make it public as no secrets are in there)
  • docker-compose up -d
    I hope this is simple enough for people not in depth aware of concepts :-)
    BR, Markus

@JonasAlfredsson
Copy link
Owner

Your project sounds really interesting, so you are managing the IT infrastructure for a small fire department or just the RPi for hosting a local webpage?

Great that you are familiar with Ansible, and while you have much better knowledge of what can be done in your situation it sounds to me that it could actually help reduce the installation steps to basically:

  • Install Ansible
  • Run this playbook against this IP

Having all the installation steps spelled out in Ansible commands is quite nice when trying to debug as well.
But as said, I have no clue about your overall situation so if it works for you as it is now I will not push this further :)

In regards to the private repository; if you need any help or want to discuss the code I am more than up for it :)

@odin568
Copy link
Contributor Author

odin568 commented Jun 28, 2021

Finally I made it :) So yeah will have a look again to Ansible. Perhaps simpler as I thought in the beginning ;)

Regarding Repos. Also in order to share, I made my Repo public:
https://github.com/FFW-Baudenbach/FE2_ReverseProxy

If interested, some words: At our local fire department, we get a good old fax if something happens. Then we have mobile alarms (dedicated devices) and the good old siren. Nevertheless nowadays, we want to get something on our mobiles, at least some more detailed information. So there is a quite popular Software in Germany for such cases we use. Unfortunately it is for Windows and offers also a WebUI for some tasks. Unsecured on port 80 http. So making it secure it everybodys own problem. Therefor I use your Repo as a base to act as a reverse proxy. In addition I extended the software a bit to generate maps (routes, overviews, etc.) via Google Static Maps API. Those I use for printing and add as attachment to mails. So I also need to make them publically available. This Java Service (https://github.com/FFW-Baudenbach/FE2_Kartengenerierung) stores the image in a mounted folder. This folder is also mounted into the nginx container and thereby I can access them from outside (without regenerating them or implement custom caching, etc.). There are some more Repos around like extracting everything with (felt) hundreds of regex out of the fax etc. So yeah, once I started will be hard to handover someday :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants