I setup geronimo on ec2 cent os environment.It started successfully.It is running on port 8080.I am able to telnet on the server.But when i telnet outside the server, unable to connect to the server.Do i need to change any configuration ?
when i ran netstat -an.I can see the following line.
tcp 0 0 :::8080 :::* LISTEN
Thanks and Regards.
The connection is block by iptables.due to this i am unable to telnet from outside the machine. This is happening only on ec2 centos machine.I checked on ubuntu and connections are not blocked.Once solution is to stop the iptables service.
service iptables stop
Thanks and Regards.
This application seems to be listening on the IPv6 address. First check whether the machine is reachable over ipv6 from the outside machine before making the telnet connection. Use global ipv6 address if your trying to access the machine outside the LAN network.
Related
A common problem for a common project: I'm trying to run a ServerSocket Java program on my local PC and connect to it from an Android client. As others have experienced, things go smoothly when the client connects to the local address (eg. 192.168.xxx.xxx). If I try to connect through the internet, nothing happens:
Now, here are the things I tried:
Created inbound/outbound rules in Windows Firewall to allow traffic for the Server Port (3000)
Used the public IP in the client socket (IP obtained here)
Set up port forwarding on my router: inbound connection on port 3000 are redirected to the local IP of the server (eg. 192.1686.xxx.xxx again)
Check that the IP address of the server is listening to the port 3000 using "netstat -anp tcp".
Disabled any firewall on my router, just in case.
Still, there is no connection. Using this tool (https://www.canyouseeme.org/) I triedd checking that the port was visible (with the server app running of course), but nothing, all I get is a time out.
I'm out of options, I was hoping someone could show me what I'm missing.
Thanks.
(1) Does your PC where your server runs on have a public IP?
If you haven't applied for one and are running your code in a home or working environment, your computer only has a private IP. And considering the fact, your server and client connect well in the same LAN, the problem may be the IP.
(2)If you do have a public Ip, does your server listen on all IP address or just the LAN? Check the server bind IP is '0.0.0.0', and in ServerSocket constructor you can just set it to be null.
I'm learning to deploy Hadoop Cluster on 2 machines, one master and one slave. However, after deployment the web app server(i.e. port 8088 on master) is not reachable. I use netstat -ant to check it says like below:
proto Recv-Q Send-Q LocalAddress ForeignAddress State
...
tcp 0 0 127.0.0.1:8088 *:* LISTEN
tcp 0 0 0.0.0.0:56666 *:* LISTEN
...
Other servers established by myself, like the one listening on port 56666, are reachable. I think it maybe the problem that Hadoop web app server is only listening on localhost instead of any IP addresses.
Is it the true reason? Can I fix it?
Set the parameter yarn.resourcemanager.bind-host to 0.0.0.0 in yarn-site.xml.
https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-common/yarn-default.xml
Follow below steps
Turn off iptables (Firewall)
Disable SELINUX
Then try
In a server machine A a website (drupal) always run, and now I need to use tomcat (version 5.5 is installed on that machine) to use a webservice.
In another machine (B) where tomcat7 is installed, the address http:// localhost :8080/ shows the tomcat page, but on machine A that address redirect to the drupal website. Does this mean that port 8080 is already used by the website? The command netstat -ntlp | grep LISTEN gives the following output:
...
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1719/apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1719/apache2
...
This means that port 8080 is open and it's already used, right?
Do I have to set tomcat on another port?
Yes. IT seems Apache is using port 8080.
Probably the tomcat on your A machine doesn't even start - check the logs, it should report failure to bind to port.
You can go to server.xml and change the port.
I installed locally and now running Weblogic Server in my machine. I can access the web application from my machine by using URL like 192.168.XXX.XXX:7001/myapp/, but I cannot access it from a different machine connected in same network. I have done this one: went to Administrative console, clicked on my server and inserted my IP in the textbox beside Listen Address.But it didn't help.
Please, help me on this matter.
The 'Listen Address' configuration item specifies which IP address your server listens on.
If it's set to 127.0.0.1 or localhost, then your server only listens on localhost address, which means it only serves requests come from localhost.
You should set it to the public IP address of your machine. Or simply set to 0.0.0.0, which means listen on all available address that your machine has.
Companies block some ports due to security reason. And 7001 is one of those common ports which they block.
So you can perform following steps.
Type following command in cmd:
telnet HOST.IP.ADDRESS PORT
Ex: telnet 192.658.152.45 7001
In case if it shows connecting and then stops, that means that port has been
blocked.
Try some other port , let say 8080.
If it works then change the default port in weblogic
Go to config.xml file in
\user_projects\domains\\config
Add listener port as
<server>
<name>AdminServer</name>
<listen-port>8080</listen-port>
<listen-port-enabled>true</listen-port-enabled>
<listen-address></listen-address>
</server>
I had the same problem and solved it like:
From the administration console change Listen address from localhost to admin server's IP
Stop Windows Firewall (I try only to define a new Rule to open port 7001 but without a result)
After that all works like a charm :)
Is your machine connected to the network?
Do you have any firewall installed? Is it blocking access from the outside?
Do you have any other software on your computer that is blocking access?
Does you network have hardware/software that blocks access to certain ports?
Other
This is a firewall issue. You can add port 7001 an exception to the firewall or before that to confirm whether the issue is because of firewall, try
systemctl stop firewalld
Check again if you are able to access the console from a different machine.
just allow specific port in firewall, Try this
sudo firewall-cmd --zone=public --permanent --add-port=7001/tcp
sudo firewall-cmd –-reload
I have an server process with internal registry (on an Amazon EC2 instance). The server starts correctly and the registry binds itself to port 1099. If I use netstat I can see that it is bound:
tcp6 0 0 :::1099 :::* LISTEN 0 3258 765/java
Additionally I've added Port 1099 TCP to the security group of the instance. If I sstart nmap on the host, it lists the port as open:
Host is up (0.061s latency).
Not shown: 997 filtered ports
PORT STATE SERVICE
22/tcp open ssh
1098/tcp closed unknown
1099/tcp open unknown
However, it is no possible for the client to connect to the server. After a while I get an java.net.ConnectException: Connection timed out exception.
What am I missing? Are there other ports that need to be opened?
You need to make sure that your exported objects use the same port as the registry (or some other visible port). most likely you are connecting to the registry and then not able to connect to the port on which the object is exported. finally--i'm not super familiar with ipv6--but you should verify that you are binding to the external network interface and not a loopback interface.
Well, im pretty sure I had to open another port. Because when I opened all ports for incoming traffic, it worked.
Since this was only a test setup i lived with that and simply restricted incoming traffic to well known sources.