• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk + Gitlab problem

Thomas_Lartaud

New Pleskian
Hi there,

First of all, thanks for this amazing software, it really changed my life. I'm a webdesigner/developer and i use Plesk to host some clients sites.

I have a VPS server hosted on OVH used to host plesk (so i have an OVH distribution licence. Is there a way i can access the support with that licence ?), and a dedicated server used to host Gitlab.

All my websites are repositories hosted by my personal gitlab server. For each of this repo, i have a webhook set, so i can use some post-receive hook to update the live sites after pushing to the repo. Nothing new there, quite simple process normally.

So, i wrote a script for myself to allow me to do that. My script works. However, its only working for about an hour ... not more. I mean that if i start using the script ( pushing, deploying, etc .. ), it will work one time, two times, three times, and then, i don't know when or why, but the webhook will stop working. If i go on gitlab and click on the "test hook" button. It says me that "hook execution failed" (but it worked an hour ago, when script was working). This is not a gitlab issue, because if i reboot my Plesk server, the script start running again. When the script is "crashed" (not working), if i manually enter the url of my script in my browser, i can access it, view the logs, etc ... I i click on the gitlab "test hook" button, i have 0 new log in my access.log ... It seems that for an unknown reason, gitlab cant access my plesk server after some time ... Rebotting the VPS Plesk server will make gitlab webhook and my auto-deployments works again.

Please guys, could you give some advices on how to find the problem ?
I have mod security activated, but i can not find any failed attempt access to my deploy script.

I have uploaded the script i created to share it to thoses who need, and to allow all of us to do some kind of testing on this current "on-development script", and maybe fix that gitlab-plesk problem.
I really hope that i can fix soon.

I tried thoses commands to see if after running them, i can run my webhook through gitlab, but no, they have no effect. Only a reboot (for now) seems to make the webhook works again.
Code:
/etc/init.d/psa stop
/etc/init.d/psa start
sudo /etc/init.d/networking restart
sudo /etc/init.d/apache2 restart

Note : my clients websites run a chrooted environment. See in the deploy script -> readme, how i chrooted my environment
Question 1 : Is there a way to run gitlab-webhook-push.sh as my user chrooted privileges instead of root privileges ?

Question 2 : How to fix the behaviour that make plesk unaccessible from gitlab, after some time ?

There you can find the script i've created, with some explanations.
https://github.com/tlartaud/deploy
Any kind of help would be infinitely appreciated.

There you can see what is written in my access.log after i manually enter the script URL on my browser :
Code:
IP1.IP1.IP1.IP1 - - [16/Feb/2015:14:22:17 +0100] "GET /deploy/?p=password&debug=1 HTTP/1.1" 200 452 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36"
This what is written in the log after i click the test hook button :
Code:
IP2.IP2.IP2.IP2 - - [16/Feb/2015:14:26:09 +0100] "POST /deploy/?p=password HTTP/1.1" 200 159 "-" "-"
Where IP1.IP1.IP1.IP1 is the ip of my personal computer and IP2.IP2.IP2.IP2 is the IP of my gitlab server.
When connections stop working, nothing is added in access.log when i click the "test hook" button, but the same thing is added as normal when i enter the url in my browser.
Does it means that my gitlab server is being banned somewhere ?

When the script stopped working, i also tried a "chmod -R 777 deploy", but it has no effect. But permissions might not be the problem, because the script actually works if reboot the server ...

Edit: It seems i'm not the only one who got this problem : http://stackoverflow.com/questions/25245449/web-hooks-gitlab-not-working?rq=1
(i've been running my script on a ISPConfig server for months without any problems)

Plesk 12 Ubuntu 14.04
Cheers,
Thom.
 
Last edited:
Hi there,

about plesk suport from lic. packges of ovh you will not be able to open tickets with them (odin).

i start disabling mod secure, and look at error log, than couple things that you can do:

change the shell execution mode to bin/sh
change nignx to apache or vice-versa.
try with all 777
check the owner of the files and folder
 
Back
Top