berngp / docker-zabbix

Docker Container running a Zabbix Server and Zabbix Web UI.
Other
160 stars 66 forks source link

Problem to re run a container after a few commits #25

Open owlmsj opened 8 years ago

owlmsj commented 8 years ago

I'm trying to simply re run a commited image (cmd: "docker run -d -P --name zabbix "),

and the container log this message right before it dies:

Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
Stopping mysqld:                                           [  OK  ]
Running Monit... 
monit daemon at 1 awakened

Tips? Please help!

opensourcegeek commented 8 years ago

I cannot even start container after few stops - not sure why it fails, every time I start it looks like it's started but exits immediately. Every time only that monit daemon awakened message gets appended after starting container.

... Stopping mysqld: [ OK ] Starting mysqld: [ OK ] Stopping mysqld: [ OK ] Running Monit... Generated unique Monit id 52d610ef224aa4d7b8acdec0bb647d1e and stored to '/root/.monit.id' Starting Monit 5.14 daemon with http interface at []:2812 Running Monit... Starting Monit 5.14 daemon with http interface at []:2812 Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened

kwetiaw commented 8 years ago

i have the same issue described by opensourcegeek above.

fuchu commented 8 years ago

I have the problem too.

xianxian0703 commented 8 years ago

I have the same issue

coreos1 upper # docker logs -f zabbix Stopping mysqld: [ OK ] Initializing MySQL database: Installing MySQL system tables... OK Filling help tables... OK

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h 4ade6c1a8f6e password 'new-password'

Alternatively you can run: /usr/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[ OK ] Starting mysqld: [ OK ] Looking for 'mysql' as: /usr/bin/mysql Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck Running 'mysqlcheck with default connection arguments Running 'mysqlcheck with default connection arguments mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.general_log Error : You can't use locks with log tables. status : OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.servers OK mysql.slow_log Error : You can't use locks with log tables. status : OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Running 'mysql_fix_privilegetables'... OK mysql root and admin password: mypassword Stopping mysqld: [ OK ] Starting mysqld: [ OK ] Stopping mysqld: [ OK ] Running Monit... Generated unique Monit id df71844989978bc0fc517be80e0971e5 and stored to '/root/.monit.id' Starting Monit 5.14 daemon with http interface at []:2812 Running Monit... Starting Monit 5.14 daemon with http interface at [_]:2812 Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened Running Monit... Monit daemon with PID 1 awakened

nsarvi commented 8 years ago

Facing the same issue, any workarounds or solutions so far ?

yangguang760 commented 7 years ago

@owlmsj @opensourcegeek @kwetiaw @fuchu @xianxian0703 Hi all, I've found the same issue and luckily solved it. run

docker run -it --name zabbix  berngp/docker-zabbix "shell" 

to get the shell, and
just delete the /var/run/monit.pid of the container and then commit the change to the image.

opensourcegeek commented 7 years ago

@yangguang760 Cool - I've been using docker.io/zabbix/zabbix-2.4, but looks like this image isn't available anymore. An alternative seems to be https://hub.docker.com/r/monitoringartist/zabbix-2.4/, I haven't used that though.

alexdcx commented 7 years ago

@yangguang760 docker run -it --name zabbix berngp/docker-zabbix "shell" unable to run ,how to solve?