Intellij Idea 11 fails to connect to JBoss 7.1.1 remotely - intellij-idea

I am attempting to deploy a simple exploded war application from idea 11.1.3 to a remote (same machine) JBoss 7.1.1. The War builds fine and starts to deploy, but I keep getting the following message on the attempted deploy:
Error running JBoss 7.1.1.Final: Unable to connect to the
localhost:8080
I am using Intellij's default JBoss 7 Remote configuration, which I've used successfully in the past. I can hit localhost:8080 directly with any browser so I know its responding. Ideas?

I've encountered with the same problem and found solution. May be this problem appeared because I've just switched from Eclipse. So I think someone it can be helpful.
For correct debugging JBoss remotely we need to specify 3 ports:
1) http port ('Port' field of the 'Remote Connection Settings' section) is used to ping JBoss server (periodical checking if the
server is alive) and to produce urls addressing resources on the server - FIRST TAB
2) native management port ('Management port' field of the 'JBoss Server Settings' section) is used to connect to the JBoss management 
interface, to check for the server startup to be finished and to deploy artifacts - FIRST TAB
3) remote socket port - by default on JBoss it 8787 - LAST TAB
After this all will work fine.
I was little bit confusing because if I run JBoss under sudo – remote debug worked just fine.

Related

Payara server starts for a brief time but doesn't connect

I recently had to reinstall IntelliJ IDEA, and ever since then, I've been unable to run this one app that runs on Payara. I have Payara 5.2022.3 (full) installed and the project is using java 11.
This is the server log:
Artifact my_project-ear:ear exploded: Waiting for server connection to start artifact deployment…
Detected server admin port: 4848
Detected server http port: 8080
And then nothing happens.
And if I terminate the process I get a message:
Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:4848
Based on my observation it seems like a process starts running on port 4848 for a few seconds but then stops abruptly.
I checked the CrashDumps and here is the .dpm file in question.
https://drive.google.com/file/d/1AyLU2HOyXKxREjaDNyIU9eRYMnzaBspw/view?usp=sharing
I'd already tried:
Running it on a different port./ Checking if there was not a process blocking used ports.
"Renewing" the domain.xml in case it was corrupted somehow.
Using different JDK.
Reinstalling Windows
I'm positive there is no problem with the app's code (seen a friend run it on his computer today) and I also think no changes happened to the run/debug configuration or the payara and domain configuration ever since it was working before the IDEA reinstall.
(I'm also very new to payara, and software development in general, so I'm not quite as skilled in solving this kind of problem.)
Thank you for all your answers.
It looks like a bug in the Java version/vendor you are using which is causing the crash of the process. Updating to a more recent Java build or to a different JVM vendor should help.

Remote Debug Weblogic Clustered Servers

I have a java application which is currently deployed in weblogic clustered environment with 2 managed servers. Would like to enable remote debugging for me to investigate further the issue on session data replication. I followed the steps provided here. After restarting the 2 managed servers, it seems the configuration has no effect. I used the same debug config below in my 2 managed servers.
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n
I also tried adding the below line on each managed server startup script.
export debugFlag=true
export DEBUG_PORT=8457
I use telnet command and got this error: Could not open connection to the host, on port 8457: Connect failed.
Linux firewall is already disabled.
Has anyone already encountered this issue? In addition, how to use it for me to enable debug in my IDE (e.g. Eclipse/IntelliJ)
Thanks in advance for the help.
This is already resolved. As advised by #devwebcl, I put the additional script below in my startManagedWebLogic.sh
export JAVA_OPTIONS="${JAVA_OPTIONS} -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n"
I put the same argument (e.g. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n) in the Server Start argument section on each managed server in weblogic admin console.
It will make sure that either you start your managed server via weblogic admin console or via shell startup script of each managed server, the same argument will be picked up.

IntelliJ Websphere Server Local, Error running 'Local Deploy': Address localhost:9080 is already in use

