I'm trying to run remote debugging with Eclipse to an instance of my app which is in Weblogic. As you can see, it connected succesfully:
But when I run the logic, it's not stopping in the breakpoints; the app works but ignoring the breakpoints I stablished.
Here's WL's log:
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
***************************************************
Starting WLS with line:
/opt/oracle/java/jdk1.8.0_261/bin/java -server -Xms256m -Xmx512m -Dweblogic.N ame=AdminServer -Djava.security.policy=/opt/oracle/wl/middleware/wlserver/server /lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Djava.system.clas s.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/opt/orac le/wl/middleware/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/opt/or acle/wl/middleware/wlserver/server -Dweblogic.home=/opt/oracle/wl/middleware/wls erver/server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=7099,se rver=y,suspend=n weblogic.Server
Listening for transport dt_socket at address: 7099
Any ideas?
PS: I have a suspicion, I have two instances of my app in the deployments but just one active and eclipse doesn't show any option where I can point to a specific deployment beyond the ip and port, so that makes me think, how eclipse would know which deployment of the same codebase to debug? Maybe the problem is revolving there... but is just a hunch.
integrador-transformador and integrador-transformador2 are the same app but different instances. Right now we're just testing with one, as you can see only one is active ("activo" in spanish).
Related
I am trying to debug my client side code which i have checked-out from SVN to eclipse workspace. My server process is already up and running. I have a start-up script for our client which has the following line to start the client.
jre/bin/java splash:images/initializing.png -classpath "$CLASS_PATH" in.co.xxx.xxx.yyy.yyy.launcher.Launcher $* &
I added the debugging related arguments to it
jre/bin/java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=9045,suspend=n -splash:images/initializing.png -classpath "$CLASS_PATH" in.co.xxx.xxx.yyy.yyy.launcher.Launcher $* &
In Eclipse i went to debug configurations entered the hostname and port number(same i mentioned in the startup script (9045)). I added all the client related classes in source tab of debug configurations. Now comes the problem.
When i click debug button after all this, the remote debugger should be launching and waiting for the connection when i fire my start-up script. But it is saying
Failed to connect to remote VM. Connection refused.
Connection refused
I have tried with different port numbers as well. Nothing seems to work. Please suggest what am i missing here .
Did you check Eclipse logs to see if anything further got logged there? Also, when you say debug did not launch 'post authentication page', did you see on the 'server side' if there is a message to 'standard output' stating that the debug port is 'released'? (something similar to this would be emitted on standard output). If this did not show up, then the 'first successful connection' might not have actually released the debugger while you think it did.
Also this works for me here, the only difference I see is that the order of parameters in your and my debug switch are different. Hope this helps!
-Xdebug -Xrunjdwp:transport=dt_socket,address=8080,server=y,suspend=n
I have a Tomcat 8 instance. I'm trying to connect to it from JColsole. In order to do so I have added to the setenv.bat the following line:
CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.password.file=D:\Utils\Apache\Tomcat\conf\remote.users -Dcom.sun.management.jmxremote.access.file=D:\Utils\Apache\Tomcat\conf\remote.acl -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7777 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost
and in those two files -- remote.users and remote.acl i have defined user test with password test and the role readwrite.
However I cannot connect via JConsole (I tried using url localhost:7777 and service:jmx:rmi://localhost:7777).
Further investigation showed, that I cannot even telnet to 7777.
What am I doing wrong?
As it happens, when Tomcat is running as a service on Windows, I don't need setenv.bat, I need to use tomcat8w.exe -- GUI toll for adding options
I have an issue setting up an rmi port on Apache Tomcat server
(set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401)
Here are the steps i have done and getting the error respectively.
Issue with MoSKito tool while configuring RMI port on Tomcat
I am also tried to configure MoSkito inspect on my java web application. as part of it, i have been trying to make RMI port using "set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401" on catalina.bat. there is no error as such but 9401 is not getting connected.
Steps followed:
1) My OS is Windows 7
2) I have installed Apache Tomcat v7
3) I have downloaded Moskito inspect .war file from http://www.moskito.org/download.html and
4) Installed Moskito inspect on my tomcat server, the MoSKito inspect web UI is loading good.
5) I have created a sample java web application and deployed on same tomcat server. and web application also working good.
6) Now i have taken step to configure RMI port 9041 using below command on \bin\catalina.bat file(since i am on Windows OS).
I have put the below command on top of the file in \bin\catalina.bat
set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401
7) and started tomcat server, and then opened Moskito application on browser and gone to Quick Connect option on and given localhost and rmi port 9401 to call remote invocation.
Its failed.... its always giving error as MoSKito encountered an error:
Cannot connect to localhost#localhost:9401, due: Can not resolve manually set reference. Server at localhost, port: 9401 is down or not properly configured
[net.anotheria.moskito.webui.util.APILookupUtility.findRemote(APILookupUtility.java:168), net.anotheria.moskito.webui.util.APILookupUtility.findRemote(APILookupUtility.java:142), net.anotheria.moskito.webui.util.APILookupUtility.getAdditionalFunctionalityAPI(APILookupUtility.java:113),
Q1: How to set -DlocalRmiRegistryPort=9401 on tomcat on Windows OS.
Q2: Once we set port, how to ensure port is set properly and its up and ready state for connection.
Q3: Once port is set properly, then how to set / configure specified java web application needs to be configured for MoSKito, since we could have more than one java web application on same tomcat server.
Please guide me, thank you :)
in order to be able to connect to a MoSKito monitored application you have to enable an agent that binds itself to port 9401 and answers your replies. To do so, you have to add a dependency to your pom (if you are using maven):
<!-- Enabling MoSKito Inspect Embedded -->
<dependency>
<groupId>net.anotheria</groupId>
<artifactId>moskito-inspect-remote</artifactId>
<version>${moskito.version}</version>
</dependency>
Please keep in mind that the current MoSKito version is 2.5.4
If you are using a servlet 3.0 compatible container (tomcat 7, jboss wildfly) you are done. If you are using an older container you may need to add following to your web.xml:
<listener>
<listener-class>net.anotheria.moskito.webui.embedded.StartMoSKitoInspectBackendForRemoteListener</listener-class>
</listener>
If you are using no container at all, you can start it manually:
net.anotheria.moskito.webui.embedded.StartMoSKitoInspectBackendForRemote.startMoSKitoInspectBackend()
Now for you questions:
Q1: via catalina.bat. You were doing it correctly.
Q2: if the agent is configured everything will work correctly.
Q3: You may want to check out step by step guide here:
http://blog.anotheria.net/msk/the-complete-moskito-integration-guide-step-1/
Regards
Leon
I'm trying to initiate a remote debugging session on my PC with Eclipse & Tomcat.
I managed to run tomcat (not through eclipse) with the following params:
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=5050
cataline jpda start
The server starts ok, this is the outcome:
Using CATALINA_BASE: "C:\Java\Tomcat"
Using CATALINA_HOME: "C:\Java\Tomcat"
Using CATALINA_TMPDIR: "C:\Java\Tomcat\temp"
Using JRE_HOME: "C:\Java\jdk1.6.0_27"
Using CLASSPATH: ...
Listening for transport dt_socket at address: 5050
...
...
INFO: Server startup in 12502 ms
Now, I opened eclipse, and loaded the relevant project.
I set a new debugging configuration using Remote Java Application with localhost and the right port. however when I run it, I get this error message:
Failed to connect to remote VM. Connection refused.
Connection refused: connect
Can't really understand where is the problem. this is all local inside the PC, so there shouldn't be any firewalls involved, can someone think of something ?
Found the solution. apparently the connection was made, but Eclipse & Tomcat don'tt show any notification or status regarding it.
Then, when you initiate the connection again, you get the error because you're already connected.
I think that a small notice, either from Eclipse, or from Tomcat would be nice.
Try adding the following debug options directly to the JVM startup by directly modifying the catalina startup script
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5050
There could be problems when there are code mismatches between eclipse and tomcat. So when it matches the error will disappear
You can configure it in remote java application section in debug configuration.
For more details you can refer this link
I am trying to deploy a simple WebService in Netbeans 6.7.1 and Glassfish v2.1.1 and am getting the following error. I am using GlassfishESBv2.2 and windows 7 machine. I have tried googling and implemented things as shown in
http://forums.netbeans.org/topic10055-0-asc-0.html . Still unable to deploy. Though the message says that application server is not started, from the Server tab , I am able to see a message which indicates Glassfish has started.Also , doing a netstat after trying to deploy returns this, which means that Glassfish is running.
C:>netstat -an | findstr "4848"
TCP 0.0.0.0:4848 0.0.0.0:0 LISTENING
I have been trying real hard to get this resolved. Any help is highly appreciated.
Error Message :
The Sun Java System Application Server could not start.
More information about the cause is in the Server log file.
Possible reasons include:
- IDE timeout: refresh the server node to see if it's running now.
- Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.)
- Incorrect server configuration (domain.xml to be corrected manually)
- Corrupted Deployed Applications preventing the server to start.(This can be seen in the server.log file. In this case, domain.xml needs to be modified).
- Invalid installation location.
C:\Users\xyz\Documents\NetBeansProjects\HWebService\nbproject\build-impl.xml:564: Deployment error:
The Sun Java System Application Server could not start.
More information about the cause is in the Server log file.
Possible reasons include:
- IDE timeout: refresh the server node to see if it's running now.
- Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.)
- Incorrect server configuration (domain.xml to be corrected manually)
- Corrupted Deployed Applications preventing the server to start.(This can be seen in the server.log file. In this case, domain.xml needs to be modified).
- Invalid installation location.
See the server log for details.
BUILD FAILED (total time: 29 seconds)
I've described the solution please visit here...
http://forums.netbeans.org/post-65058.html