mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 77 forks source link

Latest 1.14 docker image fails to start (1.14.5+1) #338

Closed tobias-b-gmx closed 4 months ago

tobias-b-gmx commented 6 months ago

I've seen that you updated the docker images and since in the last 1.14.5 release I manually had to mount the 99-custom.ini file to the proper php8 conf.d directory to make it work and as you switched the packages to php81 in 1.14.5+1, I thought I can just pull the latest image and it will work fine without my work-around, however, with the latest image, humhub doesn't want to start at all.

Probably related to the new Alpine version?

humhub | /docker-entrypoint.sh: Configuration complete; ready for start up humhub | /docker-entrypoint.sh: Entrypoint finished! Launching ... humhub | tail: can't open '/var/www/localhost/htdocs/protected/runtime/logs/app.log': No such file or directory humhub | tail: no files humhub | 2024-01-07 15:29:38,195 WARN exited: humhub-log (exit status 1; not expected) humhub | 2024-01-07 15:29:38,195 WARN exited: humhub-log (exit status 1; not expected) humhub | Traceback (most recent call last): humhub | File "/usr/bin/supervisord", line 33, in humhub | sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')()) humhub | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 359, in main humhub | go(options) humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 369, in go humhub | d.main() humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 78, in main humhub | self.run() humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 94, in run humhub | self.runforever() humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 244, in runforever humhub | self.reap() humhub | File "/usr/lib/python3.11/site-packages/supervisor/supervisord.py", line 281, in reap humhub | process.finish(pid, sts) humhub | File "/usr/lib/python3.11/site-packages/supervisor/process.py", line 585, in finish humhub | self.config.options.logger.warn(msg) humhub | File "/usr/lib/python3.11/site-packages/supervisor/loggers.py", line 331, in warn humhub | self.log(LevelsByName.WARN, msg, **kw) humhub | File "/usr/lib/python3.11/site-packages/supervisor/loggers.py", line 345, in log humhub | handler.emit(record) humhub | File "/usr/lib/python3.11/site-packages/supervisor/loggers.py", line 227, in emit humhub | self.doRollover() humhub | File "/usr/lib/python3.11/site-packages/supervisor/loggers.py", line 264, in doRollover humhub | if not (self.stream.tell() >= self.maxBytes): humhub | ^^^^^^^^^^^^^^^^^^ humhub | OSError: [Errno 29] Invalid seek humhub exited with code 1

tobias-b-gmx commented 6 months ago

Note: same error happens with 1.15.2 ...

infiniteAppsUG commented 6 months ago

I had the same issue, and I dont think its related to the HumHub Version itself. IMPORTANT: I made a clean install to a new database, so there was no need to migrate. So please be careful if you want to upgrade from a previous install, because those steps probably affect your current deployment! However, what worked for me to run HumHub with 1.15.2 was:

docker-compose.yml: [...] humhub:latest [...]

List all containers: docker ps -a

Stop and remove the humhub related containers (for me it was sufficient to stop only humhub/mriedmann since I work with an external DB) docker stop container_name docker rm container_name

Show docker images and remove the humhub related images docker images docker rmi image_name

show and remove the mounted volumes I think this is the most important part, which leads to the error because after unmounting, updating and remounting everything works as expected. Though the previous steps are necessary to unmount successfully

docker volume ls docker volume rm volume_name

EDIT: Removing the volumes is sufficient, so stopping the container and removing them. However HumHub installation will start from the beginning. So probably one needs to backup the three volumes first and re-integrate them afterwards again and include the database in the compose-file so it will be skipped on initial start.

However the problem occurs with every restart of the container.

surface0 commented 6 months ago

I added logfile_maxbytes=0 to supervisord.conf and it fixed it.

[supervisord]
user=root
nodaemon=true
loglevel=warn
pidfile=/var/run/supervisord.pid
logfile=/proc/self/fd/2
logfile_maxbytes=0
stdout_logfile=/proc/self/fd/2
stdout_logfile_maxbytes=0
infiniteAppsUG commented 6 months ago

hey @surface0 : thanks for the hint. I created a local supervisord.conf file and a Dockerfile to make it persistent :

COPY /etc/supervisord.conf /etc/supervisord.conf

-> works! thank you!

tobias-b-gmx commented 6 months ago

I added logfile_maxbytes=0 to supervisord.conf and it fixed it.

Thanks a lot, that helped!

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.