jenkins - Nexus returns error 502 (Bad Gateway) when publishing artifacts -
i've completed installation of sonatype nexus 3.2.1-01 , i'm trying publish artifacts using jenkins job , nexus artifact uploader 2.9 plugin.
the upload starts fine:
100 % completed (572 kb / 572 kb).
but throws the error:
return code is: 502, reasonphrase:bad gateway.
both jenkins , nexus servers run behind reverse proxy believe source of issue.
the apache log seems suggest request not replied nexus:
[thu apr 06 18:50:46.128569 2017] [proxy:error] [pid 10327] (32)broken pipe:
[client some_ip:57928] ah01084: pass request body failed 0.0.0.0:8081 (0.0.0.0) [thu apr 06 18:50:46.128649 2017] [proxy_http:error] [pid 10327] [client some_ip:57928] ah01097: pass request body failed 0.0.0.0:8081 (0.0.0.0) some_ip ()
this virtualhost config in apache sonar server:
<ifmodule mod_ssl.c> <virtualhost *:443> serveradmin some@email.com servername some.website.com serveralias nsome.website.com documentroot /srv/www/nexus/public_html/ errorlog /srv/www/nexus/logs/error.log customlog /srv/www/nexus/logs/access.log combined proxypreservehost on proxypass / http://0.0.0.0:8081/ proxypassreverse / http://0.0.0.0:8081/ proxypassreverse / https://some.website.com/ sslcertificatefile /etc/letsencrypt/live/some.website.com/cert.pem sslcertificatekeyfile /etc/letsencrypt/live/some.website.com/privkey.pem include /etc/letsencrypt/options-ssl-apache.conf sslcertificatechainfile /etc/letsencrypt/live/some.website.com/chain.pem </virtualhost> </ifmodule>
i've tried add following, explained in other answers, did not help:
1) disabling check on ssl certificates (although these valid):
sslproxyengine on sslproxyverify none sslproxycheckpeercn off sslproxycheckpeername off
2) forcing requests headers:
requestheader set x-forwarded-proto "https" requestheader set x-forwarded-port "443"
3) settting timeouts , keepalive options in proxypass line:
proxypass / http://0.0.0.0:8081/ retry=1 acquire=3000 timeout=600 keepalive=on
at end error 502 (bad gateway) had nothing root cause of problem. version listed on artifact published snapshot version did not comply nexus policy , triggering error.
Comments
Post a Comment