I seem to be doing something wrong in my run configuration for IntelliJ. I cannot run the server on the port 9080 because another app has to use the port 9080 and it's not up to me what port that app uses. So please don't tell me to kill the app using the port 9080. This is not a duplicate of this
With the other app running I can start up the server via command line or using an external tool in IntelliJ however I cannot start it though a run configuration. My server requires the other app to be running locally to do local testing however I cannot debug the app due to this extremely annoying issue. IntelliJ is simply picking the port 9080 out of some configuration and checking that port all on its own and deciding to not try starting the server and then somehow at some point deciding to check the port which of course wont be available. Is there a setting that I'm missing or is there another way to handle this so that way I don't run into this issue?
In local deploy there is not an option to change the port number.
From #Andrey's comments the solution turned out to be the server.xml is all that IntelliJ checks and doesn't load the bootstrap.properties right off the get go. So if you are filling in the httpPort number via bootstrap.properties, server.env, or any dynamically loaded properties, IntelliJ will use the default 9080. The solution here was then to simply hardcode the httpPort in <httpEndpoint httpPort=9081 ... /> for local testing

Eclipse Kepler - Glassfish Plugin - unable to start GF 3.1

I'm using Eclipse Kepler WTP + the Glassfish Kepler plugins.
Problem is I'm not able to start my locally installed Glassfish any more with this configuration.
After run the launch configuration the progress bar is at 69% and does not continue. There is nothing in the logs etc. I also tried using a fresh workspace etc. but no success.
The Glassfish version I'm running is 3.1.2. With Eclipse Juno and the corresponding Glassfish plugins everything works just fine.
EDIT Seems to be an issue with the already existing domain inside GF. It is possible to use the plugin when creating a new domain.
Today I encountered the very same problem. For some reason, The Glassfish plugin couldn't start the domain - progess bar at 69%. A while after it stopped because of a time out. I don't know why it couldn't start.
Open the asadmin console : {GLASSFISH_DIRECTORY}/bin/asadmin
execute the start-domain command
Refresh the eclipse Glassfish plugin if needed. You can see that the server has been launched properly.
I know, it doesn't fix the problem. But do remember that the Glassfish plugin only provides a GUI. Command lines are still working if the plugin is not.
(Actually I don't want to create a domain again...)
The problem is eclipse cannot connect to your jmx glassfish port.
Look in your glassfish console por the jmx port where jmx admin service is listening, somethin like this:
2014-01-13T11:08:38.935+0100|Información: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://mywks:8686/jndi/rmi://mywks:8686/jmxrmi
Check this port is running:
telnet mywks 8686
If the port is ok, the problem is eclipse can't connect to port using machine name , in my case the problem was due to proxy configuration.
Open eclipse proxy configuration (windows -> preferences -> network connection), try changing active provicer to "manual" and configure your proxy. If proxy is not the problem, you can try to configure your local machine name as local host loop in your etc/host file.
(Note changing your proxy settings can cause your eclipse stops accessing eclipse market place).
If this not resolves the problem, try to sniff eclipse to glassfish connection using wireshark.
Hope this help.
You probably have forgotten to fill in the root directory as Glassfish. Do that in the setting enviroment for the server in Eclipse.

Connecting to an instance of Grails inside Intellij from outside localhost

Not sure if this is just a minor configuration issue or otherwise, but when I run my grails app from within IntelliJ (via either run or debug), I never seem to be able to hit it from outside my localhost. So I can't hit my server from any of the other machines on the network, or from my phones when I'm trying to do WAP development. Yet, when I do grails run-app from the terminal, things work fine. I imagine it has something to do with how IntelliJ is binding the server, but does anyone have ideas on how to get it working? Thanks again!
In the Intellij configuration that you use to start the server, set 'Server host' to the hostname of your machine. If it is set to 'localhost' you can't connect using the actual hostname of the machine.
You should launch Grails with debug parameters (grailsDebug) and create a Remote debug run configuration in IntelliJ IDEA's Run Configurations combobox. Enter your host name and port there and you can connect now.