# Webhook not delivering after push

**URL:** <https://forum.gitea.com/t/webhook-not-delivering-after-push/6186>\
**Category:** Gitea Usages\
**Created:** [November 3, 2022, 2:47pm UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186 "2022-11-03T14:47:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![haath](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/haath/32/3181_2.png) [@haath](https://forum.gitea.com/u/haath)\
**Post date:** [November 3, 2022, 2:47pm UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/1 "2022-11-03T14:47:00Z")

</div>

Hello,

I have a new gitea installation, and everything seems fine excepts that webhooks don’t seem to work.  
For context it’s a Docker installation on arm64, something like a raspberry pi. Also, the webhook in question is from Drone CI.

The webhook is definitely correct, since the test deliveries are all successful:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/6/6aeccaaf7d728a585fbad389c3a86ca3b8931c32.png)

And even with all events enabled in the webook settings.

But nothing happens when I push or create a tag. And there’s nothing useful in the debug log either, it just shows that the push happened and nothing else.

```auto
Accepted publickey for git from 192.168.0.2 port 56207 ssh2: RSA SHA256:xxxxx
2022/11/03 15:46:28 ...ters/private/serv.go:412:ServCommand() [D] [6363d444] Serv Results:
        IsWiki: false
        DeployKeyID: 0
        KeyID: 1 KeyName: desktop
        UserName: haath
        UserID: 1
        OwnerName: haath
        RepoName: ci-test
        RepoID: 5
2022/11/03 15:46:28 [6363d444] router: completed GET /api/internal/serv/command/1/haath/ci-test?mode=2&verb=git-receive-pack for 192.168.0.2:0, 200 OK in 18.7ms @ private/serv.go:81(private.ServCommand)       
2022/11/03 15:46:28 [6363d444-2] router: completed POST /api/internal/ssh/1/update/5 for 192.168.0.2:0, 200 OK in 18.0ms @ private/key.go:18(private.UpdatePublicKeyInRepo)
Received disconnect from 192.168.0.2 port 56207:11: disconnected by user
Disconnected from user git 192.168.0.2 port 56207

```

And in my configuration I have all the following:

```toml
[server]
DISABLE_SSH = false
OFFLINE_MODE = false

[security]
DISABLE_GIT_HOOKS = false
DISABLE_WEBHOOKS = false

[webhook]
ALLOWED_HOST_LIST = *
DELIVER_TIMEOUT = 30

```

Everything else I’ve tried:

- Pushing on HTTPS instead of ssh
- Creating a new repository
- Checking for `noexec` flags

---

<div class="post-metadata">

**Author:** ![haath](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/haath/32/3181_2.png) [@haath](https://forum.gitea.com/u/haath)\
**Post date:** [November 3, 2022, 6:26pm UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/2 "2022-11-03T18:26:17Z")

</div>

After some more testing I found also this: webhooks are triggered when creating a pull request.

However still nothing when pushing commits, or tags, or even updating pull requests.

---

<div class="post-metadata">

**Author:** ![haath](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/haath/32/3181_2.png) [@haath](https://forum.gitea.com/u/haath)\
**Post date:** [November 3, 2022, 7:47pm UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/3 "2022-11-03T19:47:50Z")

</div>

I narrowed it down to the `post-receive.d/gitea` hook.

The file appears to always fail `test -x` inside the container, event though it has `777` permissions.

And it’s definitely executable, I can run it inside the container as any user.

Any suggestions would be very welcome…

---

<div class="post-metadata">

**Author:** ![wxiaoguang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/wxiaoguang/32/2280_2.png) [@wxiaoguang](https://forum.gitea.com/u/wxiaoguang)\
**Post date:** [November 4, 2022, 7:25am UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/4 "2022-11-04T07:25:53Z")

</div>

FAQ Push Hook / Webhook aren’t running

> **[FAQ - Docs](https://docs.gitea.io/en-us/faq/#push-hook--webhook-arent-running)**

---

<div class="post-metadata">

**Author:** ![th0m4s](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@th0m4s](https://forum.gitea.com/u/th0m4s)\
**Post date:** [December 29, 2022, 2:10am UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/5 "2022-12-29T02:10:16Z")

</div>

So I’m also having the same issue and have made same observations as @haath’s comment above.  
(‘test -x’ always failling)

Look like this might be the cause: [https://bugs.launchpad.net/ubuntu/+source/libseccomp/+bug/1916485](https://bugs.launchpad.net/ubuntu/+source/libseccomp/+bug/1916485)

A really hacky and temporary workaround I’ve done for a couple of my repos is to replace ‘test -x’ with ‘/usr/bin/test -x’ in the hook scripts. This works for some reason according to that bug report and in my container.

A more permanent solution might be rebasing the docker image to one with the fixed bash/libseccomp/glibc?

---

<div class="post-metadata">

**Author:** ![th0m4s](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@th0m4s](https://forum.gitea.com/u/th0m4s)\
**Post date:** [February 13, 2023, 9:13am UTC](https://forum.gitea.com/t/webhook-not-delivering-after-push/6186/6 "2023-02-13T09:13:49Z")

</div>

Update:  
It doesn’t seem like it’s the libseccomp issue.

The built-in `test` from bash fails with `EACCES` when trying to test for execute permissions for a file on a network share (NFS for me). However, the mount is mounted with `exec` option and I can execute the file.

It seems like using `stat(2)` works ok on a local docker with NFS mounts, `access(2)` also works ok on my deployed docker with NFS, but the bash built-in uses `faccessat2(2)`, which returns `EPERM`.

It does say in the man page for `faccessat2(2)` that these calls may not work correctly on NFSv2 or FUSE mounts. However, I am using NFSv3, so it might be the docker fuse mounts.
