mar 27, 2017 2:05:07 PM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /project/Jenkins_Project_name/
mar 27, 2017 2:05:07 PM FINE com.dabsquared.gitlabjenkins.webhook.ActionResolver
Unknown GET request:
Hi guys,
i have a problem with my webHook/Jenkins . I have GitPlugin set right because when i make commit and push and click build i got status of jenkins builded in my GitLab(Pusher build status working well).
But my webhook link /project/Jenkins_Project_name/ send me message 404
HTTP ERROR 404
Problem accessing /project/Jenkins_Project_name/. Reason:
Not Found
Powered by Jetty://
In the log i get WebHook called with url: /project/Jenkins_Project_name/ and Unknown GET request: .
in the GitLab side on the test the link i got Hook execution failed: execution expired. My /project/ link is not working well do u know why?
Did you use the literal string 'jenkins_project_name' in your webhook, rather than the actual name of the Jenkins job you want to build?
Yes Thats it when i change project for job i am in right project .
I have the same issue. I am just select checkbox "Build when a change is pushed to GitLab. GitLab CI Service URL: http://my.domain/project/SuperAvia" in setting section for an jenkins job. I am sure that I config job correctly because another Build Triggers works well. When I go to the http://my.domain/project/SuperAvia it return:
HTTP ERROR 404
Problem accessing /project/SuperAvia. Reason:
Not Found
Powered by Jetty://
You won't be able to perform a GET on the /project/SuperAvia URL. It only responds to a POST from a GitLab webhook. How have you both configured GitLab to trigger the job? Make sure you have followed the instructions under https://github.com/jenkinsci/gitlab-plugin#gitlab-configuration to create the webhook.
@Mistu3 did you resolve this issue? I'm have the same problem. Jenkins 2.46.2, Gitlab Plugin 1.4.5, GitLab CE 9.0.4
Jenkins 2.46.2
Gitlab 9.1.2
Gitlab-plugin 1.4.5
FYI, I was having the same problems. My mistakes were:
project is the folder of project. But not.job from it.So for a Jenkins item url like :
http://my-jenkins.com/job/Folder/job/Item/
I've to write:
http://my-jenkins.com/project/Folder/Item/
Don't forget to uncheck ssl if you don't use it.
Then it works.
Thanks. My issue was that I was running in dev and my Jenkins url was http://localhost:8080. Gitlab didn't accept localhost. When I changed to my ipaddress it worked fine.
I'm having this issue...
Errors I get after I test webhook in GitLab:
Unsupported X-Gitlab-Event header: Push EventHook executed successfully but returned HTTP 404 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /project/${jenkins_job_name}. Reason: <pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/> </body> </html>
(I've edited ${jenkins_job_name}, not a literal value)
Webhook is in https://${jenkins_url}/project/${jenkins_job_name} format (copied from Jenkins' job configuration page, build triggers section - GitLab CI Service URL).
GitLab plugin version 1.4.7
Jenkins version 2.75
GitLab version 9.5.1
edit: @omehegan I'm not sure if people are getting notifications on comments if issue is closed, can you help with that? :)
I also have the same issue. I can test e.g. Push Hook from Gitlab (by commit) but I'm not able to test Push Event.
I had exactly the same Issue ... after 3 hours I realized that, what is not working, is simply the test of push event from gitlab.
What draw me crazy has been that result obtained was a 404 not found that was the same kind of error first obtained with a mistake in webhook url!
While after have fixed the url, using the test from gitlab, the real error is (fine log on server):
_FINE: Unsupported X-Gitlab-Event header: Push Event_
A real push is instead working fine
Is this is the case for you too? Not a gitlab-plugin Issue, but a gitlab issue with webhook test headers?
I'm not really sure. I moved from https://${jenkins_url}/project/${jenkins_job_name} to https://user:password@${jenkins_url}/job/${jenkins_job_name}/build?delay=0sec for the time being.
This means you're not using anymore gitlab-plugin to trigger build, but putting password in the url you're exposing it with no encryption, while using gitlab-plugin you can use a dedicated token sent encrypted with https post.
Also @mariachini declared only having problem with "push event test" button.
So I would make a test with a real push using the trigger url introduced by gitlab-plugin with token.
Bye,
Stefano
Are you all using GitLab 9.5? If so I think you might be hitting https://github.com/jenkinsci/gitlab-plugin/issues/608 If that looks right, please comment in that issue. We have a PR to fix this.
I have the same problem:
I have tried to test gitlab webhook with:
http://{{alias_dns}}:{{port}}/project/{{projectname}}
and
http://{{hostname}}:{{port}}/project/{{projectname}}
and
http://{{ip_addr}}:{{port}}/project/{{projectname}}
I have also tried to do a post action with postman with the following headers:
Content-Type:application/json
X-Gitlab-Event:Push Event
and the json body
{
"object_kind": "push",
"event_name": "push",
"before": "384fedb6efdb69893ad54cd00e410c4f70b6c7eb",
"after": "018bec43034a1cb61ad0e2f9e58261edf923f9ac",
"ref": "refs/heads/master",
"checkout_sha": "018bec43034a1cb61ad0e2f9e58261edf923f9ac",
"message": null,
...
}
This issue should not be closed - still occurring with plugin v 1.5.2 and jenkins 2.97
It was working for me, but it's returning a similar to the error described in this topic:
Hook executed successfully but returned HTTP 403
I'm using the following url:
http://JENKINS_URL/buildByToken/build?job=JOB_NAME&token=TOKEN_NAME
I have the right permissions to work in the project and I already test creating a new token but sounds a little bit strange.
_GitLab Plugin Version: 3.6.4_
@grazielegs the latest version of this plugin is 1.5.2. And you should not be using 'buildByToken' to trigger your jobs, that is a Jenkins feature and will totally bypass this plugin. Please read the README on how to set up the trigger, you should be hitting a URL like http://jenkins/project/your_project
@webartoli @Andrewpk please see my comment here. https://github.com/jenkinsci/gitlab-plugin/issues/533#issuecomment-326064354
@omehegan Strange, cause the url are working well now for trigger my jobs and the pushed events also worked. Anyway, thank you.
@omehegan was on 10.6 something, just updated to 10.7.2 and still having the issue. /project/myJob_name is still 404'ing with "not found" as the only descriptor.
@Andrewpk if you get a 404, either you don't have the plugin configured for your job, or something between Jenkins and GitLab is filtering and mangling the requests. Because GitLab POSTing to /project/jobname is the only way this plugin triggers builds. If this didn't work, it would not work for anyone who uses it.
@matsch01 it done!Thanks!~
I found that the WebhooksURL can not be "localhost" or "127.0.0.1".
please find your IPv4 address.
The issue with localhost not being accepted is due to a change in GitLab. See #730
Hey,
I'm having the same problem.
Gitlab plugin version: 1.5.6
Gitlab version: ce-10.6.0-ce
Jenkins version: 2.121.1
Job type: pipline
When I push changes to gitlab or test the webhook with "Push events" option, this line appears in the jenkins log:
Jul 02, 2018 10:07:54 AM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
INFO: WebHook called with url: /project/run_auto_test-dev
That's the url in the web hook: http://jenkins:8080/project/run_auto_test-dev
This is my plugin configuration in the project:
[$class: 'GitLabPushTrigger',
branchFilterType: 'NameBasedFilter',
branchFilterName: 'dev',
triggerOnPush: true,
]
Is there something I'm missing?
@mora123456 it would help if you could share more of the Pipeline code you're using. Also, did you see this note in the README: "NOTE: You will need to run this job manually once, in order for Jenkins to read and set up the trigger configuration. Otherwise webhooks will fail to trigger the job."
@omehegan I ran the job manually several times, didn't help.
This is how the configuration looks like in the gui after i ran the job manually:

@mora123456 I don't see how you're getting a 404 in GitLab if Jenkins logs that it received the webhook request. What behavior are you seeing exactly?
@mora123456 also it looks like you have 'Filter branches by name' set, but nothing in the include or exclude sections. If you want to allow all branches to trigger the build, select the other radio button.
Same problem here. Clicking test results in a 404. In the Jenkins log I get this:
Aug 31, 2018 3:25:06 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
INFO: WebHook called with url: /project/TESTING-Website_All-GIT
Browsing to the url also results in a 404, while /job/TESTING-Website_All-GIT brings me to the project page as expected. I'm not sure how else to debug this.
Never mind! I was creating a system hook rather than a web hook. In case anyone stumbles across this, web hooks are located on the project page under Settings > Integrations.
@DRicciardi
First of all have a look o Jenkins logs in order to check if it receives the Hook.
You should see something like this
INFO: WebHook called with url: /ci/project/content-fetch
In case you are accessing your Jenkins/Git with HTTP, add your webhook as provided by Jenkins on project settings
http://domain/ci/project/<project-name>
and uncheck
Enable SSL verification
In case you have HTTPS
Use your Jenkins project URL but this time add https instead of http``
https://domain/ci/project/<project-name>
And check
Enable SSL verification
Also on Jenkins project configuration on Build Triggers/Build when a change is pushed to GitLab.
by pressing the advanced button you will find Secret Token
Generate a token and insert it on the GitLab Webhook settings.
That should work for you.
Having the same problem with GitHub here.
I've been using Jenkins daily for a long time, but since last weekend I suddenly get the error above
for all "job" urls (even if I remove the "/job" part).
I tried upgrading to Jenkins v2.151, but still I get the same issue.
Did GitHub change how they handle Jenkins? (Just like that, on Nov 9, 2018?)
Bumping an old topic but I figured out a way for the webhook to work. Although it is mentioned in the README, it's quite unclear and a bit of circus to get this setup up and running.
The reason (at least for multi-branch pipeline ) why the endpoint does not work is, the inability to set Build when a change is pushed to GitLab from the UI and SAVE IT. This has to be done declaratively and then everything works.
This is for declarative pipeline setup and works for multibranchpipeline (tested).
Gitlab : 11.4.5 (installed EE but using only the CE version)
Jenkins: 2.138
Jenkins Endpoint: jenkins.mydomain.com
For the /project/project_name endpoint to work as a webhook endpoint, you need to create an initial pipeline and trigger it manually (Will show how this can be done from gitlab)
pipeline {
agent any
post {
failure {
updateGitlabCommitStatus name: 'build', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'build', state: 'success'
}
}
options {
gitLabConnection('your-gitlab-connection-name')
}
triggers {
gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
}
stages {
stage("build") {
steps {
echo "hello world"
}
}
}
}
The important line above is triggers {
gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
} which will enable Build when a change is pushed to GitLab.
NOTE: Don't forget to change the gitLabConnection Name to your gitlabConnectionName
Go to Gitlab > Project > Integrations > Webhook and setup a bypass trigger as shown below
Webhook Url: `https://user:[email protected]/job/webhook/build?delay=0`
Secret Token : <LEAVE IT BLANK>
Verify SSL: Uncheck
Save the Webhook and Click on Test Push.
Verify that a build has been triggered on your jenkins.
Now that the gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All') has been recorded by Jenkins pipeline, remove the previous webhook and replace it with https://jenkins.m ydomain.com/project/<your_project_name>, leave the token secret empty, verifySSL unchecked.
Make a change to your Jenkinsfile, change echo hello world to echo hello webhook and push it.
The build should be automatically trigged on Jenkins.
@ShankarSumanth you are doing exactly what is in the documentation at https://github.com/jenkinsci/gitlab-plugin#declarative-pipeline-jobs except you are going through an unnecessary 'step 2.' As the doc says, you just need to build the job manually once in order to set the trigger. You don't need to do this dance of changing the webhook in GitLab and forcing GitLab to trigger the job.
I have the same problem, but the webhook is work fine. I get this error is that when I access the jenkins home page in my Chrome Mobile, if i access the home in Chrome for Mac/Windows and it work fine.
The error found:
Problem accessing /job/PROJECT/ws/frontend/.Reason
Not Found
Powered by...
And my jenkins running a docker environment, login a normal user of worker.
Knowing that this issue is already closed, I want to report the same error:
Jenkins: https://
Pipeline project with "Gitlab trigger" enabled.
Webhook: https://
Jenkins-Log:
Apr 30, 2019 1:35:44 PM INFORMATION com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /jenkins/project/Test
Triggering the webhook manually with curl -X POST https://jenkins-hafrcms.itd-intern.de/jenkins/project/Test -d "x" -k
gets me
Response 404:
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /jenkins/project/Test. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
Triggering a GitLab webhook (Gitlab 11.x CE) gives me
500 - Whoops, something went wrong on our end.
And no build is triggered.
It could POST normally when use //{JENKINS_URL}/project/{PORJECT_NAME} + secret_token, plz care about what is your Jenkins server URL? it started with HTTP or HTTPS?
if it is HTTP, the URL should be http://{JENKINS_URL}/project/{PORJECT_NAME}
else the URL should be https://{JENKINS_URL}/project/{PORJECT_NAME}
bonjour j'ai un probl猫me lorsque j'essaie de cr茅er un node voil脿 le message qu'on m'affiche
HTTP ERROR 403
Problem accessing /descriptorByName/hudson.plugins.sshslaves.SSHLauncher/checkCredentialsId. Reason:
Forbidden
Powered by Jetty:// 9.4.z-SNAPSHOT
merci de m'aider
Most helpful comment
Thanks. My issue was that I was running in dev and my Jenkins url was http://localhost:8080. Gitlab didn't accept localhost. When I changed to my ipaddress it worked fine.