cozy-labs / cozy-docker

Dockerfile to build an official Cozy image
44 stars 26 forks source link

cozy-init entered FATAL state #30

Open insideGen opened 7 years ago

insideGen commented 7 years ago

Hi, I have encountered an issue when starting container:

CRIT Supervisor running as root (no user in config file)
INFO Included extra file "/etc/supervisor/conf.d/couchdb.conf" during parsing
INFO Included extra file "/etc/supervisor/conf.d/cozy-controller.conf" during parsing
INFO Included extra file "/etc/supervisor/conf.d/cozy-init.conf" during parsing
INFO Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
INFO Included extra file "/etc/supervisor/conf.d/postfix.conf" during parsing
Unlinking stale socket /var/run/supervisor.sock
INFO RPC interface 'supervisor' initialized
CRIT Server 'unix_http_server' running without any HTTP authentication checking
INFO supervisord started with pid 1
INFO spawned: 'couchdb' with pid 7
INFO spawned: 'cozy-init' with pid 8
INFO spawned: 'master' with pid 9
INFO spawned: 'cozy-controller' with pid 10
INFO spawned: 'nginx' with pid 11
INFO success: master entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
INFO exited: cozy-init (exit status 127; not expected)
INFO reaped unknown pid 117
INFO exited: master (exit status 0; expected)
INFO success: couchdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO spawned: 'cozy-init' with pid 124
INFO success: cozy-controller entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO exited: cozy-init (exit status 127; not expected)
INFO spawned: 'cozy-init' with pid 158
INFO exited: cozy-init (exit status 127; not expected)
INFO spawned: 'cozy-init' with pid 199
INFO exited: cozy-init (exit status 127; not expected)
INFO gave up: cozy-init entered FATAL state, too many start retries too quickly

I tried to execute "cozy-init" bash script:

root@fb4edabe9a48:/# bash /etc/init.d/cozy-init
/etc/init.d/cozy-init: line 2: $'\r': command not found
: invalid option-init: line 3: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
/etc/init.d/cozy-init: line 4: $'\r': command not found
/etc/init.d/cozy-init: line 52: syntax error: unexpected end of file

Have you any idea?

insideGen commented 7 years ago

A solution is to convert the DOS file to UNIX with dos2unix.

dos2unix /etc/init.d/cozy-init