Fokko / divolte-kafka-druid-superset

A proof of concept using Divolte, Kafka, Druid and Superset
61 stars 45 forks source link

ERROR: Service 'docker-druid' failed to build #4

Closed jmarxuach closed 5 years ago

jmarxuach commented 6 years ago

Hi, when docker-compose build

ERROR: Service 'docker-druid' failed to build: The command '/bin/sh -c /etc/init.d/mysql start && mysql -u root -e "GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" && java -cp /usr/local/druid/lib/druid-services-*-selfcontained.jar -Ddruid.extensions.directory=/usr/local/druid/extensions -Ddruid.extensions.loadList=[\"mysql-metadata-storage\",\"druid-kafka-indexing-service\"] -Ddruid.metadata.storage.type=mysql io.druid.cli.Main tools metadata-init --connectURI="jdbc:mysql://localhost:3306/druid" --user=druid --password=diurd && /etc/init.d/mysql stop' returned a non-zero code: 1

You have to update druid docker files from https://github.com/druid-io/docker-druid

RajaSabarish commented 6 years ago

The same error Even I am facing it

jmarxuach commented 6 years ago

Yes, docker-druid has same error. No fix.

RajaSabarish commented 6 years ago

I tried with the sameness different machine where I have MySQL already installed in that. But then I can to run it without any hurdles. Could be some issue with MySQL path I believe not sure though

noahehall commented 6 years ago

I got it to work with this: see the first line of the RUN command

# Setup metadata store
RUN find /var/lib/mysql -type f -exec touch {} \; \
      && /etc/init.d/mysql start \
      && mysql -u root -e "GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \
      && java -cp /usr/local/druid/lib/druid-services-*-selfcontained.jar \
          -Ddruid.extensions.directory=/usr/local/druid/extensions \
          -Ddruid.extensions.loadList=[\"mysql-metadata-storage\",\"druid-kafka-indexing-service\"] \
          -Ddruid.metadata.storage.type=mysql \
          io.druid.cli.Main tools metadata-init \
              --connectURI="jdbc:mysql://localhost:3306/druid" \
              --user=druid --password=diurd \
      && /etc/init.d/mysql stop

read more: https://github.com/druid-io/docker-druid/issues/44

RajaSabarish commented 6 years ago

Absolutely great. I ran the same already by adding the find as well. It was giving error. Then I downloaded everything spereately without using the docker image itself ๐Ÿ˜Š

noahehall commented 6 years ago

@RajaSabarish you're absolutely right, by the time it started building i got multiple errors too. Thanks for the tip, i'm gonna go that route as well - do you have a sample config you can share?

[edit] ahh i understand what you did, it worked for me too ;)

for anyone else, here are the changes to docker-compose.yml

...
docker-divolte:
    image: divthis/divolte
....
docker-druid:
    image: fokkodriesprong/docker-druid
...
docker-superset:
    image: fokkodriesprong/docker-superset
Mr-H commented 6 years ago

I got it to work with this: see the first line of the RUN command

# Setup metadata store
RUN find /var/lib/mysql -type f -exec touch {} \; \
      && /etc/init.d/mysql start \
      && mysql -u root -e "GRANT ALL ON druid.* TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \
      && java -cp /usr/local/druid/lib/druid-services-*-selfcontained.jar \
          -Ddruid.extensions.directory=/usr/local/druid/extensions \
          -Ddruid.extensions.loadList=[\"mysql-metadata-storage\",\"druid-kafka-indexing-service\"] \
          -Ddruid.metadata.storage.type=mysql \
          io.druid.cli.Main tools metadata-init \
              --connectURI="jdbc:mysql://localhost:3306/druid" \
              --user=druid --password=diurd \
      && /etc/init.d/mysql stop

read more: druid-io/docker-druid#44

RajaSabarish commented 6 years ago

Thatโ€™s great. Awesome ๐Ÿ˜Ž

Thanks, Raja

On Tue, 18 Sep 2018 at 06:09, Mr.H notifications@github.com wrote:

I got it to work with this: see the first line of the RUN command

Setup metadata store

RUN find /var/lib/mysql -type f -exec touch {} \; \ && /etc/init.d/mysql start \ && mysql -u root -e "GRANT ALL ON druid. TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \ && java -cp /usr/local/druid/lib/druid-services--selfcontained.jar \ -Ddruid.extensions.directory=/usr/local/druid/extensions \ -Ddruid.extensions.loadList=[\"mysql-metadata-storage\",\"druid-kafka-indexing-service\"] \ -Ddruid.metadata.storage.type=mysql \ io.druid.cli.Main tools metadata-init \ --connectURI="jdbc:mysql://localhost:3306/druid" \ --user=druid --password=diurd \ && /etc/init.d/mysql stop

read more: druid-io/docker-druid#44 https://github.com/druid-io/docker-druid/issues/44

Should pull in the druid-io/docker-druid project or at least the Dockerbuild file from that project.

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fokko/divolte-kafka-druid-superset/issues/4#issuecomment-422215515, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8YjXQTA8Z4joZ3iytnvWMB4-HvhzIUks5ucEDIgaJpZM4ShGUN .

-- Thanks & Regards, Raja Sabarish P.V.

Mr-H commented 6 years ago

I added a comment about pulling or extending the druid-io/docker-druid image rather than the one in the repo but am still running into problems on the Docker Build for druid. I put a suggestion then I retracted it when it did not work.

Mike

On Mon, Sep 17, 2018 at 11:36 PM RajaSabarish notifications@github.com wrote:

Thatโ€™s great. Awesome ๐Ÿ˜Ž

Thanks, Raja

On Tue, 18 Sep 2018 at 06:09, Mr.H notifications@github.com wrote:

I got it to work with this: see the first line of the RUN command

Setup metadata store

RUN find /var/lib/mysql -type f -exec touch {} \; \ && /etc/init.d/mysql start \ && mysql -u root -e "GRANT ALL ON druid. TO 'druid'@'localhost' IDENTIFIED BY 'diurd'; CREATE database druid CHARACTER SET utf8;" \ && java -cp /usr/local/druid/lib/druid-services--selfcontained.jar \ -Ddruid.extensions.directory=/usr/local/druid/extensions \

-Ddruid.extensions.loadList=[\"mysql-metadata-storage\",\"druid-kafka-indexing-service\"] \ -Ddruid.metadata.storage.type=mysql \ io.druid.cli.Main tools metadata-init \ --connectURI="jdbc:mysql://localhost:3306/druid" \ --user=druid --password=diurd \ && /etc/init.d/mysql stop

read more: druid-io/docker-druid#44 https://github.com/druid-io/docker-druid/issues/44

Should pull in the druid-io/docker-druid project or at least the Dockerbuild file from that project.

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/Fokko/divolte-kafka-druid-superset/issues/4#issuecomment-422215515 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AI8YjXQTA8Z4joZ3iytnvWMB4-HvhzIUks5ucEDIgaJpZM4ShGUN

.

-- Thanks & Regards, Raja Sabarish P.V.

โ€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Fokko/divolte-kafka-druid-superset/issues/4#issuecomment-422243602, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOJkqeRjBNCbLwk-m54qA59I4dEywUZks5ucGoogaJpZM4ShGUN .

Fokko commented 6 years ago

So I'm building a lot of the images from master. If master is not stable, it will fail. I'm using also this images to test the latest master :)

Fokko commented 5 years ago

@brunowego Pushed some fixes, hopefully it will work now :-)