Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

anilkumar panditi
Hi,
I have configured jenkins URL ,
Manage Jenkins>System configuration>Jenkins Location>Jenkins URL

ex: https://<mydns>.com/

And i have curled on host where Jenkins running as docker container ,

[root@ip- ~]# curl -kv https://<dns>.com/
* About to connect() to DNS.com port 443 (#0)
*   Trying xxxxx...
* Connected to DNS.com (IP) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=DNS.com

 HTTP/1.1 502 Bad Gateway
< Server: awselb/2.0
< Date: Wed, 10 Feb 2021 08:11:05 GMT
< Content-Type: text/html
< Content-Length: 122
< Connection: keep-alive


Any idea why its not working , please help?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d707af9-577a-4cea-aa68-6b28019a8271n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

Dirk Heinrichs-3
Am Mittwoch, den 10.02.2021, 00:14 -0800 schrieb anilkumar panditi:

And i have curled on host where Jenkins running as docker container ,

So, this seems to be a Docker question rather than a Jenkins one, doesn't it? Anyway, did you start your container with an appropriate port mapping for port 443 (option -p)? And maybe check that containers on that host are generally reachable from other hosts (or, i.o.w.: that your Docker networking is setup properly).

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/67f88f92ac50d7a9e252cc58f6584c5de1a51ad1.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

anilkumar panditi
Hi Dirk, 
Thank you , 
Jenkins container started like below.

docker run --name myjenkins -d -u root -p 8080:8080 -p 50000:50000 -v $(which docker):/usr/bin/docker -v /jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock  myjenkins

And i curled from other host and it gets connected and throwing 502 bad gateway.

Thanks,
Anil

On Wednesday, 10 February 2021 at 16:09:55 UTC+5:30 dheinric wrote:
Am Mittwoch, den 10.02.2021, 00:14 -0800 schrieb anilkumar panditi:

And i have curled on host where Jenkins running as docker container ,

So, this seems to be a Docker question rather than a Jenkins one, doesn't it? Anyway, did you start your container with an appropriate port mapping for port 443 (option -p)? And maybe check that containers on that host are generally reachable from other hosts (or, i.o.w.: that your Docker networking is setup properly).

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: <a href="tel:+49%202226%201596618" value="+4922261596618" target="_blank" rel="nofollow">+49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/50e13aec-6e84-4593-89c1-2baea6ee0e1bn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

Dirk Heinrichs-3
Am Mittwoch, den 10.02.2021, 04:00 -0800 schrieb anilkumar panditi:

docker run --name myjenkins -d -u root -p 8080:8080 -p 50000:50000 -v $(which docker):/usr/bin/docker -v /jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock  myjenkins

And i curled from other host and it gets connected and throwing 502 bad gateway.

From your first mail, you where running curl with "https://...", which means port 443. I see no mapping of port 443 in the above command. Try running curl with "http://...:8080".

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d39a6b0de00dbc09e825f87193b07b3253c5c464.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

anilkumar panditi
Hi Dirk,
Could you please give the docker run command to use 443 ,

Thanks
Anil Panditi
On Wednesday, 10 February 2021 at 17:39:44 UTC+5:30 dheinric wrote:
Am Mittwoch, den 10.02.2021, 04:00 -0800 schrieb anilkumar panditi:

docker run --name myjenkins -d -u root -p 8080:8080 -p 50000:50000 -v $(which docker):/usr/bin/docker -v /jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock  myjenkins

And i curled from other host and it gets connected and throwing 502 bad gateway.

From your first mail, you where running curl with "https://...", which means port 443. I see no mapping of port 443 in the above command. Try running curl with "http://...:8080".

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: <a href="tel:+49%202226%201596618" value="+4922261596618" target="_blank" rel="nofollow">+49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/eb43cbb6-d0ef-4d54-a9a5-227d9462e352n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins URL https://<mydns>.com/ is not working(502 Bad Gateway)

Dirk Heinrichs-3
Am Donnerstag, den 11.02.2021, 03:36 -0800 schrieb anilkumar panditi:

Could you please give the docker run command to use 443 ,

I could (and did, see my previous responses), but I doubt it would make sense, since I don't think the Jenkins inside your container is configured to use SSL, or is it?

If you want to protect your Jenkins setup with SSL, I'd recommend running an Apache2 or NGinx webserver as a reverse proxy in front of it to handle the SSL stuff (see Jenkins documentation). This could be running directly on your Docker host, inside a container or even on a remote machine, but that's up to you.

As long as you don't have this set up, it doesn't make sense to try to connect using https://. Please first try to connect w/o SSL to confirm it's working, by using "curl http://<hostname>:8080" from a remote host. Then setup SSL.

BTW: If you change your "-p 8080:8080" to "-p 80:8080", to map the hosts port 80 to the containers port 8080, you can omit the port number when running your curl command, since 80 is the standard port for http:// (the command becomes just "curl http://<hostname>".

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8e9c9c26e7f802d10521db8cd27e9f957cfdb985.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment