You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bigtop.apache.org by "Evans Ye (JIRA)" <ji...@apache.org> on 2019/01/25 21:02:00 UTC

[jira] [Comment Edited] (BIGTOP-3147) Nexus proxy cache configuration is broken

    [ https://issues.apache.org/jira/browse/BIGTOP-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752663#comment-16752663 ] 

Evans Ye edited comment on BIGTOP-3147 at 1/25/19 9:01 PM:
-----------------------------------------------------------

Great to see the patch! However .m2/settings.xml is also wrong. Please add nexus into the paths at read as well. I've tested.
OTOH,  because curl always return 0, the 404 error is hidden. I'm thinking to extract HTTP CODE and exam the result. The value should be 200 or 400 (already exist), otherwise error out.

Something like this:
{code}
curl -o /dev/null -s -w "%{http_code}\n" -X POST -d @/tmp/temp6599511731001671196.tmp --header "Content-Type: application/json" -u admin:admin123 http://localhost:8081/nexus/service/local/repositories
{code}

Still trying to figure out how to exam the result in gradle ;)


was (Author: evans_ye):
Great to see the patch! However .m2/settings.xml is also wrong. For client the path is also wrong. Please add nexus as well. I've tested.
OTOH,  because curl always return 0, the 404 error is hidden. I'm thinking to extract HTTP CODE and exam the result. The value should be 200 or 400 (already exist), otherwise error out.

Something like this:
{code}
curl -o /dev/null -s -w "%{http_code}\n" -X POST -d @/tmp/temp6599511731001671196.tmp --header "Content-Type: application/json" -u admin:admin123 http://localhost:8081/nexus/service/local/repositories
{code}

Still trying to figure out how to exam the result in gradle ;)

> Nexus proxy cache configuration is broken
> -----------------------------------------
>
>                 Key: BIGTOP-3147
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-3147
>             Project: Bigtop
>          Issue Type: Sub-task
>    Affects Versions: 1.3.0
>            Reporter: Evans Ye
>            Assignee: Olaf Flebbe
>            Priority: Major
>
> To utilize nexus proxy to cache maven artifacts, 
> 1. docker run -d -p 8081:8081 --name nexus sonatype/nexus:oss
> 2. ./gradlew configure-nexus
> 3. ./gradlew XXX-pkg # to build XXX package with nexus cache
> However, configure-nexus failed silently:
> {code}
> $ curl -X POST -d @/tmp/temp6599511731001671196.tmp --header "Content-Type: application/json" -u admin:admin123 http://localhost:8081/service/local/repositories
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 404 Not Found</title>
> </head>
> <body>
> <h2>HTTP ERROR: 404</h2>
> <p>Problem accessing /service/local/repositories. Reason:
> <pre>    Not Found</pre></p>
> <hr /><i><small>Powered by Jetty://</small></i>
> </body>
> </html>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)