redhat-developer / vscode-rsp-ui

A unified UI for all RSP servers and RSP server-providers to integrate with
Eclipse Public License 2.0
38 stars 21 forks source link

Tomcat server stop few minutes after server ip:port not respond #296

Closed niphor closed 5 months ago

niphor commented 6 months ago

I have already looked through the related issues,understand that vscode-rsp-ui checks server's host:port combo to see if its responsive. https://github.com/redhat-developer/rsp-server-community/issues/206#issue-1754416492 https://github.com/redhat-developer/vscode-rsp-ui/issues/282#issue-1754284048

But, Currently, my application uses the ROOT directory and requires about 10 minutes to bootstrap. This triggers the ip:port checking mechanism, which kills my server a few minutes later .

How can I prevent my server from being killed?

I cannot improve the application because it indeed needs this much time to start...

this is my server config:

{
  "args.override.boolean": "true",
  "args.program.override.string": "start",
  "args.shutdown.program.override.string": "stop",
  "args.shutdown.vm.override.string": "-Dfile.encoding=UTF-8 ...",
  "args.vm.override.string": "-Dfile.encoding=UTF-8 ...",
  "id": "Tomcat 8.5",
  "id-set": "true",
  "org.jboss.tools.rsp.server.typeId": "org.jboss.ide.eclipse.as.server.tomcat.85",
  "server.base.dir": "/workspaces/apache-tomcat-8.5.99",
  "server.classpath.additions": "",
  "server.deploy.dir": "${server.base.dir}/webapps/",
  "server.home.dir": "/workspaces/apache-tomcat-8.5.99",
  "server.http.host": "localhost",
  "server.http.port": "8080",
  "vm.install.path": "/usr/local/sdkman/candidates/java/8.0.402-tem/",
  "deployables": {
    "/workspaces/plcsp-web": {
      "label": "/workspaces/plcsp-web/target/plcsp-web",
      "path": "/workspaces/plcsp-web/target/plcsp-web",
      "options": {
        "option": {
          "deployment.output.name": "ROOT"
        }
      }
    }
  }
}

Currently, I have to modify server.http.port to 8081, and temporarily start a server using python3 -m http.server 8081 to trick the rsp check.

still use 8080 in server.xml

I'm working with devcontainer using mcr.microsoft.com/devcontainers/java:2-8 image

robstryker commented 5 months ago

Sorry for the delay.

I've added two properties here that always existed but weren't in the documentation: https://github.com/redhat-developer/vscode-rsp-ui/

See these two specifically:

image

Hopefully this helps you set a timeout greater than 10 minutes that will allow your server to start up in time.