docker container start error
I started poste.io docker containerthe follwoing command:
docker run \
-p 25:25 \
-p 80:80 \
-p 443:443 \
-p 110:110 \
-p 143:143 \
-p 465:465 \
-p 587:587 \
-p 993:993 \
-p 995:995 \
-v /etc/localtime:/etc/localtime:ro \
-v /srv/docker/mail:/data \
-t analogic/poste.io
I got the following error message:
Poste.io container should be running now at http://172.17.0.4
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
2018/07/14 19:00:09 [emerg] 12122#12122: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
[14-Jul-2018 19:00:09] ERROR: Unable to create the PID file (/run/php/php7.2-fpm.pid).: No such file or directory (2)
[14-Jul-2018 19:00:09] ERROR: FPM initialization failed
Comments (12)
-
-
reporter I deleted the "/" but I got the same error.
-
reporter - edited description
-
Use "docker ps" to see if a container was created. You'll need to remove it and then run your script to start the container again.
-
reporter I deleted the container and the mounted volume data too, and after I restarted the container but I got the same error.
I paste the process what I did.
[root@srv01 ~]# docker ps | grep 'analogic' cf18fc98988e analogic/poste.io "/init" 9 minutes ago Up 9 minutes 0.0.0.0:25->25/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:110->110/tcp, 0.0.0.0:143->143/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:465->465/tcp, 0.0.0.0:587->587/tcp, 0.0.0.0:993->993/tcp, 0.0.0.0:995->995/tcp, 4190/tcp amazing_mayer [root@srv01 ~]# docker rm -f cf18fc98988e cf18fc98988e [root@srv01 ~]# rm -rf /srv/docker/ mail/ redmine/ [root@srv01 ~]# rm -rf /srv/docker/mail/ [root@srv01 ~]# docker ps | grep 'analogic' [root@srv01 ~]# docker run \ > -p 25:25 \ > -p 80:80 \ > -p 443:443 \ > -p 110:110 \ > -p 143:143 \ > -p 465:465 \ > -p 587:587 \ > -p 993:993 \ > -p 995:995 \ > -v /etc/localtime:/etc/localtime:ro \ > -v /srv/docker/mail:/data \ > -t analogic/poste.io [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-override-defaults.sh: executing... [cont-init.d] 01-override-defaults.sh: exited 0. [cont-init.d] 02-directories.sh: executing... * creating /data/log directory mv: setting attribute 'security.selinux' for 'security.selinux': Operation not permitted mv: setting attribute 'security.selinux' for 'security.selinux': Operation not permitted mv: cannot remove '/var/log/journal/2ea6cd55b69b': Device or resource busy * creating /data/log/s6 directory * initalizing /data/log/dmarc directory * initalizing /data/log/delivery directory * initalizing /data/redis directory * initalizing /data/quarantine directory * initalizing /data/var/rspamd directory chown: cannot access '/var/log/clamav': No such file or directory [cont-init.d] 02-directories.sh: exited 1. [cont-init.d] 03-zpush.sh: executing... * initalizing Z-Push working directory * initalizing Z-Push log directory [cont-init.d] 03-zpush.sh: exited 0. [cont-init.d] 05-domains.sh: executing... * creating /data/domains directory [cont-init.d] 05-domains.sh: exited 0. [cont-init.d] 20-apply-server-config: executing... * applying /data/server.ini settings [cont-init.d] 20-apply-server-config: exited 0. [cont-init.d] 21-ssl-certificate.sh: executing... * initalizing certificates * creating /data/ssl directory for certificates [cont-init.d] 21-ssl-certificate.sh: exited 0. [cont-init.d] 22-lets-encrypt-init.sh: executing... * creating /data/ssl/letsencrypt directory for let's encrypt certificates [cont-init.d] 22-lets-encrypt-init.sh: exited 0. [cont-init.d] 23-nginx.sh: executing... * setting NGiNX to run with TLS certificate [cont-init.d] 23-nginx.sh: exited 0. [cont-init.d] 24-roundcube.sh: executing... * initalizing new Roundcube database [cont-init.d] 24-roundcube.sh: exited 0. [cont-init.d] 31-admin-dirs.sh: executing... touch: cannot touch '/data/log/admin-app/test.log': No such file or directory chown: cannot access '/data/log/admin-app/test.log': No such file or directory [cont-init.d] 31-admin-dirs.sh: exited 1. [cont-init.d] 32-database.sh: executing... * initalizing Users database upgrading database - adding fields for relay blocking [cont-init.d] 32-database.sh: exited 0. [cont-init.d] 33-domains.sh: executing... * initalizing settings for domains [cont-init.d] 33-domains.sh: exited 0. [cont-init.d] 34-clamav.sh: executing... [cont-init.d] 34-clamav.sh: exited 0. [cont-init.d] 99-custom-plugins: executing... [cont-init.d] 99-custom-plugins: exited 0. [cont-init.d] done. [services.d] starting services Poste.io container should be running now at http://172.17.0.4 [services.d] done. nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory) 2018/07/14 19:56:35 [emerg] 645#645: open() "/var/log/nginx/access.log" failed (2: No such file or directory) ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log). [14-Jul-2018 19:56:35] ERROR: Unable to create the PID file (/run/php/php7.2-fpm.pid).: No such file or directory (2) [14-Jul-2018 19:56:35] ERROR: FPM initialization failed Poste.io container should be running now at http://172.17.0.4 nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory) 2018/07/14 19:56:36 [emerg] 804#804: open() "/var/log/nginx/access.log" failed (2: No such file or directory) ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log). [14-Jul-2018 19:56:36] ERROR: Unable to create the PID file (/run/php/php7.2-fpm.pid).: No such file or directory (2) [14-Jul-2018 19:56:36] ERROR: FPM initialization failed
-
repo owner These lines are strange:
mv: setting attribute 'security.selinux' for 'security.selinux': Operation not permitted mv: setting attribute 'security.selinux' for 'security.selinux': Operation not permitted mv: cannot remove '/var/log/journal/2ea6cd55b69b': Device or resource busy
Is /srv folder somewhat special? Is there same error when you use /tmp/mailserver or different folder? What system are you using?
-
reporter Same error if I change the mounted data volume to /tmp. I pasted OS information what I use. This error message is really strange because I disabled the selinux option, that's why I don't know what the security.selinux error message is.
[root@srv01 ~]# cat /etc/centos-release CentOS Linux release 7.5.1804 (Core) [root@srv01 ~]# sestatus SELinux status: disabled [root@srv01 ~]# docker -v Docker version 1.13.1, build 94f4240/1.13.1
-
reporter I tested same command on my linux (archlinux), it works without errors.
-
Add "sudo" in front of your docker command.
sudo docker blah blah blah
-
reporter I tested the same command on another instance and on another cloud provider and it works without error. I think the problem was the hetzner vps default configuration because I didn't modify it.
-
reporter I changed the docker version from centos default to docker CE version and it works. Thank you for your help!
[root@srv01 ~]# yum list installed | grep docker docker.x86_64 2:1.13.1-63.git94f4240.el7.centos @extras
to
[root@srv01 ~]# yum list installed | grep docker docker-ce.x86_64 18.03.1.ce-1.el7.centos @docker-ce-stable
-
reporter - changed status to resolved
- Log in to comment
Recheck your volume specified for your container.. looks like you have two "/" forward slashes.