I have developed a servlet and deployed it on my server -windows server 2008-
the server have an ip and the port of the glassfish 3.1.2 server is 11188, when i call the servlet from the local host it works fine, but when i call the server via the ip address this error shown could not connect to NN.NN.NNN.NNN:11188 ;N: is a number.
How do i solve this issue?
Open the port 11188 in the firewall.
I was forget to define the port 11188 on the approved ports on the hoster control panel
Related
I want to check my rest api service remotely, for this purpose i add the following lines to application.properties
server.port = 8080
server.address = 37.221.202.142
This ip address i got from this site https://2ip.ru/
But when i run my app i have the error like port is already in use. I switched a lot of ports( 8081,8082,8083 etc) but every time i got this error. When i removed this line from application.properties server.address = 37.221.202.142 Application is deployed fine but i can't connect to server using this url http://37.221.202.142:8080/managers, but this work fine http://localhost:8080/managers
What am i doing wrong?
Open command prompt and type ipconfig(if you are a windows user) or ifconfig(if your linux user).
Get the ip address of your machine. I assume you are not deploying the application in public server(azure or aws).
If your using Tomcat or Pivotal Server for deploying the war file. Double click on the sever to get the Overview of the server details and just type your IP address.
Now, restart the server and hit the IP address YOURIPADDRESS:8080 port in the browser and it should work.
when i run a any web aplication on any server that have default port like
http://localhost:8080/demo/
But i want hide or remove 8080 port number from our aplication using java code like http://localhost/demo/ from whole application
You can't change it using Java code. HTTP uses port 80 by default. Your server deviates from that by running on port 8080. So this alternate port number must be mentioned in the url. In order to get rid of it you need to make the server accessible via port 80.
You can simply change the port to "80" instead the tomcat's default "8080" in the server.xml file in the tomcat conf folder. More info: https://tomcat.apache.org/tomcat-8.0-doc/config/server.html
Or you can use a Reverse Proxy running on port 80 forwarding requests to port 8080. If you use Apache: https://httpd.apache.org/docs/current/mod/mod_proxy.html
I am trying to remote a debug an application which is deployed through Websphere. I have all the port configured correctly on server side and on eclipse side. I can use
telnet host port
to connect to remote host and port correctly. But When I try to connect through remote debug through eclipse, I run into the error
Failed to connect to remote VM
com.sun.jdi.connect.spi.ClosedConnectionException
What can be the possible causes for this? I have checked and searched Stackoverflow for this error already. I have tried the most things from answer on this question Eclipse Error: "Failed to connect to remote VM"
I changed the port and it worked. It was a networking issue with that port of 7777.
I just have a jsp file, print
request.getRemoteIp();
request.getRemotePort();
And I can get the real client ip, but the port is always wrong.
The Server Environment is IBM Websphere and IBM HTTP Server (IHS60)
From the iptrace, I get the packet data..
From the Client to Server, the port is 13944 to 80 (http port is 80). So the client port is 13944.
Then via HTTP, in the jsp, I invoke an API on another server, the port is 48186 to 9082.
Actually,
request.getRemoteIp(); I really get the client ip.
but
request.getRemotePort(); I get the port number is 48185, it seems be IHS port.
How can I get my real client port, please?
Thanks very much.
I start up sftp server using Apache Mina Sshd Api. please refer follow link to see more details about my local SFTP server.Link.
I tried to connect to that server from remotely by giving host name as my ip address but i couldn't enable to connect with the sftp server. I got "connection refused" error message.But i can connect locally.To connect locally i use winscp sftp client giving my host name as "localhost" but in remotely i can not give host name as localhost.So i gave host name as my machine IP address.When i gave that i got above error message.
So i would like to know that how can i connect with my local sftp server from remote machine.
Thank you.
Hi finally found out How to access Apache Mina sshd sftp server from remote machine. The problem was on my Apache Mina sshd sftp server set up.You can refer attached link to see my Apache Mina sshd sftp server details.
In there previously i set host as sshd.setHost("localhost"); instead of that i changed it into sshd.setHost(0.0.0.0);.So now you can access your local sftp server providing your machine ip address as a host name from remote machine.