Layer7 API Management

 View Only
  • 1.  Gateway Migration Utility -- Already Connected

    Posted Jan 07, 2016 02:58 PM

    Between different runs of GMU, I'm getting the following error:

    Running....

    Execution failed. Reason: Already connected

     

    and gmu.log shows this:

    INFO: Running Command: migrateIn

    Jan 07, 2016 1:52:32 PM com.ca.gateway.rest.commandline.command.Command runCommand

    WARNING: Error executing command

    javax.ws.rs.ProcessingException: Already connected

      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:236)

      at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:655)

      at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:652)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:228)

      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:422)

      at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:652)

      at com.ca.gateway.rest.api.GatewayManagementGatewayClient$IP10Bundle.putXml(Unknown Source

    ...

     

    Pretty sure I'm not connected to the gateway under the account in question or anything. How can I fix this?



  • 2.  Re: Gateway Migration Utility -- Already Connected

    Posted Jan 08, 2016 08:59 AM

    Not exactly an answer, but for me, the problem went away overnight. I'm not certain what, if anything changed to allow this to start working.



  • 3.  Re: Gateway Migration Utility -- Already Connected

    Posted Jan 08, 2016 10:53 AM

    Hey czhou,

     

    Make sure you're not running GMU against the VIP, it needs to be ran against the node directly.



  • 4.  Re: Gateway Migration Utility -- Already Connected

    Posted Jan 11, 2016 06:11 PM

    Hi,

       Thanks for that. It's possible that this was the cause. There was definitely some fishiness happening in the network between me and the gateway in question.

     

    Your suggestion of "needs to be ran against the node directly", while makes sense, is also confusing to me. When you say VIP, I assume you mean a Virtual IP/load-balancer setup.

     

    If you've got two nodes in a cluster, both of which are setup for TLS against the name of the cluster endpoint, how do you connect to a node directly using GMU?

     

    E.g.

    My cluster endpoint is https://api.cluster.com with some sort of traffic distribution going to Node1 and Node2

    Node1 is https://node1.cluster.com

    Node 2 is https://node2.cluster.com

     

    if I talk to Node1 or Node2 directly with GMU, GMU fails because it will see a TLS certificate that claims to be https://api.cluster.com?

     

    The "hack" I used to get around this problem is to create a local hostfile entry that makes the IP of one of the nodes named api.cluster.com (effectively overriding the cluster entirely).

     

    Am I missing something about this suggestion?



  • 5.  Re: Gateway Migration Utility -- Already Connected

    Broadcom Employee
    Posted May 03, 2017 05:34 AM

    Hi Doyle,

     

    I got the same error with load balancer enabled Gateway. I got the error no matter I tried to run GMU against the Gateway node directly or the cluster endpoint, no matter hostname or ip address. I'm in intranet without VPN. 

    Any solution for this issue so far? 

    I think it is very common requirement to use GMU in load balancer enabled envirnoment.

     

    Thanks
    Yang



  • 6.  Re: Gateway Migration Utility -- Already Connected

    Posted Jun 13, 2016 10:21 AM

    I think this is too late but i post an aswer for those who may have the same problem.

     

    I had the same Error and this wasn't due to the user. The host in the command was wrong.

    You have to use the FQDN of the server or the IP Address.



  • 7.  Re: Gateway Migration Utility -- Already Connected

    Broadcom Employee
    Posted May 03, 2017 12:47 PM

    Another note on this that if you are going through a load balancer that you need to ensure that the connection is maintained to a set node in the cluster known as sticky session.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 8.  Re: Gateway Migration Utility -- Already Connected

    Broadcom Employee
    Posted May 03, 2017 09:46 PM

    Hi Stephen,

     

    Yes, I've configured sticky session already in load balancer before I got this "Already Connected" issue. I use Nginx as load balancer.

     

    Thanks

    Yang



  • 9.  Re: Gateway Migration Utility -- Already Connected
    Best Answer

    Broadcom Employee
    Posted May 04, 2017 12:25 AM

    Yang,

     

    I've looked through our old cases and found 2 reasons for why this error will occur:

    1) If the gateway/cluster hostname is not able to be resolved by DNS

    Solution: Correct DNS resolution either in DNS server or within the local file resolver (/etc/hosts)

    2) If the GMU does not trust the gateway/cluster SSL key being provided

    Solution: Import the public certificate for the SSL Key being provided by the destination gateway/cluster into the JAVA cacerts file or add the "trustCertificate" to the arguments file on the GMU command line.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 10.  Re: Gateway Migration Utility -- Already Connected

    Broadcom Employee
    Posted May 04, 2017 02:32 AM

    Hi Stephen,

     

    Correct! It is certificate issue. Issue was resolved by adding --trustCertificate in the command line. Thanks so much.

    I can't mark your answer as correct answer because the question was not created by me.

     

    Yang