lucrussell / slack-chatops

A Slack ChatOps bot
14 stars 7 forks source link

docker-compose up -d did not work after cloning and running #1

Open HattrickNZ opened 3 years ago

HattrickNZ commented 3 years ago

docker-compose up -d did not work after cloning and running. any advice for investigations welcome. tks

slack-chatops# **docker-compose up -d**
Creating network "slack-chatops_backend" with the default driver
Creating volume "slack-chatops_prometheus_data" with default driver
Creating volume "slack-chatops_grafana_data" with default driver
Pulling zookeeper (wurstmeister/zookeeper:)...
latest: Pulling from wurstmeister/zookeeper
a3ed95caeb02: Pull complete
ef38b711a50f: Pull complete
e057c74597c7: Pull complete
666c214f6385: Pull complete
c3d6a96f1ffc: Pull complete
3fe26a83e0ca: Pull complete
3d3a7dd3a3b1: Pull complete
f8cc938abe5f: Pull complete
9978b75f7a58: Pull complete
4d4dbcc8f8cc: Pull complete
8b130a9baa49: Pull complete
6b9611650a73: Pull complete
5df5aac51927: Pull complete
76eea4448d9b: Pull complete
8b66990876c6: Pull complete
f0dd38204b6f: Pull complete
Digest: sha256:7a7fd44a72104bfbd24a77844bad5fabc86485b036f988ea927d1780782a6680
Status: Downloaded newer image for wurstmeister/zookeeper:latest
Pulling kafka (wurstmeister/kafka:1.0.0)...
1.0.0: Pulling from wurstmeister/kafka
90f4dba627d6: Pull complete
11dbde1d93a0: Pull complete
b08a221100dc: Pull complete
8a1ea32227be: Pull complete
594f88f1d9ba: Pull complete
1f10284cbcb9: Pull complete
2fce4c7fddcf: Pull complete
51e64f39a714: Pull complete
517706dd675b: Pull complete
Digest: sha256:a46e42c8e4c872ca2f7064e8bf4187dc875f8c7028b82803f42d00429f58c5e9
Status: Downloaded newer image for wurstmeister/kafka:1.0.0
Building kafka-jmx-exporter
Step 1/7 : FROM java:8
8: Pulling from library/java
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
60170fec2151: Pull complete
e98f73de8f0d: Pull complete
11f7af24ed9c: Pull complete
49e2d6393f32: Pull complete
bb9cdec9c7f3: Pull complete
Digest: sha256:c1ff613e8ba25833d2e1940da0940c3824f03f802c449f3d1815a66b7f8c0e9d
Status: Downloaded newer image for java:8
 ---> d23bdf5b1b1b
Step 2/7 : RUN mkdir /opt/jmx_prometheus_httpserver && wget 'http://central.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/0.6/jmx_prometheus_httpserver-0.6-jar-with-dependencies.jar' -O /opt/jmx_prometheus_httpserver/jmx_prometheus_httpserver.jar
 ---> Running in ed8082e2276c
--2021-04-26 09:23:30--  http://central.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/0.6/jmx_prometheus_httpserver-0.6-jar-with-dependencies.jar
Resolving central.maven.org (central.maven.org)... failed: Name or service not known.
wget: unable to resolve host address ‘central.maven.org’
ERROR: Service 'kafka-jmx-exporter' failed to build: The command '/bin/sh -c mkdir /opt/jmx_prometheus_httpserver && wget 'http://central.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/0.6/jmx_prometheus_httpserver-0.6-jar-with-dependencies.jar' -O /opt/jmx_prometheus_httpserver/jmx_prometheus_httpserver.jar' returned a non-zero code: 4
slack-chatops# **docker ps -a** 
CONTAINER ID   IMAGE               COMMAND                  CREATED              STATUS                          PORTS     NAMES
ed8082e2276c   d23bdf5b1b1b        "/bin/sh -c 'mkdir /…"   About a minute ago   Exited (4) About a minute ago             dazzling_williams

ref: https://www.freecodecamp.org/news/simple-chatops-with-kafka-grafana-prometheus-and-slack-764ece59e707/

/slack-chatops# **cat /etc/*release**
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
slack-chatops# **cat /etc/os-release**
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
/slack-chatops# **lsb_release -d**
Description:    Ubuntu 20.04.2 LTS
DKSASI2003 commented 2 months ago

Here's the updated Dockerfile, now its working fine (also update the image versions in docker-compose file ): FROM openjdk:8-jdk-alpine

RUN mkdir /opt/jmx_prometheus_httpserver && \ wget 'https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/0.6/jmx_prometheus_httpserver-0.6-jar-with-dependencies.jar' \ -O /opt/jmx_prometheus_httpserver/jmx_prometheus_httpserver.jar

ADD https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.11.0-linux-amd64 /usr/local/bin/confd COPY confd /etc/confd RUN chmod +x /usr/local/bin/confd

COPY entrypoint.sh /opt/entrypoint.sh ENTRYPOINT ["/opt/entrypoint.sh"]