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

Could not run with docker-compose #12986

Open
taoqf opened this issue May 19, 2024 · 5 comments
Open

Could not run with docker-compose #12986

taoqf opened this issue May 19, 2024 · 5 comments
Labels
docker Pull requests that update Docker code type/bug Somehing is not working as expected

Comments

@taoqf
Copy link

taoqf commented May 19, 2024

Describe the bug
A clear and concise description of what the bug is.

I could not run compose in production/docker

To Reproduce
Steps to reproduce the behavior:

  1. clone this repo
  2. cd production/docker
  3. docker compose up -d
  4. container could not run healthy.

Expected behavior
A clear and concise description of what you expected to happen.

Environment:

  • Infrastructure: docker
  • Deployment tool: docker

Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.

@JStickler JStickler added type/bug Somehing is not working as expected docker Pull requests that update Docker code labels May 22, 2024
@paul1r
Copy link
Contributor

paul1r commented May 23, 2024

Please describe what error(s) you are seeing, along with what version of docker, and what operating system you are running on.

@rea1shane
Copy link

Same issue, alloy started and then exit, error log:

ts=2024-05-29T06:44:56.887806714Z level=warn msg="could not transfer logs" component_path=/ component_id=loki.source.docker.flog_scrape target=docker/39b515f95b20876a207d1a6b773340322a7be345d5f1d726ded6e6765473b459 written=0 container=39b515f95b20876a207d1a6b773340322a7be345d5f1d726ded6e6765473b459 err="context canceled"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x39e1a70]

goroutine 425 [running]:
github.com/grafana/alloy/internal/component/loki/source/docker/internal/dockertarget.(*Target).Stop(0x4002478480)
	/src/alloy/internal/component/loki/source/docker/internal/dockertarget/target.go:238 +0x20
github.com/grafana/alloy/internal/component/loki/source/docker.(*tailer).Run(0x40024d5460, {0x8717cd0, 0x40024ae640})
	/src/alloy/internal/component/loki/source/docker/runner.go:116 +0x260
github.com/grafana/alloy/internal/runner.(*Runner[...]).ApplyTasks.func2()
	/src/alloy/internal/runner/runner.go:166 +0x98
created by github.com/grafana/alloy/internal/runner.(*Runner[...]).ApplyTasks in goroutine 188
	/src/alloy/internal/runner/runner.go:163 +0x490

env:

Chip: M1
ProductName:		macOS
ProductVersion:		14.5
BuildVersion:		23F79
Docker version 25.0.5, build 5dc9bcc

@paul1r
Copy link
Contributor

paul1r commented May 29, 2024

@rea1shane I have opened #13065 to track that issue, as it appears you are running a different docker compose than the one this report is on. If I am mistaken, please let me know.

@taoqf
Copy link
Author

taoqf commented Jun 1, 2024

I've tried Debian and Fedora. There behaviour is same.
without change anything, i tried the compose file in production , production/docker, even in examples/getting-started. only production/docker-compose could be started.

Please describe what error(s) you are seeing, along with what version of docker, and what operating system you are running on.

@taoqf
Copy link
Author

taoqf commented Jun 1, 2024

I checked the logs in loki-read, first error is level=error ts=2024-06-01T07:02:19.1157467Z caller=loki.go:517 msg="module failed" module=query-scheduler-ring error="failed to start query-scheduler-ring, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running".
the logs in loki-write, and loki-backend shows

level=error ts=2024-06-01T07:07:25.792414429Z caller=loki.go:517 msg="module failed" module=distributor error="failed to start distributor, because it depends on module analytics, which has failed: context canceled"
level=error ts=2024-06-01T07:07:25.792426167Z caller=loki.go:517 msg="module failed" module=ring error="failed to start ring, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Failed, expected: Running, failure: service &{0xc0005eb900 { true 10000000000 4 30000000000 2000000000 3 15000000000 30000000000 true  7946  false [loki-read loki-write loki-backend] 1000000000 60000000000 10 false 0 30000000000 20000000000 0 {[0.0.0.0] 7946 2000000000 5000000000 false loki false {    false   <nil>}} loki [{ringDesc 0xea4480} {}]} 0xc0006920a0 0x43908c0 0xc000b9bab0 {[] {[] 0}} <nil> <nil> {0 0} map[] map[ringDesc:{ringDesc 0xea4480} usagestats.jsonCodec:{}] {0 0} map[] map[] {0 0} [] 0 [] 0 0 {0 0} map[] 0xc0006d0900 0xc0004562a0 0xc000456360 0xc000456420 0xc0004564e0 0xc000456720 0xc0004565a0 0xc0004567e0 0xc000456660 0xc000706d40 0xc000706d80 0xc000456960 0xc000456a20 0xc000456ba0 0xc000456ae0 0xc0009862c0 0xc000f14850 0xc0009862b0 0xc0009862b8 0xc000706dc0 0xc000706e00 10} failed: failed to create memberlist: Failed to get final advertise address: no private IP address found, and explicit IP not provided"
level=error ts=2024-06-01T07:07:25.792435237Z caller=loki.go:517 msg="module failed" module=store error="failed to start store, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Failed, expected: Running, failure: service &{0xc0005eb900 { true 10000000000 4 30000000000 2000000000 3 15000000000 30000000000 true  7946  false [loki-read loki-write loki-backend] 1000000000 60000000000 10 false 0 30000000000 20000000000 0 {[0.0.0.0] 7946 2000000000 5000000000 false loki false {    false   <nil>}} loki [{ringDesc 0xea4480} {}]} 0xc0006920a0 0x43908c0 0xc000b9bab0 {[] {[] 0}} <nil> <nil> {0 0} map[] map[ringDesc:{ringDesc 0xea4480} usagestats.jsonCodec:{}] {0 0} map[] map[] {0 0} [] 0 [] 0 0 {0 0} map[] 0xc0006d0900 0xc0004562a0 0xc000456360 0xc000456420 0xc0004564e0 0xc000456720 0xc0004565a0 0xc0004567e0 0xc000456660 0xc000706d40 0xc000706d80 0xc000456960 0xc000456a20 0xc000456ba0 0xc000456ae0 0xc0009862c0 0xc000f14850 0xc0009862b0 0xc0009862b8 0xc000706dc0 0xc000706e00 10} failed: failed to create memberlist: Failed to get final advertise address: no private IP address found, and explicit IP not provided"
level=error ts=2024-06-01T07:07:25.792439299Z caller=loki.go:517 msg="module failed" module=analytics error="failed to start analytics, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Failed, expected: Running, failure: service &{0xc0005eb900 { true 10000000000 4 30000000000 2000000000 3 15000000000 30000000000 true  7946  false [loki-read loki-write loki-backend] 1000000000 60000000000 10 false 0 30000000000 20000000000 0 {[0.0.0.0] 7946 2000000000 5000000000 false loki false {    false   <nil>}} loki [{ringDesc 0xea4480} {}]} 0xc0006920a0 0x43908c0 0xc000b9bab0 {[] {[] 0}} <nil> <nil> {0 0} map[] map[ringDesc:{ringDesc 0xea4480} usagestats.jsonCodec:{}] {0 0} map[] map[] {0 0} [] 0 [] 0 0 {0 0} map[] 0xc0006d0900 0xc0004562a0 0xc000456360 0xc000456420 0xc0004564e0 0xc000456720 0xc0004565a0 0xc0004567e0 0xc000456660 0xc000706d40 0xc000706d80 0xc000456960 0xc000456a20 0xc000456ba0 0xc000456ae0 0xc0009862c0 0xc000f14850 0xc0009862b0 0xc0009862b8 0xc000706dc0 0xc000706e00 10} failed: failed to create memberlist: Failed to get final advertise address: no private IP address found, and explicit IP not provided"
level=error ts=2024-06-01T07:07:25.792446405Z caller=loki.go:517 msg="module failed" module=ingester error="failed to start ingester, because it depends on module store, which has failed: context canceled"
level=info ts=2024-06-01T07:07:25.792566169Z caller=modules.go:1484 msg="server stopped"
level=info ts=2024-06-01T07:07:25.792573837Z caller=module_service.go:114 msg="module stopped" module=server
level=info ts=2024-06-01T07:07:25.792582401Z caller=loki.go:506 msg="Loki stopped"
level=error ts=2024-06-01T07:07:25.792615783Z caller=log.go:230 msg="error running loki" err="failed services\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:559\nmain.main\n\t/src/loki/cmd/loki/main.go:110\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650"

alert-manager logs

evel=error ts=2024-06-01T07:00:20.322Z caller=main.go:250 msg="unable to initialize gossip mesh" err="create memberlist: Failed to get final advertise address: No private IP address found, and explicit IP not provided"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

4 participants