简体   繁体   中英

Bluemix with Tomcat runtime debug in Eclipse failed

I get the same problem as Bluemix remote debugging session not starting when trying to debug my web app on Bluemix Tomcat server from Eclipse, following the steps below.

  1. Fresh installed eclipse-jee-neon-R-win32-x86_64 and all required Eclipse plugins (eg, the Eclipse tools for Bluemix for Neon,).
  2. Created a new Cloud Foundry App in Bluemix, selected Tomcat as runtime, then Add Git and build and deploy the sample web app which called 'TomcatHelloWorldApp'.
  3. Clone the 'TomcatHelloWorldApp' web app to my Eclipse from Jazz Git repository.
  4. Created new IBM Bluemix server in Eclipse, add and push the 'TomcatHelloWorldApp' web app.
  5. Right check the web app under the IBM Bluemix server and select 'Enable Application Debug'.

But, I get the error below. It doesn't work even with the default web app created by Bluemix:

[2016-07-17 14:15:54.854] bluemixMgmgClient - ???? [pool-1-thread-1] .... ERROR --- ClientProxyImpl: Cannot create the websocket connections for asmilk
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:272)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:374)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
    ... 6 more
[2016-07-17 14:16:11.938] bluemixMgmgClient - ???? [pool-1-thread-1] .... ERROR --- ClientProxyImpl: Cannot create the websocket connections for asmilk
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:272)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:374)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
    ... 6 more

Then I try to modify the code and make it work fine with Java 1.8 Modify the Maven pom.xml file as

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin> 

Add below settings in the manifest.yml file.

  env:
    JBP_CONFIG_IBMJDK: '[version: 1.8.+]'
    JBP_CONFIG_LIBERTY: 'app_archive: {features: [websocket-1.1, servlet-3.1]}

Also modify the Build Shell Command as below

#!/bin/bash
export JAVA_HOME=/opt/IBM/java8
mvn -B package

It builds and deploys successfully, and works fine with Java 1.8 now.

But when I try to 'Enable Application Debug', I got the same problem again... Can you please give any help on this?

如果您将IBM JVM用作工作台JVM,那么Bluemix 故障排除文档将提供更多详细信息来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM