reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
44 stars 37 forks source link

External pre-receive hook is not taking the executable script #119

Open jmettup opened 3 years ago

jmettup commented 3 years ago

Hi Team,

we are facing issue while enabling the pre-receive external hook on our repos. The executable script we used to use since the beginning suddenly stopped working . when trying to enable we are getting error as below:- "Bitbucket is running in DataCenter mode. You must use "safe mode" option."

please refer to screenshots and when i enable the safe mode on the hook we get error as below:- Executable does not exist

We have the executable in the correct location and the ownership and permissions are still intact and correct.

Please advise as this is impacting our production. Please refer to the 2 screenshots which actually shows the errors. image (38) image (39)

Thank You, Jag

jmettup commented 3 years ago

Please make this as a high priority as this is impacting our production.

seletskiy commented 3 years ago

Hello,

I see that you say that you put the executable at the correct location, but it might be that a) you've accidentally missed /external-hooks/ sub-directory in the path while putting the hook script on the server, since it is missing on the screenshot (e. g. screenshot says /var/stash_home/shared/push_validati...); b) actually, a relative path to the script should be used in the Executable field when Safe Mode is enabled, you need to put just push_validati... (your executable name) here.

So, could you please double check next two points before we will proceed further?

diewuq commented 2 years ago

I have upgraded Bitbucket from 5.6.3 to 7.17.4 DC version, use External Hooks 12.0.1 version, and also met this error. It seems there is no a folder named "external-hooks" after upgrade External Hooks plugin. I have tried create a folder "external-hooks" under "/var/atlassian/application-data/Bitbucket/shared/", and in "/var/atlassian/application-data/Bitbucket/shared/external-hooks/, I create a test.sh file for test, but it shows "Executable does not exist". Could you look at this issue again? Thank you.