Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-24995

Server adapter: restarting into debug after restarting Eclipse errors trying to set duplicate port names

    XMLWordPrintable

Details

    Description

      reported originally in https://github.com/jbosstools/jbosstools-openshift/pull/1561#pullrequestreview-60653284 (with slight different steps)

      1. ASSERT: make sure that you have an app based on the "nodejs-mongo-persistent" template
      2. ASSERT: make sure that you have the source imported to your workspace and a server adapter for it
      3. EXEC: Server adapter: Start/Restart adapter Debugging
      4. ASSERT: Server adapter: adapter is debugging, you see the debugging output in the console and the env vars have devmode set to true and the debugging port set to some value (5858 by default)
      5. EXEC: Server adapter: Restart adapter (not debugging)

      Result:

      com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.64.2:8443/oapi/v1/namespaces/nodejs/deploymentconfigs/nodejs-mongo-persistent response code: 422 DeploymentConfig "nodejs-mongo-persistent" is invalid: spec.template.spec.containers[0].ports[2].name: Duplicate value: "debug"
      	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
      	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
      	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
      	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
      	at okhttp3.RealCall.execute(RealCall.java:57)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:258)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:222)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:210)
      	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:316)
      	at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
      	at org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.sendAndGetNewPod(OpenShiftDebugMode.java:308)
      	at org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.execute(OpenShiftDebugMode.java:220)
      	at org.jboss.tools.openshift.js.server.behaviour.OpenShiftNodejsLaunchController.launch(OpenShiftNodejsLaunchController.java:52)
      	at org.jboss.ide.eclipse.as.wtp.core.server.launch.ControllableServerLaunchConfiguration.launch(ControllableServerLaunchConfiguration.java:52)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
      	at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3566)
      	at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3502)
      	at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:377)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
      

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: