Hello I have a problem debugging my GWT application from a remote computer once I run the GWT dev mode. Everything works fine when i go to
127.0.0.1:8888/TestApp.html?gwt.codesrv=127.0.0.1:9997
however when I go to
192.168.1.142:8888/TestApp.html?gwt.codesrv=192.168.1.142:9997
on the other computer in the network I get a popup saying "GWT module 'TestApp' may need to be (re)compiled.
I'm using GWT/Maven/Glassfish EJB for this project and I can't seem to wrap my mind around why it works locally and not remotely.
Here is my GWT Run configuration for eclipse:
-port 8888 -war /Users/abc123/Documents/workspace/path/to/snapshotfolder -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl TestApp.html -logLevel INFO -bindAddress 0.0.0.0 -codeServerPort 9997 com.abc.def.gwt.TestApp
Any help is greatly appreciated.
Did you tried to Run your app like this:
192.168.1.142:8888/TestApp.html
don't use 8888 port use your tomcat port or and other server your using means use that server's port.
Related
I've some problems during configuration of remote Tomcat Server in Intellij
I've got a java web app that need to run in a cluster configuration, so I've got 3 Linux VMS in which I've installed tomcat server.
The problem is that I need to use this 3 tomcat servers together in debug mode in order to test and check issues.
I've tried some things but I was not able to get a solution.
OPTION A: configuring Remote JVM Debug:
I've tried to configure a Remote JVM Debug on my intellij configuring Catalina to listen to another port (2001) and launch it with the command: sh catalina.sh jpda start -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:2001 but it stucks on this message "Connected to the target VM, address: 'IP:2001', transport: 'socket'"
OPTION B: remote Tomcat server:
I've tried configuring a remote Tomcat server (that is the thing I prefer) configuring remote host with SFTP, but in this case Tomcat service start, it works for some minutes and after that it goes in TimeoutException
[](https://i.stack.imgur.com/XmDKx.png)
I hope anyone can help me, I read a lot of thing on the internet but no-one works.
Please correct me if I did anything wrong:
I created a web service (WSDL) in Java and it has a method TestCall().
I also created a website http://testwebsite:8000/abc/index.html, and this website is calling the web service in step 1.
I created a remote debugging for it in IntelliJ. I put testwebsite as the host and 8000 as the port number.
Once I went to http://testwebsite:8000/abc/index.html and click on TestCall(), it didn't go to the breakpoint in IntelliJ. When I was trying to remote debug the web service, I got error:
Unable to open debugger port (testwesite:8000), handshake failed, connection permanently closed.
Can someone tell me what steps I missed? thanks
When you need to remotely debug an application, go to the settings (Run->Edit configurations) in IntelliJ.
Now click the + sign and add a Remote configuration. It tells you the command line to add to the startup of the JVM you start on the remote machine. It will be something like:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 for jvm 5-8.
Now you can start your remote web service on the server with these extra command line options. Then you start this configuration in IntelliJ. It will tell you Connected to target VM, address: 'server name', transport: 'socket'. You can add breakpoints as you are used to with local debugging.
As you see: the remote debugging does not use the web-port, but a different port that is opened especially for debugging purposes. If there are firewalls between the server and your workstation, please choose a port that is open, or have the firewall port opened (if possible).
I'm trying to connect JVisualVM, running on my local machine, to a remote machine which is running a WildFly server (version 8.1.0, to be specific.)
I didn't configure the WildFly server myself, and I don't know who did, but I do know that I can log in as an administrative user from my local machine by pointing my browser at:
https://[ip address of the remote machine]:9443/console
Note that it's https, not ordinary http, and that the port for that has been set to 9443 (I think the default is 8080 or 9990 or something... IDK, I saw a lot of port numbers online. I have been explicitly told that http was disabled for this WildFly server).
I can SSH into the remote machine. I can navigate to the bin directory for WildFly and run jboss-client.sh. I have to connect on port 9999 (I think the default is 9990 for that?)
I copied the jboss-client.jar (under bin/client) to my local machine and ran JVisualVM from the command line like this:
.\jvisualvm.exe -cp:a C:\[path to]\jboss-client.jar
It launches fine. File > Add Remote Host: Then I entered the IP. OK. I right clicked on it under Remote in the tree and picked Add JMX Connection. I entered
service:jmx:http-remoting-jmx://[ip]:9999
I checked off that I wanted to use the security credentials and entered the username and password. Checked off to save the security credentials. Left "Do not require SSL Connection" unchecked. Hit OK. It immediately spat out the message
Cannot connect to admin#service:jmx:http-remoting-jmx://[ip]:9999 using service:jmx:http-remoting-jmx://[ip]:9999
I also tried the port 9443, 9990, and 8080 instead. None of those worked. I tried https instead of http in the protocol name. That also didn't work.
What am I missing? How is it that I can access the console, and connect with jboss-client.sh, but I can't use JVisualVM? Is there some log I can use somewhere to see what's wrong? Maybe someone can point out a configuration I've missed somewhere?
Not sure if it's important or not, but my local machine is running Windows 10 with JDK8 installed. The WildFly server is using Java 6 on CentOS 6.3.
You need to add the jboss-client.jar (or jboss-cli-client.jar) to the class path for JVisualVM. The library can be found in the bin/client directory of the WildFly install.
I used the following command to add the library to the class path.
jvisualvm --cp:a ~/servers/wildfly-10.0.0.Final/bin/client/jboss-client.jar
Then I used service:jmx:remote+http://[ip]:[port] and was able to connect.
I don't know if someone else is also (still) having the same issue (Wildfly10 on a remote machine where management console is available at 9443 with HTTPS). The following worked for me.
For ssh connections:
Starting jvisualvm with jboss-client.jar
jvisualvm --cp:a #JBOSS_HOME/bin/client/jboss-client.jar
Using the following connection string:
service:jmx:remote+https://remote-server:9443
NOTE: I used here remote+https
Provide username and password
Hope this helps.
you missed run jstatd command in remote host ,
this little program is RMI server that possible connection from client to remote host though you using jmx connection it used jmxrmi protocol for that connection .
so first in remote host create file name as security.policy with this contain :
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
off course you must in file section for linux put explicit path and then of creation this file put it in bin directory of jdk.home
then you should run this command on remote host
$JAVA_HOME/bin/jstatd -J-Djava.security.policy=path of /security.policy -J-Djava.rmi.server.hostname=remote ip address -J-Djava.net.preferIPv4Stack=true
then you could connect to server off course with correct settings.
Include jboss-cli-client.jar and jboss-client.jar under \lib\visualvm\platform\lib and restart jvisualvm to pickup new jars.
I am working on an web application deployed in tomcat, the problem I am facing is neither it is allowing me to add to tomcat server nor it is allowing me to run on debug mode.
To debug an application running on an external tomcat, set that tomcat to allow remote debugging, e.g. with JVM params like this:
-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
Then create a new remote "Remote Java Application" debug config, select connection type "Standard (Socket Attach)" and provide host and port (in the example above the port would be 8787).
To run and debug a Java web application in Eclipse, you need to have a dynamic web project. The error message in your screen shot implies you haven't one. Have a look at the excellent tutorials of Lars Vogel:
http://www.vogella.com/tutorials/EclipseWTP/article.html
I tried to start glassfish server via the Netbeans IDE but it showed this error:
Could not start GlassFish Server: Administrator port is occupied by null
C:\Users\Ateeq Khaliq\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1045: Deployment error: Could not start GlassFish Server: Administrator port is occupied by null
See the server log for details.
BUILD FAILED (total time: 2 seconds)
I have changed the port also to 9999 in C:\Users\Ateeq Khaliq\GlassFish_Server\glassfish\domains\domain1\config file.
How can I fix this?
Change this
the solution is change the host configuration
netstat -aon | find ":4848" | find "LISTENING"
Kill the process that is using your Administrator port
Its seem to be a Bug in Netbeans
if you have alraidy found a solution please let me know.
I had the exact same problem and the way I solved it was to delete the glassfish, tomcat7 and tomcat 8 servers from my IDE. I then deleted their folders on my hard disk and reinstalled the glassfish alone. Everything worked fine after that.
If Netbeans is blocked by Firewall this happens. Make sure your Antivirus firewall is not blocking NetBeans. Grant NetBeans full access to act as a server (This is also asked when you start NetBeans).
Then you should be able to start your server through NetBeans
remove glassfish server from Netbeans and added another one click Tools-servers
select your server and click remove servers and click add servers change the domain name and change port from 8080 to 8090 as you like. restart Netbeans
It has a really simple solution, just restart the Java process in your machine and you should be good to go..