Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cos nie zatrybiło #1

Open
ghost opened this issue Nov 16, 2018 · 5 comments
Open

cos nie zatrybiło #1

ghost opened this issue Nov 16, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 16, 2018

zrobiłem
make docker_build
make start

ale mam takie działające obrazy:

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                         PORTS                    NAMES
08955090c48d        grafana/grafana:5.2.2       "/run.sh"                About an hour ago   Exited (1) About an hour ago                            java-prom_grafana_1_48032b23042e
c59b4c81b392        prom/prometheus:v2.1.0      "/bin/prometheus --c…"   About an hour ago   Exited (0) About an hour ago                            java-prom_prometheus_1_7f71a5a91001
f4befd23e0c8        java-prom_order-manager     "/bin/sh -c 'java -j…"   About an hour ago   Up About an hour               0.0.0.0:8080->8080/tcp   java-prom_order-manager_1_ca7b09ba3ff7
04fd76f3f041        prom/alertmanager:v0.15.1   "/bin/alertmanager -…"   About an hour ago   Up About an hour               0.0.0.0:9093->9093/tcp   java-prom_alertmanager_1_56ee20c2fdc5

logi z prometheusa:

12:01 $ docker logs --tail 1000 java-prom_prometheus_1_7f71a5a91001
level=info ts=2018-11-16T10:12:11.989944837Z caller=main.go:225 msg="Starting Prometheus" version="(version=2.1.0, branch=HEAD, revision=85f23d82a045d103ea7f3c89a91fba4a93e6367a)"
level=info ts=2018-11-16T10:12:11.989988931Z caller=main.go:226 build_context="(go=go1.9.2, user=root@6e784304d3ff, date=20180119-12:01:23)"
level=info ts=2018-11-16T10:12:11.990005457Z caller=main.go:227 host_details="(Linux 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 x86_64 c59b4c81b392 (none))"
level=info ts=2018-11-16T10:12:11.990018817Z caller=main.go:228 fd_limits="(soft=1048576, hard=1048576)"
level=info ts=2018-11-16T10:12:11.992419632Z caller=web.go:383 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=info ts=2018-11-16T10:12:11.994275696Z caller=main.go:499 msg="Starting TSDB ..."
level=info ts=2018-11-16T10:12:11.99475186Z caller=main.go:386 msg="Stopping scrape discovery manager..."
level=info ts=2018-11-16T10:12:11.994778117Z caller=main.go:400 msg="Stopping notify discovery manager..."
level=info ts=2018-11-16T10:12:11.994789774Z caller=main.go:424 msg="Stopping scrape manager..."
level=info ts=2018-11-16T10:12:11.994803659Z caller=manager.go:460 component="rule manager" msg="Stopping rule manager..."
level=info ts=2018-11-16T10:12:11.99481602Z caller=manager.go:466 component="rule manager" msg="Rule manager stopped"
level=info ts=2018-11-16T10:12:11.994826659Z caller=notifier.go:493 component=notifier msg="Stopping notification manager..."
level=info ts=2018-11-16T10:12:11.994838985Z caller=main.go:396 msg="Notify discovery manager stopped"
level=info ts=2018-11-16T10:12:11.994857972Z caller=manager.go:59 component="scrape manager" msg="Starting scrape manager..."
level=info ts=2018-11-16T10:12:11.994872829Z caller=main.go:418 msg="Scrape manager stopped"
level=info ts=2018-11-16T10:12:11.994834908Z caller=main.go:382 msg="Scrape discovery manager stopped"
level=info ts=2018-11-16T10:12:11.994899898Z caller=main.go:570 msg="Notifier manager stopped"
level=error ts=2018-11-16T10:12:11.995050077Z caller=main.go:579 err="Opening storage failed open DB in /data/prometheus: open /data/prometheus/565752449: permission denied"
level=info ts=2018-11-16T10:12:11.995135221Z caller=main.go:581 msg="See you next time!"
@ghost
Copy link
Author

ghost commented Nov 16, 2018

chyba coś z uprawnieniami
GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied

@wojciech12
Copy link
Owner

Na której dystrybucji Linuxa jesteś? Zaraz sprawdzę, dlaczego nie działa.

@ghost
Copy link
Author

ghost commented Nov 16, 2018

bez najmniejszych problemów działa na macu, nie działa na Ubuntu 17 - pewnie coś prostego ale mistrzem dockera nie jestem
jak coś mogę podać wersje wszystkiego (jak dorwę się do kompa)

10:23 $ docker --version
Docker version 17.12.1-ce, build 7390fc6
10:24 $ docker-compose --version
docker-compose version 1.23.1, build b02f1306
uname -a
Linux san 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 17.10

@aliberadzki
Copy link

Gdyby ktoś jeszcze szukał rozwiązania:

Problem: prometheus nie jest uruchamiany jako root, a docker montuje volume'y z prawem zapisu tylko dla root (a przynajmniej na ubuntu) (ref: prometheus/prometheus#2939)

Fix: w docker-compose.yml wymuś uruchamianie jako root:

...
  prometheus:
    user: root
    image: prom/prometheus:v2.1.0
    ports:
      - 9090:9090
...

@wojciech12
Copy link
Owner

wojciech12 commented Jan 8, 2019

@aliberadzki Dziękuję za pomoc! :)

Czy masz pomysł, gdzie najlepiej dodać informacje o ustawieniu użytkownika nad root w docker-compose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants