I am trying to remote debug spring MVC application hosted on Ubuntu server from my intellij IDE on MAC - macos

i started the tomcat by setting below two in setenv.sh file under TOMCAT_HOME/bin/
export JPDA_ADDRESS="5005"
export JPDA_TRANSPORT="dt_socket"
startd server using sudo ./catalina.sh jpda run the output log says
Listening for transport dt_socket at address: 5005
Created a new remote configuration from edit_configuration and added host name and port start debug and got below error.
5:35 PM Error running 'Remote_Debugging': Unable to open debugger port (xxxxxxxxxx.xxx:5005): java.net.ConnectException "Connection refused (Connection refused)"
thanks in advance.

Related

Handshake failed - connection prematurally closed

I want to setup mi intellij to run mi local environment in debug mod.
In other versions of intellij, i just had to "add new remote" and only when changing to the port to 8080, my debug environment startup correctly, but in this new version, i get the following errors:
"Connection refused: connect" --> When select a not available port (i guess)
"handshake failed - connection prematurally closed" --> the port is accesible but it can't conect.
I attach a screeshot of my debug remote configuration.
Thanks,
IƱigo

Error running 'Remote Debugger': Unable to open debugger port (localhost:5005): java.net.ConnectException "Connection refused (Connection refused)"

I am setting up remote debugger in IntelliJ on Mac. I followed the template without any modification. Then I click the "Debug xxx" button. It shows
"Error running 'Remote Debugger': Unable to open debugger port
(localhost:5005): java.net.ConnectException "Connection refused
(Connection refused)""
I checked the following:
There is no port listening on 5005.
The firewall is shut off entirely.
I tried to ping localhost 5005 and the connection is refused.
I am confused. There is no firewall and no port listening. Why the connection is still refused?
just change port 5005 to 5006 , in my case it worked
when you run mvn spring-boot:run you need to add debug target to maven command
make sure the address in the target matches the address in the remote config

Web Start is working but jenkins says "Ping response time is too long or timed out"

I can successfully start the connection from the slave with this command:
java -jar agent.jar -jnlpUrl https://myserver:8888/computer/myslave/slave-agent.jnlp -secret sdfsdfsdf -workDir "c:\jenkins"
It start, it runs, it logs 0 errors, I do netstat on the master and see the connection is established.
But it says its offline with the error "Ping response time is too long or timed out"
The error itself is troubling because the whole point of web start is so the master doesn't need direct access to the slave. Is it actually trying to icmp to the slave?
The slave can only access the master over port 8888.
I also see no logs anywhere for this, not on the slave or the master, how do I know what jenkins is even trying to do?
I was trying to allow this slave connection through a firewall.
I thought I could get away with one port for this.
My thinking was, opening up jenkins on port 8888 and listen to jnlp on port 8888 then connect with command java -jar agent.jar -jnlpUrl https://myserver:8888/computer/myslave/slave-agent.jnlp ....
But I needed open up port 433 so i could connect to the server over https first and connect like java -jar agent.jar -jnlpUrl https://myserver/computer/myslave/slave-agent.jnlp ..... Then also open port 8888 so the jenkins server could redirect to that jnlp port.
I was making a jnlp connection directly to that open port, the problem was I needed to connect to the jenkins server and let the server setup that jnlp connection

HC can not connect to DC for EAP7.1

I installed eap7.1 by unzip the zip file on RHEL73, but failed to start host control to connect with domain controller, here is detail:
domain controller runs on node1:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management=192.168.56.11
Log:
[Host Controller] 10:53:53,258 INFO [org.jboss.as.remoting] (MSC service thread 1-4) WFLYRMT0001: Listening on 192.168.56.81:9999
Start host controller on node2:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-slave.xml -Djboss.bind.address.management=192.168.56.127 -Djboss.domain.master.address=192.168.56.11
I added remotehost1 by using add-user.sh on node1.
I added the authentication info in host-slave.xml on node2:
<server-identities>
<secret value="cmVkaGF0MUA="/>
</server-identities>
...
<domain-controller>
<remote security-realm="ManagementRealm" username="remotehost1">
host-controller failed startup with the following error:
10:57:17,068 WARN [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: Could not connect to remote domain controller remote://192.168.56.81:9999: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://192.168.56.81:9999. The connection timed out
...
ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0002: Could not connect to master. Error was: java.lang.IllegalStateException: WFLYHC0120: Tried all domain controller discovery option(s) but unable to connect.
netstat -an|grep 9999 show it's listening on 192.168.56.11(node1 public interface)
I stopped iptables, firewalled and selinux, I used nc -v 192.168.56.11 9999 and verified the address is accessable from node2, what could be the reason for this?
Best regards
Lan
The issue has been fixed.
The test is based on 2 guest VMs runing on window10 as host, windows 10 was restarted and I didn't notice that the firewall on windows was opened after restart, the VM uses host-only adapter to communication with each other, after disable firewall on windows, the communication works.

Windows 8.1 MongoDB 27017 errno: 10061 "Connection couldnt be made Target machine actively refuses it"

Full list of error:
C:\Program Files\MongoDB\Server\3.0\bin>mongo.exe
MongoDB shell version: 3.0.6
connecting to: test
2015-10-25T11:26:55.350+0200 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2015-10-25T11:26:55.353+0200 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Service is running fine:
C:\Program Files\mongodb\Server\3.0\bin\mongod.exe --service --config D:\Documents\Work\mongodb\mongod.cfg
I saw already solutions here but nothing helped
netstat.exe -0 and netstat.exe -any dosen't show 27017 port as used by some App or process.
I have this mongod.cfg file
systemLog:
destination: file
path: D:\Documents\Work\mongodb\log\mongod.log
storage:
dbPath: D:\Documents\Work\mongodb\db
net:
bindIp: 127.0.0.1
port: 28018
But MongoDB still connects to same 27017 port
What i have missed?
The client does not know that you want to connect to a server on a non-default port.
Connect using the --port parameter:
mongo.exe --port 28018
Or just let the server listen on the default port.
Execute the following steps:
Go to control panel
Click program and features
Select mongodb
Right click
Repair it
Open your shell(cmd)
Type _ "C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe"
Enter
Done

Resources