IntelliJ remote debug works only once - intellij-idea

We've recently moved from Eclipse to IntelliJ. When configuring remote debugging, it manage to connect to the process once (via host and port) and debugging works. However, after disconnecting, we cannot connect to the process again. IntelliJ shows:
Unable to open debugger port (itstl060:33411) java.net.ConnectException "Connection Refused"
This works in Eclipse and we can connect multiple times without any issues. Any idea if there is a solution for this?

Check your previous debugging service has stopped. Sometimes it may be still running. I have come across these kind of issues.

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.

Weblogic 11g Changing network while server is running breaks Datasource connections

On my Laptop's installation of Weblogic 11g, Changing network (WIFI to Wired etc.) while the server is running seems to break Datasource connections.
I have to reboot (which takes forever) to get my apps running on Weblogic to work again.
I tried to go over the Data Source connection settings in the Console to disable "this" monitoring. But couldn't find a way to turn it off.
Wondering if there's a way to turn this freaky behavior off.
Try the following two steps in your connection pool settings:
Select "Remove Infected Connections Enabled"
Reduce "Test Frequency"

intellij configuration with websphere liberty

i have problem with websphere liberty app server.
i using intellij 12.1.4 and liberty 8.5.5.0
after creating my server in liberty and introducing liberty to intellij, in configuring at the bottom of form a warning with
"warning: Server jvm arguements must contain -Xshareclasses:none"
displayed.
1- what is this warn? is it a problem? if yes can i fix it and how?
however i can run and debug my app with no problem.
2- if debugging app break points not hit where it should? i dont no why? tomcat has not this problem???
3- if run app in debug mode and stopping it, after stop, a message with this message will be appeared:
Error running WebSphere 8.5.5.0:
Unable to open debugger port: java.net.SocketException "socket close"
Thanks for your response.

Intellij Idea 11 fails to connect to JBoss 7.1.1 remotely

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.

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.