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

Gotify: diun: error: rpc error: code = Unknown desc context deadline exceeded (Client.Timeout exceeded while awaiting headers) #1258

Open
3 tasks done
cedlemo opened this issue Oct 26, 2024 · 0 comments

Comments

@cedlemo
Copy link

cedlemo commented Oct 26, 2024

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

diun fail to send notifications to gotify.

Expected behaviour

Diun must be able to send notifications to Gotify

Actual behaviour

The notifications fail to be send with the following message:

diun: error: rpc error: code = Unknown desc = Post "http://gotify/message?token=token": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Steps to reproduce

  1. launch docker compose exec diun diun notif test
  2. the following error is displayed diun: error: rpc error: code = Unknown desc = Post "http://gotify/message?token=token": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Diun version

v4.28.0

Docker info

Client:                                                                                                                                                                                                                                        
 Version:    27.3.1                                                                                                                                                                                                                            
 Context:    default                                                                                                                                                                                                                           
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  2.29.7
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 7
  Running: 7
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 57f17b0a6295a39009d861b89e3b3b87b005ca27.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.58-1-lts
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 30.98GiB
 Name: thinkpad
 ID: KGJK:QQ2A:LN74:V2IH:YRBB:QGCM:VEG2:NEJL:7HAD:5PNW:WND5:IHPH
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Docker Compose config

services:
  diun:
    image: crazymax/diun:latest
    cap_add: 
      - NET_RAW 
      - NET_ADMIN
    restart: always
    command: serve
    volumes:
      - "./diun.yml:/diun.yml:ro"
      - "/var/run/docker.sock:/var/run/docker.sock"
    environment:
      - "TZ=Europe/Paris"
      - "LOG_LEVEL=trace"
      - "LOG_JSON=false"
    networks:
      - tests
    labels:
      - "diun.enable=true" 

  gotify:
    image: ghcr.io/gotify/server
    ports:
      - 32769:80
    networks:
      - tests
    labels:
      - "diun.enable=true" 

networks:
  tests:
    external: true
    name: tests 


### Logs

```text
diun-1  | Sat, 26 Oct 2024 12:41:32 CEST INF New image found image=ghcr.io/gotify/server:latest provider=docker                                                                                                                                
diun-1  | Sat, 26 Oct 2024 12:41:32 CEST INF New image found image=ghcr.io/gotify/server:latest provider=docker                                                                                                                                
diun-1  | Sat, 26 Oct 2024 12:41:32 CEST DBG Manifest saved to database image=ghcr.io/gotify/server:latest provider=docker                                                                                                                     
diun-1  | Sat, 26 Oct 2024 12:41:32 CEST DBG Sending gotify notification... image=ghcr.io/gotify/server:latest                                                                                                                                 
diun-1  | Sat, 26 Oct 2024 12:41:32 CEST ERR Gotify notification failed error="Post \"http://gotify/message?token=ArTyG98mClAhvBjs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" image=ghcr.io/gotify/server:l
atest

Additional info

The diun configuration:

watch:
  workers: 20
  schedule: "0 */6 * * *"
  firstCheckNotif: true
  runOnStartup: true

providers:
  docker:
    watchStopped: true

notif:
  gotify:
    endpoint: http://gotify
    token: AzS2Ypd6YAf70Uk 
    priority: 1
    timeout: 10

If Iaunch the following command in the diun container, gotify receive the notification (note that the following command comes from https://gotify.net/docs/pushmsg):

curl http://gotify/message?token=AzS2Ypd6YAf70Uk -F "title=toto" -F "message=titi"

So it seems that the environment is fine.

Here is a pcap capture when I lanch the test command docker compose exec diun diun notif test:

Capture d’écran du 2024-10-26 12-53-50

capture.txt

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

No branches or pull requests

1 participant