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

Ping not working in neither docker nor k3s #747

Closed
heathcliff26 opened this issue Apr 28, 2024 · 4 comments
Closed

Ping not working in neither docker nor k3s #747

heathcliff26 opened this issue Apr 28, 2024 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@heathcliff26
Copy link

Describe the bug

When running gatus from inside k3s or in plain docker, all attempts to monitor nodes via ping fail, despite the being reachable. I have verified that the nodes can be pinged from the gatus host.

What do you see?

When adding endpoint with ping, status check always fails, regardless of node status.

What do you expect to see?

Ping should succeed if the endpoint is reachable.

List the steps that must be taken to reproduce this issue

  1. Create config.yaml with the following content:
endpoints:
  - name: router
    group: test
    url: "icmp://example.com"
    interval: 1m
    conditions:
      - "[CONNECTED] == true"
  - name: router-ipv4
    group: test
    url: "icmp://192.168.0.1"
    interval: 1m
    conditions:
      - "[CONNECTED] == true"
  1. Start gatus with:
podman run -p 8080:8080 -v ./config.yaml:/config/config.yaml --name gatus -d  docker.io/twinproduction/gatus:v5.10.0

Version

v5.10.0

Additional information

Here is the output from the log:

2024/04/28 16:19:56 [config.LoadConfiguration] Reading configuration from configFile=
2024/04/28 16:19:56 [config.validateAlertingConfig] Alerting is not configured
2024/04/28 16:19:56 [config.validateEndpointsConfig] Validated 2 endpoints
2024/04/28 16:19:56 [config.validateExternalEndpointsConfig] Validated 0 external endpoints
2024/04/28 16:19:56 [store.Initialize] Creating storage provider of type=memory
2024/04/28 16:19:56 [controller.Handle] Listening on 0.0.0.0:8080

 ┌───────────────────────────────────────────────────┐ 
 │                   Fiber v2.52.1                   │ 
 │                 http://[::]:8080                  │ 
 │                                                   │ 
 │ Handlers ............ 27  Processes ........... 1 │ 
 │ Prefork ....... Disabled  PID ................. 1 │ 
 └───────────────────────────────────────────────────┘ 

2024/04/28 16:20:02 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:20:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:21:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:21:07 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:22:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:22:12 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:23:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:23:17 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:24:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:24:22 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
@heathcliff26 heathcliff26 added the bug Something isn't working label Apr 28, 2024
@TwiN
Copy link
Owner

TwiN commented Apr 28, 2024

Can you try setting endpoints[].client.network to ip4?

endpoints:
  - name: router
    #...
    client:
      network: ip4

@heathcliff26
Copy link
Author

I did, this does not seem to change anything.

@heathcliff26
Copy link
Author

I don't know if you meant ip4 as written or ipv4, but i tried both:

endpoints:
  - name: router
    group: test
    url: "icmp://example.com"
    client:
      network: ipv4
    interval: 1m
    conditions:
      - "[CONNECTED] == true"

@TwiN TwiN added the duplicate This issue or pull request already exists label Apr 28, 2024
@TwiN
Copy link
Owner

TwiN commented Apr 28, 2024

I meant ip4, but no worries.

In that case, I reckon the problem has to have something to do with privilege magic.
I'm going to close this as a duplicate of #697

@TwiN TwiN closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants