Skip to content

webhook failed as "read tcp 172.18.0.6:45254->172.18.0.2:8000: i/o timeout" #11639

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

Closed
2 of 7 tasks
moooofly opened this issue May 27, 2020 · 4 comments
Closed
2 of 7 tasks
Labels
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@moooofly
Copy link

  • Gitea version (or commit ref): gitea/gitea:latest (IMAGE ID: ee58398a1412)
  • Git version: git version 2.17.1
  • Operating system: Linux moooofly 4.15.0-20-generic Use Gogs name if user is registered #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

req:

Request URL: http://64.64.234.144:18000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibW9vb29mbHkvZHJvbmVfZGVtbyIsInR5cGUiOiJob29rIn0.QGf-dk3bG03D3M-6lQgWKoTy-1XG6ed-Z86v7_nQLls
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: ee1e187d-2056-4375-bf26-0b45bbf0ed1d
X-GitHub-Event: push
X-Gitea-Delivery: ee1e187d-2056-4375-bf26-0b45bbf0ed1d
X-Gitea-Event: push
X-Gitea-Signature: a07699ce861103d34797edf5cace86ed0d2e036cce268e030afcbec4b22c1629
X-Gogs-Delivery: ee1e187d-2056-4375-bf26-0b45bbf0ed1d
X-Gogs-Event: push
X-Gogs-Signature: a07699ce861103d34797edf5cace86ed0d2e036cce268e030afcbec4b22c1629

resp:

Delivery: Post "http://64.64.234.144:18000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibW9vb29mbHkvZHJvbmVfZGVtbyIsInR5cGUiOiJob29rIn0.QGf-dk3bG03D3M-6lQgWKoTy-1XG6ed-Z86v7_nQLls": read tcp 172.20.0.2:51942->64.64.234.144:18000: i/o timeout

Description

  • step 1: launch drone server on my own VPS
docker run -itd -p "18000:8000" -v /var/lib/drone:/var/lib/drone -e DRONE_OPEN=true -e DRONE_HOST=http://64.64.234.144:18000 -e DRONE_GITEA=true -e DRONE_GITEA_URL=https://try.gitea.io/ -e DRONE_GITEA_GIT_USERNAME=moooofly -e DRONE_GITEA_GIT_PASSWORD=xxxx -e DRONE_GITEA_PRIVATE_MODE=false -e DRONE_GITEA_SKIP_VERIFY=false drone/drone:0.8.5
  • step 2: push some test codes

image

  • step 3: activate repo in drone

image

  • step 4: test webhook in gitea

image

image

image

image

Are there any settings I config wrong?

Screenshots

@moooofly
Copy link
Author

In my own env, I can change wehhook URI pointing to drone server directly by

http://drone-server:8000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibW9vb29mbHkvZHJvbmVfZGVtbyIsInR5cGUiOiJob29rIn0.2-drtEy2XqkBV3S1yeQKvbS57cow68CtaDRUgpL-ojk

but still not work and get

Delivery: Post "http://drone-server:8000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibW9vb29mbHkvZHJvbmVfZGVtbyIsInR5cGUiOiJob29rIn0.2-drtEy2XqkBV3S1yeQKvbS57cow68CtaDRUgpL-ojk": read tcp 172.18.0.6:33590->172.18.0.3:8000: i/o timeout


my own test env

[#36#root@bwg-cn2 ~/workspace]$docker-compose ps
    Name                  Command                       State                                 Ports                       
--------------------------------------------------------------------------------------------------------------------------
drone-agent    /bin/drone-agent agent           Up (health: starting)   3000/tcp                                          
drone-server   /bin/drone-server                Up                      443/tcp, 80/tcp, 0.0.0.0:18000->8000/tcp, 9000/tcp
gitea          /usr/bin/entrypoint /bin/s ...   Up                      0.0.0.0:10022->22/tcp, 0.0.0.0:13000->3000/tcp    
portainer      /portainer                       Up                      0.0.0.0:19000->9000/tcp                           
postgres       docker-entrypoint.sh postgres    Up                      5432/tcp                                          
[#37#root@bwg-cn2 ~/workspace]$
[#38#root@bwg-cn2 ~/workspace]$docker network inspect 9848a632664a
[
    {
        "Name": "gitea-network",
        "Id": "9848a632664a32a51812a27ee52842c30c1e4804ef786d4887a1b11d69557636",
        "Created": "2020-05-26T03:28:25.322785112-04:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "40f5bfa8efca35ed1f6de930238f6028b2d8a8dddcc520d865f529aeb1f588c3": {
                "Name": "portainer",
                "EndpointID": "92580fab7112166fddf340e40380be3f91ed3e7328f90fa30561ea716aba79fd",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            },
            "b0177ebd2908a767d27ea630fd91090249ba5986935e2056d4078909c5309cd2": {
                "Name": "drone-agent",
                "EndpointID": "c869dfa540f90e9f3ab9e01cab0637faaf549c2f42220c97648ff8f87926ffa3",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            },
            "b842ccc4a752fc04b58037d34b7c5bd183fdc826405af94c2dbdd0ba02373a25": {
                "Name": "drone-server",
                "EndpointID": "2cb9d31a05f3eeddffe24af4f4aefe51bbbbe1f1809b3c79c587885e4c03f839",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "b92acb19469c218f893f6eada5caddb75392551dd0b6ee6ea287df79fe358c77": {
                "Name": "postgres",
                "EndpointID": "e1697268891726763d7b2bda185f99415d195a844f53e3216c5ee2b1ff793e42",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "cd384de187d2b3a8aaf1d6f53839522360f97e5ac02f389638fc62a62df9615b": {
                "Name": "gitea",
                "EndpointID": "52b2da087ba3e2350883cb1c4b7e1dd83e1d9a28513487ec3925bc3b1a5ef434",
                "MacAddress": "02:42:ac:12:00:06",
                "IPv4Address": "172.18.0.6/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]
[#39#root@bwg-cn2 ~/workspace]$

@techknowlogick
Copy link
Member

This log means that there is a network connection issue between Gitea and Drone. Perhaps there is a firewall in the way? Are you able to use docker exec to enter the Gitea container and use curl to attempt to access the same URL that you have in your webhook?

@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Aug 8, 2020
@stale
Copy link

stale bot commented Aug 31, 2020

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Aug 31, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants