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
Related
I installed netbeans with glassfish server for an ejb project.
If I enter localhost:9999/myproject/ in my browser its works.
When I also tried mylocalip:9999/myproject/ it worked.
But when I try to connect from another PC or phone on the same network I can't reach my project (pc and phone connect via wifi)
notes:
I connect to the network via wifi to router.
I turn off the firewall and add rule in the firewall with port 9999 but doesn't work.
I can't ping other devices on the wireless network.
i try to ping the address of another pc from my pc is work.
my system is windows 7
netbeans 8.0.1
glassfish 4.1
As I see you are trying to host a project on your LAN network, so all devices on your LAN can connect to it. Firstly check your settings for your server and make sure everything is alright. I suggest you take a look at Configuration > HTTP Service > HTTP Listeners and check what it is bound to. If the IP address is not your network interface address or 0.0.0.0 then change the IP address to your network interface address or 0.0.0.0. Note that after editing any settings you must restart the server. Also make sure that all are on the same LAN network (connected to the same router / Wi-Fi network). Then to connect to it hold the Windows key and press R. Run window should appear. In there type cmd and hit enter, then in the black window type ipconfig/all and look for a Local Area Connetion or Wireless LAN Adapter. At one of these there should be an IPV4 address that starts with 192.168. Use that to connect (in your case 192.168.x.xxx:9999/myproject/).
Hope I helped!
I just had the same issue..
First make sure you can ping your server
ping 192.168.xxx.xxx:9999
The make sure you have no blocking firewall (on ubuntu)
sudo ufw status
Check if your port is allowed (9999 ALLOW).
If you can't see it on the list, add it:
sudo ufw allow 9999
Happy glassfishing :)
I have a Glassfish 4 server running on a headless Debian VM. I can access the application just fine, but I cannot seem to access the admin port from anything other than localhost. I'd like to be able to access it so I can remotely deploy/debug from an IDE on another machine.
I've tried the asamin enable-secure-admin command, which completes but after restarting there is no change.
I've checked with netstat and Glassfish is only listening on port 4848 from localhost. Is there any other place remote admin is controlled from? Or something I'm missing?
You need the following to administer Glassfish remotely:
set a non-blank password for all admin logins
enable secure admin
ensure the network listener is listening on the correct IP addresses (it could be set to listen only on the loopback interface)
For me it works as follows:
*log into the glassfish admin console locally
*set admin-listener port to 14848 (I don`t know what is wrong with 4848, my JVM permanently uses it thus the admin console port changes automatically)
*set admin-listener IP to my-host-IP (different from the default 0.0.0.0 and from 127.0.0.1)
*add a new FireWall (I`ve ordered VPS on Windows) rule for outcoming TCP access to 14848 port
*run default glassfish domain
asadmin start-domain
*enable secure admin
asadmin --host my-host-IP --port 14848 enable-secure-admin
*restart the domain (and don`t forget to kill Java possibly loitering in memory)
I developed an application in my home machine. Now I want to show application that i made to client through WAN. I have TP-Link WiFi router at my home. Is it possible using port forwarding or other solution ?
Yes, you can use port forwarding to make your application accessible from the Internet. Essentially, what you want to do is redirect traffic coming into your public IP on port 80 to the internal machine running tomcat on port 8080.
There are public guides available for configuring port forwarding on different routers.
Edit: Port forwarding however might not be the only problem. There are other things to consider:
1. You should use a static external IP and map it to a DNS name, so users will be able to access the site by typing the name in the address bar.
2. You should make sure that the machine running tomcat allows external connections to port 8080, so these aren't blocked by the firewall.
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.
Sorry for this question which must have been asked many times, but I can't succeed in resolving my problem.
I've read a lot of blogs, sites, forums, .... and didn't find any solution in my case.
Case :
I need to connect VisualVM on my box to distant servers (tomcats, weblogics) for performance / threads / memory monitoring.
Those servers are installed on (physical or virtual) machines which are protected by a firewall.
Large intervals of ports are open in the firewall and can be used, but not all ports.
Tests
I've tried direct connections through JMX in VisualVM, using following JVM options on the server-side at server startup :
-Djava.rmi.server.hostname=[hostname]
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=[port]
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
I've precised the hostname because from my network the hostname and the IP address of the server are not the same than those from the network of the remote server.
No success, VisualVM always seems searching for an unknown server.
tried starting jstatd on the server-side on a port accessible (-p option) from my box (telnet on this port works), but when launching visualVM on this host with the jstatd port, it still seems waiting for something unreachable.... Same behavior with jps connecting to this remote host.
tried using the same tools on a server with less network protection, and it works. So I have seen the connections between my box and the server and they are done on ports different from what I've specified to jstatd.
I understand that this port is needed for first communication (kind of handshake) and real communications are done on other ports, but not predictible (ex: 60305, 55197, ...).
Not sure I understand very well how RMI works.
Please, help me, I'm going crazy !
Unfortunately JMX tries to open ports other than the one you configure. Just yesterday I succeeded connecting to tomcat behind firewall via JMX. The two tricky parts are:
put a file called jmxremote.access in CATALINA_HOME/conf, which contains the following lines:
monitorRole readonly
controlRole readwrite
in server.xml set the ports that will be used by jmx, via a special tomcat listener (catalina-jmx-remote.jar required in /lib):
<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
rmiRegistryPortPlatform="9009" rmiServerPortPlatform="9010" />
Then open these two ports on the firewall. It works. But that's just for tomcat.
Another option is to use ssh tunnelling. In short - you connect via SSH and configure it to forward some local port (where the jmx client is running) to some ports on the other side of the tunnel.
References:
Connecting to JMX on Tomcat 6 through a firewall
Connecting MySQL server on Amazon EC2 instance using ssh tunnel
Here are the steps to do this:
Launch an ejstatd in your remote host this way (in ejstatd folder): mvn exec:java -Djava.rmi.server.hostname=[remote_host_name] -Dexec.args="-pr 1099 -ph 1100 -pv 1101" (used for "jstatd" type connection)
Launch your Java application with those additional Java parameters: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1102 -Dcom.sun.management.jmxremote.rmi.port=1102 -Djava.rmi.server.hostname=[remote_host_name] (used for "JMX" type connection) (java.rmi.server.hostname is required here only because the IP and hostname from your network is not the same as the server point of view)
Open those 4 ports on your remote host and make them available to your local machine: 1099, 1100, 1101 and 1102
Launch JVisualVM
Right-click on "Remote" > "Add Remote Host..." and enter your remote host name in "Host name" (if you don't use the port 1099, you can change this in the "Advanced Settings")
Right-click on the remote host you've just created > "Add JMX Connection..." and enter "[remote_host_name]:1102" in "Connection" input, and check "Do not require SSL connection"
Your Java process will appear twice: one from the "jstatd" connection type, and one from the "JMX" connection type.
Disclaimer: I'm the author of the open source ejstatd tool.
On your [hostname], open up [port] and tcp port range 40000-60000 for your IP only.
This did the trick for me fairly well.