I've configured my server to run with the following flags:
Server--> Server Types --> WebSphere application servers --> Additional Properties --> Debugging Service:
JVM Debug Arguments= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888
JVM Port= 8888
I configured eclipse debug configuration with the server ip (verified that ip is reachable with the ping command) and port
To be sure i increased the debugger timeout as well .
I've got: Failed to connect to remote VM. Connection refused.
Connection refused: connect
so i did a port scan on the server with (nmap xxx.xxx.xxx.xxx -p 8888) and the port seems:
PORT STATE SERVICE
8888/tcp closed sun-answerbook
moreover looking at the section Server--> Server Types --> WebSphere application servers --> Communications-->Ports of WebSphere admin consolle
i don't see the port 8888 in the list.
what do i need to do?
open the port on the machine? (how?)
add the port in the list of the above mentioned section?
other?
###### EDITED ########
ADDITIONAL CHECKS
netstat -na | grep 8888 --->no listening port/doesn't show me nothing
----------------------------------------------------------------------------
[root#dmgr ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
----------------------------------------------------------------------------
C:\Users\alex>nmap 192.168.115.235 -p 8888
Starting Nmap 7.60 ( https://nmap.org ) at 2018-02-23 10:58 ora solare Europa occidentale
Nmap scan report for xxxx.xxxxxxxxxxxx.com (192.168.115.235)
Host is up (0.0018s latency).
PORT STATE SERVICE
7777/tcp closed cbt
Nmap done: 1 IP address (1 host up) scanned in 4.59 seconds
so, no listening port on 8888, no iptables rules that deny the connection, how to investigate further?
You are almost there :-)
On the Debugging Service page where you set the port and arguments, there is a checkbox - Enable service at server startup - ensure that it is checked.
If not, check, and restart the server.
After that you should see the debugging port open. You can check it for example via netstat -an.
If the port is open and you still cannot connect then it is probably the firewall issue.
Here some more details about setting the debug - Starting the application server in debug mode
Related
I have a digitalocean droplet and I'm trying to install my Java web-application, on CentOS 7, which is using postgres database. I've successfully installed Java, tomcat and postgres database. I am able to connect to my droplet's postgres database from my local machine using pgadmin as well as from local eclipse. But when I am deploying the web application on server I'm getting the following error:
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
I've added listen_addresses = '*' to postgresql.conf
This is the code from pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 0.0.0.0/0 md5
Is there any firewall issue? Do I need to provide any special permission? The port which I am using to connect is 5432. I've not made any changes to the port.
I deleted the droplet and installed ubuntu 18 on it, I was successfully able to connect to the database properly. Again, I installed CentOS 7 and it gives the same problem.
Here's the output of iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31
For some reason my tomcat 8 server just did that the same thing this morning, when it was working previously. I looked at the selinux logs in /var/log/audit and found the following got me back working again:
sudo setsebool -P tomcat_can_network_connect_db true
Edited: added -P flag to stick between reboots.
I'm in the middle of installing and configuring an XMPP server, using ejabberd on Windows server 2012, running on an EC2 box.
I have opened port 5222 within windows firewall, and added to the security group for the EC2 instance
Custom TCP Rule
TCP
5222
0.0.0.0/0
ejabberd_c2s
Custom TCP Rule
TCP
5222
::/0
ejabberd_c2s
My XMPP logins are not working, and so I've turned to telnet to try and debug - it sees that port 5222 is reporting as closed:
PS C:\WINDOWS\system32> telnet hostname.com 5222
Connecting To hostname.com...Could not open connection to the host, on port 5222: Connect failed
Any guidance or steps towards debugging would be appreciated!
The issue here was in ejabberd's default configuration of "::" as an IP to listen, which forced it to listen only to IPv6.
By updating the ejabbed config to
port: 5222
ip: "0.0.0.0"
module: ejabberd_c2s
I was able to connect via telnet, and able to access the server using XMPP.
I am using PerfMon listener to get graphs for memory, cpu etc. For this I have obeyed the following steps:
At server:
The agent i have run on the server and cmd says
INFO 2016-03-30 15:12:04.206 [kg.apc.p] (): Binding UDP to 4444
INFO 2016-03-30 15:12:04.269 [kg.apc.p] (): Binding TCP to 4444
INFO 2016-03-30 15:12:04.269 [kg.apc.p] (): JP#GC Agent v2.2.0 started..
I have set java path till bin in the environment variable.
I also tried saving startAgent.bat with complete path of the java.exe file
At client/jmeter plan:
I have unpacked the JmeterPlugins standard jar and now I do see the listener jp#gc perfmon collection metric
In jmeter.properties I have also updated the server ip with port in remote host section
Under jp#gc - PerfMon Metrics Collector, I have added row with host ip its port 4444
Action:
Now if I run a small test and expected graph for CPU/memory etc, I just see
"ERROR: java.net.ConnectException: Connection timed out: connect"
I doubted firewall could be the issue so I set it off but that also did not help.
Any help will be much appreciated!
Your setup at client and server side is correct.
But you have not mentioned opening of port # 4444. So it is most probably the cause of issue.
In order to make it work, Your port#4444 should be visible to JMeter client machine.
To verify if it is visible or not. you can use..
http://www.canyouseeme.org/
http://portchecker.co/
If it is not visible from Client machine, then you will need to open it. Visit these links to learn how to open port.
http://www.wikihow.com/Open-Ports
or you may use following from command line
netsh advfirewall firewall add rule name="Open Port" dir=in action=allow protocol=TCP localport=4444
netsh advfirewall firewall add rule name="Open Port" dir=out action=allow protocol=TCP localport=4444
Try checking if you can connect to port 4444 on the machine where Server Agent is running using telnet command like:
telnet YOUR_HOST 4444
and sending test command like
You should receive Yep response. If it is not the case - server side performance monitoring won't work and you will need to establish connectivity between Metrics Collector and Server agent (usually it is enough to open TCP and/or UDP ports 4444 in firewall)
See How to Monitor Your Server Health & Performance During a JMeter Load Test article for more information
I have my Single node Hadoop installed on Google Compute Engine instance and i want to open port 50070 on that machine to access the hadoop dashboard. i configured in the firewall rule as tcp:50070 in compute engine networks. but still i am unable to access my port outside the network (ie . via internet). I tried nmap for the public ip of my GCE instance and i got a result which has only ssh port got opened all other ports are filtered .
Note: i am using debian 7.5 image
Make sure your daemon is listening on port 50070. If you have more than one networks in you project make sure the port is opened on the right network. You can run the following commands to check the information about your instance and network.
lsof -i
gcutil --project= getinstance
gcutil --project= listnetworks
gcutil --project= listfirewalls
gcutil --project= getfirewall
Check if IP/Port is allowed in iptables or not.
iptables -L
would show you all the records.
To allow port in iptables you can do the following:
sudo iptables -A INPUT -p tcp -m tcp --dport 50070 -j ACCEPT
sudo iptables-save -c
Short answer
In addition to configure the firewall rule at GCE web console make sure that your server is listening at 0.0.0.0 instead of 127.0.0.1
Long answer
In the context of servers, 0.0.0.0 means all IPv4 addresses on the local machine. If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs - Source
In contrast 127.0.0.1 is the IP address used to stablish a connection to the same machine used by the user this address is usually referred as the localhost.
It's often used when you want a network-capable application to only serve clients on the same host. A process that is listening on 127.0.0.1 for connections will only receive local connections on that socket. - Source
Hence, if you try to stablish a connection to your server from internet and your server is listening at 127.0.0.1 at your GCE machine, then, from the server point of view a request has never been received and as a consequence Goocle Cloud Firewall will refuse the connection because there is no server listening at the opened port (in your case 50070).
I hope this answer helps to solve your problem. Best regards.
I'm attempting to debug the startup of a service using the IFEO method (which I've successfully done on server versions prior to Windows 2012 on scenarios other than startup). The Debugger reg value is c:\debuggers-x64\cdb.exe -server tcp:port=1234. I then start the service and verify that cdb.exe is listening using netstat -na | findstr 1234 (I verified nothing was listening on this port prior to starting the service). Then I attempt to connect to the debugging server like this windbg.exe -remote tcp:server=localhost,port=1234 but it hangs for maybe 15-30 seconds and then fails. I try again and while it's hanging I run netstat -na | findstr 1234 again and it shows cdb.exe listening on port 1234 and it also shows a SYN_SENT to 127.0.0.1 on port 1234 (presumably sent by windbg.exe). It remains in the SYN_SENT state until windbg.exe reports a failure to connect.
So TCP connection establishment never completes. I checked the firewall and it's turned off. I also tried using the IP address of the network adapter (as opposed to localhost) but I get the same behavior. I also tried having cdb.exe listen on a port > 5000 but that also has the same behavior.
Does anyone know if there's new security introduced in Server 2012 for accessing TCP ports?
thanks