Git Product home page Git Product logo

anemoeater's People

Contributors

yokogawa-k avatar yoku0825 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

anemoeater's Issues

mysqlが起動しないため、dockerのコンテナが上がってこない

概要

./anemoeter /path/to/slow.logを実行した時にmysqlが起動していないため、
https://github.com/yoku0825/anemoeater/blob/master/anemoeater#L119-L120
で接続できず、処理が進みません。

実行環境

CentOS Linux release 7.4.1708
Docker version 1.13.1, build 774336d/1.13.1
perl v5.16.3
pt-tookkit 3.0.4

再現手順

概要にある通り、./anemoeter /path/to/slow.log (dockerhunのanemoeaterを利用)を実行した際に、https://github.com/yoku0825/anemoeater/blob/master/anemoeater#L119-L120
のMySQL接続部分で起動していないMySQLへの接続を待ってしまい、処理が先に進みません。
その時のdocker側のlogを確認しますと、

# docker logs e2a1674593f3
Starting MySQL (Percona Server)..... ERROR! The server quit without updating PID file (/var/lib/mysql/e2a1674593f3.pid).

とでており、MySQLが起動しきれていない状況になっていました。
Dockerfileのmysql起動部分を下記のように編集し --localオプションを利用して起動すると正常に起動することができました。

# git diff
diff --git a/Dockerfile b/Dockerfile
index 8479707..41722ab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,8 @@ RUN yum install -y Percona-Server-client-56 Percona-Server-shared-56 Percona-Ser
 RUN yum install -y httpd php php-mysql php-bcmath && yum clean all

 RUN git clone https://github.com/box/Anemometer.git /var/www/html/anemometer
-RUN /etc/init.d/mysql start && mysql -uroot < /var/www/html/anemometer/install.sql && mysql -uroot < /var/www/html
+RUN chown -R mysql. /var/lib/mysql && /etc/init.d/mysql start && mysql -uroot < /var/www/html/anemometer/install.s
+
 RUN ln -sf /var/www/html/anemometer/conf/sample.config.inc.php /var/www/html/anemometer/conf/config.inc.php

 COPY . /opt/setup
@@ -21,5 +22,5 @@ RUN patch /etc/php.ini /opt/setup/php.ini.patch
 RUN patch /var/www/html/anemometer/lib/Anemometer.php /opt/setup/Anemometer.patch

 EXPOSE 80
-CMD /etc/init.d/mysql start && /etc/init.d/httpd start && tail -f /dev/null
+CMD chown -R mysql. /var/lib/mysql && /etc/init.d/mysql start && /etc/init.d/httpd start && tail -f /dev/null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.