Service Virtualization

Expand all | Collapse all

Dockers: Problem accessing /res-hub/v1/projects

Jump to Best Answer
  • 1.  Dockers: Problem accessing /res-hub/v1/projects

    Posted 06-27-2018 04:55 PM

    We have created docker images in Kubernetes Orchestration Engine for all DevTest components and deployed into Linux VM machines but we  are getting error on the portal console. 

    The error message is " Error While retrieving list of Projects ( 500 Network Error Connection refused) " 

     

     

     

     

    Error while retrieving list of Projects. (500 No JSON Formated Retrofit Error <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /res-hub/v1/projects. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.RuntimeException: java.lang.NullPointerException at com.ca.devtest.acl.servlet.filters.RemoteAuthenticationFilter.doFilter(RemoteAuthenticationFilter.java:242) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:75) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at

     

     

    The Project Folders  are within the container.  But it appears that Portal is getting a registry but not for res-hub. For some reason res-hub is not reading it


    Modified these properties and Restarted the portal container but that didn't help. 
    registry.host=Registryhost
    registry.port=2009
    registry.portal.port=1505
    reshub.hostname=Registryhost

     

     

     

    Any thoughts? 



  • 2.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 06-27-2018 05:14 PM

    Can they provide the server container log?  Is the Portal running in it's own container?



  • 3.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 06-27-2018 05:21 PM

    Yes Portal is running on its own container,  and the portal logs shows

     

    Caused by: java.net.ConnectException: Connection refused      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)      at java.net.Socket.connect(Socket.java:589)      at com.squareup.okhttp.internal.Platform.connectSocket(Platform.java:100)      at com.squareup.okhttp.Connection.connectSocket(Connection.java:196)      at com.squareup.okhttp.Connection.connect(Connection.java:172)      at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)      at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)      at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)      at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)      at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:438)      at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:389)      at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:502)      at retrofit.client.UrlConnectionClient.readResponse(UrlConnectionClient.java:73)      at retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:38)      at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:321)


  • 4.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 07-16-2018 03:17 PM

    Is the res-hub on a share drive?



  • 5.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 07-16-2018 03:20 PM

    No,  Res-hub is in the same container as Portal.  



  • 6.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 07-31-2018 08:44 AM

    Can you share the docker run command line and the parameters used to start the Portal?

    Also, I assume the Registry was started using -p 2010:2010 -p 1505:1505 -p 1528:1528 and is running correctly when the Portal dies.



  • 7.  Re: Dockers: Problem accessing /res-hub/v1/projects
    Best Answer

    Posted 08-02-2018 12:09 PM

    This issue was fixed by our SWAT team.  In the portal.yaml file, there is a line -J-DlisaAutoConnect="tcp://registry:2010/Registry" where we removed "tcp://" used "registry:2010/Registry" to connect the registry.



  • 8.  Re: Dockers: Problem accessing /res-hub/v1/projects

    Posted 08-05-2018 02:00 AM

    Thanks srisa09 (Sachin Srivastava) for fixing this!! Appreciate your hard work on this.