I recently installed JBoss AS 7 in CentOS 6.7 server. The jboss as works fine. For testing, I deployed a .war file and tested it, It works great!. But now I tried to access the same application from my desktop PC but it says ERR_ADDRESS_UNREACHABLE. I tried these below mentioned solutions but they didn't worked out for me, my bad.
JBoss AS 7 not accepting remote connections
Can't access JBoss AS 7 from remote machine
The server has a static IP with working DNS. I don't understand why I couln't access my application deplyoed remotely. Kindly feel free to ask me to provide further needed details.
Thanks in advance!!!
Have you tried changing your standalone.xml to contain 0.0.0.0 in place of 127.0.0.1? search for all occurrences of 127.0.0.1 (localhost) and replace it with 0.0.0.0
For example -
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:0.0.0.0}"/>
</interface>
</interfaces>
This change, alongwith checking the "Listen on all interfaces to allow remote web connections" checkbox on your jboss server's Server Behavior section should work.
The IPTABLES firewall was blocking the ports. So I allowed the firewall to listen on port 9990 and 8080 and finally solved it.
Related
I have tried to use the hostname in no-IP, and I used port 443 for my server, I also add hostname into hosts file on MAC OS, so I only can access hostname via localhost, but when I access from the internet, it didn't redirect to my hostname, can some help me?
By default, the "public" interface is configured to listen on the loopback address of 127.0.0.1. (ie localhost).
If you want to bind to all available IP addresses, you should start Wildfly with a specific binding address, using -b:
./bin/standalone.sh -b=0.0.0.0
Update a interface inet-address with 0.0.0.0 like below and restart a server.
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
</interfaces>
I have MongoDb installed on two Ubuntu 16 VMs both hosted on the same network on Google Cloud's Compute Engine. The connecting instance has Internal IP 10.132.0.2, the database instance has 10.132.0.3.
(https://gyazo.com/59f9086591a1d6673e8194a50fff51e1)
I've opened tcp 27017 for the instance I wish to connect to. I added this using the gcloud console commands.
(https://gyazo.com/0d158aa735c6967e278fac63d598721f)
I have also tried opening tcp:1-65535;udp:1-65535 for testing purposes, with no result.
Running mongo on either instance will properly connect to it's own mongodb service, so they're installed, running and working.
On the database instance, netstat -a | grep :27017 displays that it's listening correctly.
(https://gyazo.com/0f4fb3c49a51f6886ff4ccb2d44a132a)
On the database instance, the config file at /etc/mongod.conf of the is edited so bind_ip also has the Internal IP of said instance.
(https://gyazo.com/20fb669506e7e67ef49fdcf9af6df144)
I have also tried 0.0.0.0 for testing purposes, with no result.
Running mongo 10.132.0.3 from the connecting instance results in Failed to connect to 10.132.0.3:27017, reason: errno:111 Connection refused.
(https://gyazo.com/9e5aec732e3f09cbfa62a4d78df3620f)
Running nmap -p 27017 10.132.0.3 on the connecting instance shows port 27017 is closed.
(https://gyazo.com/7ccd905db5b9946d616176b9ab75479c)
I'm at an utter loss, please help me out? :<
Your mongodb servers are only listening on the localhost address (127.0.0.1), rather than on INADDR_ANY (shows up as *:27017 in netstat).
Like this question, it looks like you need to set bind_ip = 0.0.0.0 in your mongod.conf.
Thanks to E. Anderson's link I managed to solve this issue; suddenly turning this into a duplicate. However, neither this answer nor the answer in the link were "correct".
The solution to set bind_ip=0.0.0.0 in mongod.conf is rather dangerous, besides, it didn't work. However, killing the mongodb service, and then manually running mongod --bind_ip 10.132.0.3 actually allowed my two instances to connect.
Which.. means that javadude's reply in the other thread saying "But I still dont get it. Why this did not work when I modified mongo.conf file to accept bind_ip 0.0.0.0"` also goes for me. I don't get it, but, it definitely worked to manually give it an ip-address to listen on.
I have created an application in delphi and backend is postgres when i run the application i get the following error
general sql error.could not connect to the server;no
connection could be made because the target machine actively refused
it.[127.0.0.1:1:5433 alias resumep
I uninstalled it and installed it again but it didnt work.Even i changed the port number while installing .
I changed the password and installed again but its giving same error
what is the solution to this problem?
The database cluster of a standard PostgreSQL installation is listening on port 5432. (You can, of course, set up additional db clusters on different ports or configure your database cluster to listen on any other port.)
Any particular reason you try 5433? This is probably the cause of your problem.
If no server is listening on port 5433, the connection is simply not possible.
(This question has been downvoted, which I find strange. How have I offended?)
Am I right to think that running a swank server usually opens port 4005 to the world, not bound to localhost-only connections?
So anyone hacking in a café is not only allowing passers-by to execute arbitrary code on their computer, but is giving them a nice interface to do it with.
It appears that when I run a swank server with either 'mvn clojure:swank', or 'lein swank', or (swank.swank/start-server "/tmp/yo")
then I get something like (thanks Mike!):
$lsof -i -P
java 11693 john 13r IPv6 6701891 0t0 TCP *:34983 (LISTEN)
and indeed I can connect from an emacs running on another machine on the same network.
(swank.swank/start-server "/tmp/yo")
If I start the server by hand, it produces the following output
Connection opened on local port 34983
#<ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=34983]>
Whereas:
(swank.swank/start-server "/tmp/yo" :host "localhost")
produces:
Connection opened on local port 40368
#<ServerSocket ServerSocket[addr=localhost/127.0.0.1,port=0,localport=40368]>
Which seems more like I was expecting.
Is there any good reason for doing this?
Any ideas on how it the more conventional ways of starting it could be persuaded to only accept connections from local processes?
Totally valid question.
After opening a slime server, you'll notice:
eames:~:% lsof -i -P | grep 4005
java 41477 mjd 33u IPv6 0x0b8956d0 0t0 TCP [::127.0.0.1]:4005 (LISTEN)
The connection is listening on the local address at port 4005. This interface isn't exposed to the network, so other devices on the network can't connect to your slime server.
edit:
This was my result of starting swank using leiningen, which provides "localhost" as an argument to swank.swank/start-server. You may want to double check that the leiningen plugin is opening non-local ports.
You're right that swank opens the connection on every address if a host isn't explicitly provided. The relevant code is swank.util.net.sockets/make-server-socket, and this behavior is documented. I agree, it seems like the wrong default.
it only accepts one connection so even if it is exposed to the world it stops listening once you connect.
If you're using the clojure-maven-plugin, version 1.3.4 was recently released which now start the swank server against localhost to prevent this problem.
This behaviour can be configured in your pom.xml file with:
<configuration>
<swankHost>someotherhostname</swankHost>
</configuration>
or from the command line with:
mvn clojure:swank -Dclojure.swank.host=someotherhostname
I have an Ubuntu server running Tomcat, and I want to connect my Eclipse EE to it so I can work with JSP.
I have no problem connecting to a similar Tomcat service when it's installed on my machine (not a server), but whenever I try to connect to the remote server I don't seem to have the option of choosing a Tomcat service.
Is there some guide you can recommend (I didn't find one), or is there something I did wrong?
The "remote" Tomcat (or more generally the app server) must be configured to permit such connection.
Did you start the remote server with these parameters:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Alternatively you can add the word jpda at the end of the startup.sh (or .bat) script just when calling the catalina.sh script.
Everything is documented on the Apache Tomcat Wiki.
After enabling those options, you have also another task to do: enabling the network connection to the configured port (8000 in the above options). It depends which firewall is installed on the server but usually it is iptables.
Example of iptables command to enable connection to port 8000:
sudo iptables -A INPUT -p tcp --dport 8000 -j ACCEPT
If your server have a GUI installed, one easiest way is to use the "ufw" – short for 'uncomplicated firewall' as explained in this site which is just a graphical way to configure the iptables.
One way to test the connectivity to the server (if the port is open) is to use telnet from your computer like this:
telnet your.distant.host 8000
and if the command opens, the port is accessible, if the telnet command times out, the port is closed.