redhat-developer / vscode-server-connector

📦 Connects Visual Studio Code to your server adapters and run, deploy apps !!
Eclipse Public License 2.0
57 stars 26 forks source link

Wildfly doesn't start on a desired server port, doesn't use desired management port #412

Closed webalexx closed 4 years ago

webalexx commented 4 years ago

Hallo,

I have the following settings: in extention's server settings: "jboss.server.host": "localhost", "jboss.server.port": "8081",

in standalone-full.xml (in my case is so ): socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9991} socket-binding name="http" port="${jboss.http.port:8081}"

But server always starts on the following ports: 11:23:16,554 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8082 11:23:36,197 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9992/management

This means i can't start server on a right port and have no standart ability it to stop at all.

I try also change an source code, for instance in startServer method to: port=8081 cpProcess = cp.spawn(java, ['-Drsp.server.port=${port}', '-Dorg.jboss.tools.rsp.id=${rspid}', '-Djboss.http.port=8081', '-Djboss.management.http.port=9991', '-Dlogback.configurationFile=./conf/logback.xml', '-jar', felix], { cwd: location });

and install extension from local build from VSIX. In this case server is always in "Starting" state. When i try to add new server (but exact one was already added und is invisible) via command "Server: Add local Server", then i have the message: "Unable to detect any server: Extension backend error - there are no rsp providers to choose from." I'm able to add server only with installation of this extension from repository.

PS: yours faq https://github.com/redhat-developer/vscode-server-connector#2-can-i-run-my-wildfly-server-on-a-different-port-than-the-default-one XD i have read. No result!

Please, help!

lstocchi commented 4 years ago

Hi @webalexx, which server + version are you trying to start?

lstocchi commented 4 years ago

@webalexx I didn't notice that you are editing standalone-full.xml. Try to edit http port inside standalone.xml

webalexx commented 4 years ago

Hi Luca,

Hi @webalexx, which server + version are you trying to start?

Widfly 10, VS Code 1.41.1-insider, Extension 0.21.1

webalexx commented 4 years ago

@webalexx I didn't notice that you are editing standalone-full.xml. Try to edit http port inside standalone.xml

I can try, but I've pointed standalone-full.xml as a config file in settings (i use in this case exact this file): "wildfly.server.config.file": "standalone-full.xml"

and also please pay your attention on thise settings from my server's config:

"program.args.override.string": "-mp \"path/servers/ERPServer/wildfly-10.1.0.Final/version/modules\" org.jboss.as.standalone -b localhost --server-config=standalone-full.xml -Djboss.server.base.dir=path/servers/ERPServer/wildfly-10.1.0.Final/version/standalone", "server.autopublish.enabled": "true", "server.autopublish.inactivity.limit": "5000", "server.home.dir": "path/servers/ERPServer/wildfly-10.1.0.Final/version", "vm.args.override.string": "\"-Dprogram.name=rsp:Wildfly 10 version\" -server -Xms1024m -Xmx2048m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true \"-Dorg.jboss.boot.log.file=path/servers/ERPServer/wildfly-10.1.0.Final/version/standalone/log/boot.log\" \"-Dlogging.configuration=file:path/servers/ERPServer/wildfly-10.1.0.Final/version/standalone/configuration/logging.properties\" \"-Djboss.home.dir=path/servers/ERPServer/wildfly-10.1.0.Final/version\" -Dorg.jboss.logmanager.nocolor=true -Djboss.management.http.port=\"9991\" -Djboss.bind.address.management=localhost -Djboss.http.port=\"8081\"", "wildfly.publish.restart.pattern": "\.class$|\.jar$", "wildfly.server.config.file": "standalone-full.xml"

webalexx commented 4 years ago

@webalexx I didn't notice that you are editing standalone-full.xml. Try to edit http port inside standalone.xml

I have already tried - the same result. 12:33:11,509 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8082 12:33:34,636 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9992/management 12:33:34,637 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9992

What make i wrong...?

lstocchi commented 4 years ago

@webalexx I tried to replicate it based on the infos you pasted above without any success. I'm able to start the server in a different port even by copying what you did. This is how my server settings look like:

{
  "args.override.boolean": "true",
  "id": "Wildfly 10 version",
  "id-set": "true",
  "jboss.server.host": "localhost",
  "jboss.server.port": "8081",
  "org.jboss.tools.rsp.server.typeId": "org.jboss.ide.eclipse.as.wildfly.100",
  "program.args.override.string": "-mp \"/home/luca/Documents/wildfly-10.1.0.Final/version/modules\" org.jboss.as.standalone -b localhost --server-config=standalone-full.xml",
  "server.autopublish.enabled": "true",
  "server.autopublish.inactivity.limit": "5000",
  "server.home.dir": "/home/luca/Documents/wildfly-10.1.0.Final/version",
  "vm.args.override.string": "\"-Dprogram.name=rsp:Wildfly 10 version\" -server -Xms64m -Xmx512m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true \"-Dorg.jboss.boot.log.file=/home/luca/Documents/wildfly-10.1.0.Final/version/standalone/log/boot.log\" \"-Dlogging.configuration=file:/home/luca/Documents/wildfly-10.1.0.Final/version/standalone/configuration/logging.properties\" \"-Djboss.home.dir=/home/luca/Documents/wildfly-10.1.0.Final/version\" -Dorg.jboss.logmanager.nocolor=true -Djboss.management.http.port=\"9991\" -Djboss.bind.address.management=localhost -Djboss.http.port=\"8081\"",
  "wildfly.publish.restart.pattern": "\\.class$|\\.jar$",
  "wildfly.server.config.file": "standalone-full.xml"
}

Which OS are you using? Can you paste all your settings + the output log when you start the server or paste it on pastebin?

webalexx commented 4 years ago

@webalexx I tried to replicate it based on the infos you pasted above without any success. I'm able to start the server in a different port even by copying what you did. This is how my server settings look like:

{
  "args.override.boolean": "true",
  "id": "Wildfly 10 version",
  "id-set": "true",
  "jboss.server.host": "localhost",
  "jboss.server.port": "8081",
  "org.jboss.tools.rsp.server.typeId": "org.jboss.ide.eclipse.as.wildfly.100",
  "program.args.override.string": "-mp \"/home/luca/Documents/wildfly-10.1.0.Final/version/modules\" org.jboss.as.standalone -b localhost --server-config=standalone-full.xml",
  "server.autopublish.enabled": "true",
  "server.autopublish.inactivity.limit": "5000",
  "server.home.dir": "/home/luca/Documents/wildfly-10.1.0.Final/version",
  "vm.args.override.string": "\"-Dprogram.name=rsp:Wildfly 10 version\" -server -Xms64m -Xmx512m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true \"-Dorg.jboss.boot.log.file=/home/luca/Documents/wildfly-10.1.0.Final/version/standalone/log/boot.log\" \"-Dlogging.configuration=file:/home/luca/Documents/wildfly-10.1.0.Final/version/standalone/configuration/logging.properties\" \"-Djboss.home.dir=/home/luca/Documents/wildfly-10.1.0.Final/version\" -Dorg.jboss.logmanager.nocolor=true -Djboss.management.http.port=\"9991\" -Djboss.bind.address.management=localhost -Djboss.http.port=\"8081\"",
  "wildfly.publish.restart.pattern": "\\.class$|\\.jar$",
  "wildfly.server.config.file": "standalone-full.xml"
}

Which OS are you using? Can you paste all your settings + the output log when you start the server or paste it on pastebin?

Luca, i have the same problem on Ubuntu 18 and on MacOs Catalina

lstocchi commented 4 years ago

Luca, i have the same problem on Ubuntu 18 and on MacOs Catalina

Let's start from the beginning... if you follow these steps do you have a different result? Create a server -> Download Server? -> Yes -> Wildfly 10.1.0.Final -> start it -> it should open on localhost:8080 -> Stop it -> right-click -> Edit Server -> only add "jboss.server.port": "8081", -> save -> start the server again -> What happens?

webalexx commented 4 years ago

"jboss.server.port": "8081"

Luca, thanks a lot. With a new downloaded server goes correct on a port 8081. Now i have only headake how to start my exists server. Thanks!

Last questions. How to change server.management port best way?

lstocchi commented 4 years ago

Luca, thanks a lot. With a new downloaded server goes correct on a port 8081. Now i have only headake how to start my exists server. Thanks!

Last questions. How to change server.management port best way?

Awesome :) I have no clue why it doesn't work in your existing server. If you find out the reason let us know, it would be really helpful for us so we can fix it.

The best way to change the server management port is always to change it on the standalone file. We don't have any parameter in vscode server settings related to it, maybe we will add it in the next releases.

Let us know if you have any other problem or suggestion for the extension :)

webalexx commented 4 years ago

I have added to server conf: -Djboss.management.http.port=9991 -Djboss.socket.binding.port-offset=0

and all goes like a charm! Thanks!

odockal commented 4 years ago

Even though this is already closed, it might have been caused by already running server on the port. Maybe checking system processes if there is any other server running?

robstryker commented 4 years ago

@webalexx Thanks for sticking with us through that problem. I'm glad you got it worked out.

webalexx commented 4 years ago

Thank you very much. That's works file!