I recently installed bit bucket plug-in(Version-1.1.8) in jenkins(Jenkins ver. 2.113). I configured a Jenkins webhook for a project on Bitbucket server by providing url http://ipaddress:port/bitbucket-hook/. When I tried to save I keep getting error invalid url. I am not sure why bit bucket is not accepting ip address. I assume it may be due to ipaddress not being exposed publicly.
Please help.
FYI:IP address is static and DNS is not configured for the server.
Bitbucket Cloud (https://bitbucket.org/) is only accessible over public IPs, so it can only talk to other public IPs. If you're giving a private IP then Bitbucket won't have any way to reach it. (This is the intended nature of private IP spaces.)
You'll need to have a publicly-accessible IP, at the very least, so that Jenkins can receive incoming webhooks.
Related
I am trying to configure github webhooks with my jenkins server but I keep getting "failed to connect". Note that I am using a public ip and not a private or localhost address, At first, icmp protocol was blocked on my firewall but even after allowing it, it still doesn't work.
However, when I proxy my server (using smee client) and use the proxied url in the webhook instead, it works fine, so I thought the problem was jenkins url (in system configuration of jenkins) so I changed that to the public ip but it doesn't have any effect, now I'm clueless.
It might be relevant to mention that jenkins is running on a docker container,
Apparently the webhook must pass through a web server and not to jenkins directly, So I configured nginx as a reverse proxy to jenkins server and it worked fine.
I am trying to configure webhooks in github so that it will build every time I do a new push, I have added web hooks in github and given the address of jenkins which is http://localhost:8080/github-webhook/ but it did not work and I found out that we need to find our IP address and I added it as follows: http://"my IPV4":8080/github-webhook/ and it still didn't work. I have even tried using ngrok to port forward, but it didn't work as well. It constantly throws the We couldn’t deliver this payload: Failure when receiving data from the peer error.
You need a public IP address for Github to point to detect a push request. localhost is on your local machine. You can configure jenkins on EC2 if you want to set it up for some testing.
You can use a proxy agent Ngrok.
Command :
ngrok http 8080
It will generate http://{some-number}.ngrok.io, copy the generated public address and put in your github repository webhook http://{some-number}.ngrok.io/github-webhook
At this point when you save it, it will send a post request to ngrok server, got redirected to localhost and you will see a green tick.
You can refer to this document for configuring the whole process.
I'm setting up a Web-hook in GitHub to trigger a Jenkins build for every push event. I'm running Jenkins from a Blue Ocean Docker container.
https://imgur.com/bNf5dMd
I'm able to access jenkins from http://192.168.99.101:32771/ , as specified in the docker container.
I have specified the git repository and checked "GitHub hook trigger for GITScm polling" checkbox.
I am able to manually kick off the build process after a commit, but when I setup the webhook in github with the payload url http://192.168.99.101:32771/github-webhook/ and commit something,
I get the error "We couldn’t deliver this payload: Couldn't connect to server"
Other solutions I've looked at.
Using ngrok. But I'm not running this on localhost.
I tried using a Personal Access Token and created an automatic webhook from Jenkins to Github. And I got the same error.
What am I missing, or what am I doing wrong?
Github will never reach to your Jenkins Server as your server is only accessible with-in network.
The error is very clear.
We couldn’t deliver this payload: Couldn't connect to server
http://192.168.99.101:32771 this is the same as your local host in term of access it from outside of the network.
Possible solution.
Run jenkins on some remote server with Internet access and give that IP in the webhook of the Github
Pass your public IP to Github, maybe you still issue with define port forwarding if there is any issue with access.
For anyone who's jenkins server is in a Ec2 instance of AWS and if it is in a private subnet, you can do two things:
Move your private ec2 into a public subnent
Create a Load balancer (ALB) within a public subnet and attach your private ec2 instance to that Load Balancer. Then use the address of ALB for you github hook.
Prepare the environment in jenkins to integrate sonarqube and gitlab, with sonarqube I have no problem but when I try to create Webhooks, it does not let me enter a URL localhost.
If someone can help me to give access to my URL.
This was reported in gitlab-ce issue 49315, and linked to the documentation "Webhooks and insecure internal web services"
Because Webhook requests are made by the GitLab server itself, these have complete access to everything running on the server (http://localhost:123) or within the server’s local network (http://192.168.1.12:345), even if these services are otherwise protected and inaccessible from the outside world.
If a web service does not require authentication, Webhooks can be used to trigger destructive commands by getting the GitLab server to make POST requests to endpoints like http://localhost:123/some-resource/delete.
To prevent this type of exploitation from happening, starting with GitLab 10.6, all Webhook requests to the current GitLab instance server address and/or in a private network will be forbidden by default.
That means that all requests made to 127.0.0.1, ::1 and 0.0.0.0, as well as IPv4 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and IPv6 site-local (ffc0::/10) addresses won’t be allowed.
If you really needs this:
This behavior can be overridden by enabling the option “Allow requests to the local network from hooks and services” in the “Outbound requests” section inside the Admin area under Settings (/admin/application_settings/network):
My Virtual Machine has hostname defined, for instance, mycrucible.
This VM is deployed in the cloud. But this domain name is not registered. Thus, I can access my Crucible installation over IP address only.
When I get notifications from Crucible, all links inside the email have hostname (mycrucible) instead of IP.
Actually, when I installed Crucible, it somehow read this hostname (probably stored somewhere).
My site URL in server settings is changed to IP.
How can I fix that issue? I want to get working emails where links contain IP.
The problem I had is that by default Crucible used site URL as IP. And it was sending emails with machine hostname anyway (Crucible bug!?). I have changed site URL in global server settings manually to my IP and it started to work. Now I get correct links in Crucible emails.