FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) - eclipse

Can you explain what this error is (and secondly why I am getting it)?
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
P.S. It may be related to Known Tomcat 6.0 and JDK 1.7.0_02 issues?, as I only started getting it after upgrading from JDK 1.7.0 to 1.7.0 update 2, with no other upgrades to other software.
I am running:
Eclipse Indigo 3.7
JDK 1.7.0_0u2 (JDK 7 update 2)
Tomcat 6.0
Windows 7
Apache HTTP Server (although not using it yet)
When I start Tomcat I started getting this error, but not all the time. Rebooting just now fixed it. Some mornings I come to work without a reboot and it fixes it even though it failed the day before. It's sporadic. To debug this I need to understand. Can you help explain it?
EDIT : I have two Tomcat servers, for two different projects, on the same port. The other (first) server is "stopped" but remains "synchronized", in case this matters. I've quickly tried changing all the ports up one (8080 to 8081) and the error reproduces. This may not be a proper test of changing ports, however.
EDIT 2: I just had this problem, and rebooting "fixed" the issue. The workstation was on all weekend and Tomcat worked on Friday and Eclipse was shutdown at the end of the day. I will keep taking notes like this as I run into it to remove guesswork.
EDIT 3: Today it gave me this error from an unrebooted system that worked yesterday, programs shut down yesterday and restarted today. I rebooted, and the error is gone. Most notably is that the error always occurs at 23% compilation. It hits 23%, waits a bit and this is when I know it won't succeed, and then popups a window. I'll capture what the window says next time. Then it gives the above error to the Console.
EDIT 4: I am running Windows 7 and Apache HTTP Server (although not using it yet). I'll add these to the list above.
EDIT 5: The popup window mentioned in edit #3 is (and note my Tomcat is named Server Tomcat v6.0 Server at localhost):
Problem Occurred
'Server Tomcat v6.0 Server at localhost' has encountered a problem.
Server Tomcat v6.0 Server at localhost failed to start.
OK << Details
Server Tomcat v6.0 Server at localhost failed to start.
EDIT 6: I just got a new problem, which is Cannot connect to VM com.sun.jdi.connect.TransportTimeoutException popup window error and the same main error that this question asks about in the Console window.
EDIT 7: Just restarting Eclipse, not rebooting the whole computer, solved the error this morning.

This error typically comes up when the necessary port is taken by another program.
You said that you have changed the HTTP connector port from 8080 to 8081 so the two Tomcats do not clash, but have you also changed the <Server port="..." in tomcat/conf/server.xml to be different between your Tomcats?
Are there any other connectors ports which may possibly clash?

Does your HOSTS file have an entry for localhost? Some other situations this error is seen in seem to have this as a problem resolution.
Make sure you have 127.0.0.1 localhost set in it...
(from this and this)

Encountered this. all I did was to kill all the java process(Task Manager) and run again. It worked!

Check whether your config string is okay:
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
I just had this issue today, and in my case it was because there was an invisible character in the jpda config parameter.
To be precise, I had dos line endings in my setenv.sh file on tomcat, causing a carriage-return character right after 'dt_socket'

EDIT these lines in host file and it should work.
Host file usually located in C:\Windows\System32\drivers\etc\hosts
::1 localhost.localdomain localhost
127.0.0.1 localhost

I had the same problem because I set the following in Catalina.sh of my tomcat:
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"
After removing it, my tomcat worked well.
Hope help you.

Encountered this issue and changing the debug port helped. For some reason, the debug port had to be greater than the app port.

Change control panel Java's option about proxy to "direct", change window's internet option to not use proxy and reboot. It worked for me.

This error mostly comes when we forcefully kill the weblogic server ("kill -9 process id"), so before restart kindly check all the ports status which weblogic using e.g. http port , DEBUG_PORT etc by using this command to see which whether this port is active or not.
netstat –an | grep
(Admin: 7001 or something, Managed server- 7002, 7003 etc)
eg: netstat –an | grep 7001
If it returns value then,
option 1: wait for some time, so that background process can release the port
option 2: execute stopweblogic.sh
Option 3: Bounce the server/host or restart the system.
My issue was resolved by option 2.

if your JVM Cli is: -agentlib:jdwp=transport=dt_socket,address=60000,server=n,suspend=n and JDK version is 7, change "server=n" to "server=y" will be OK.

In my project I had the same error, I restarted Tomcat and it worked, withtout killing the java process.

I set 127.0.0.1 localhost, and solve this problem.

I had the same problem in Catalina.sh of my tomcat for JPDA Options:
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
After removing JPDA option from my command to start the Tomcat server, I was able to start the server on local environment.

I was getting the same error when i switched to STS version 3.8.3
And imported my entire workspace to the new STS.
Apparently the "Boot Spring App" instance was defective. (i run from STS)
If this is your problem,
Simply create the Boot run configuration again.

In case you are working with environments or docker images you can really change /etc/host I recommend just changing the binding from star to 0.0.0.0.
So (basing on my case for instance) instead of:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
You would define it as:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005"

Related

Rundeck; Need to change the IP

I am relativity new to running run deck and i have been stuck on the same issue for the last two days. I am trying to do the simple task of changing the IP address from a local host address to another ip. I have already altered framework.server.name, .hostname, .port, .serverurl. I also changed the rund-deck-configs.properties grails.serverURL to my ip address. i have tried different ips. While i have changed all o9f those (after rebooting ubuntu) i get an error when starting rundeck that something is using port 4440, but i have already moved everything to port 22950.
EDIT: The issue had nothing to do with rundeck but my lack of understanding with the server ip section. To fix the issue all i did was assign the address of my computer to the amended files and it worked. Hope this helps anyone else with the same issues
Comment: ubuntu 20.10, turned off firewall, and am on rundeck 3.3.2-20200817
For WAR based installation follow these steps.
Check the system requirements, in your case, focus on your JDK version (3.3.X branch works with JDK 8 and JDK 11), then download Rundeck WAR file and save it in some directory.
Launch Rundeck for the first time to generate all files, for that do: java -jar rundeck-3.3.2-20200817.war, after that stop it with ctrl+c.
Change the grails.serverURL parameter on rundeck-config.properties file (at /your/rundeck/path/server/config path) with your custom port, for example, grails.serverURL=http://your-ip:5555. Also, set server.address to 0.0.0.0 to listen conections from outside: server.address=0.0.0.0.
Change the framework.server.port and framework.server.url on your framework.properties file accodingly to your custom port (at /your/rundeck/path/etc path), on my example framework.server.port = 5555 and framework.server.url = http://your-ip:5555
Now launch Rundeck with: java -jar -Dserver.http.port=5555 rundeck-3.3.2-20200817.war
Now, you can see Rundeck running on a custom port (5555 in my example).

EDB Postgres server from local host Apache, Server is up and running The default Apache context is www in the Apache installation

I have been trying to get rid of postgresEDB apache HTTP server within my localhost and I am failing to do it. I have tried various options, including:
netstat -ano|findstr :8080
and
taskkill /pid number /F
but failed, as everytime I re-start system and type localhost, this pops up.
I've uninstalled EnterpriseDB and PostgreSQL, but still no luck.
I have the same issue, and stopping PEM HTTPD works form me.
go to "run" then "services.msc"
find a service called "PEM HTTPD", description Apache/2.4.39 (Win32)
right-click and select stop or disable the service.
Note: The process that runs on port 8080 was httpd. I used resmon.exe to find out about the process.
How can you find out which process is listening on a port on Windows?
I know this is old, but I neeeded help with the same issue and the answer didn't work for me. What worked was:
go to "run" then "services.msc"
find a service called "pgbouncer", the description says it is a "lightweight connection pooler for postgres"
right-click and select stop
if you needed the localhost:8080 all the time perhaps you could change the startup type to disabled too. but for a one time use, stopping it works.
I am running windows on bootcamp on a macbook, hope this helps.
I know this thread is old, but I thought I'd throw the answer out there in case this is the first page anyone hits (as was the case with me).
On Windows you can kill this task through the Services applet.
Go to "Run"
Type "services.msc"
In the Services app, look for the following lines:
EnterpriseDB ApacheHTTPD
EnterPriseDB ApachePHP
Double click on each service.
Change "Startup type:" to "Disabled"
Click "Stop"
Click "Apply"
Repeat for the other service
This will ensure that you won't have to contend with the service popping up every time you restart your PC.
This information is available on the EDBPostgres site as well https://www.enterprisedb.com/docs/en/6.0.2/peminstguide/installation_guide.1.30.html
Hope this helps someone!

Exception when I try to run a liferay portlet on my tomcat server

This is what I get:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8099; nested exception is: java.net.BindException: Address already in use: JVM_Bind.
I have to mention that I use liferay 7.0 ga3 and tomcat 8.0.32, my ide is eclipse luna.
I tried to run in command line start rmiregistry some_port, but it didn't do nothing, just popped up a window and did effectively nothing.
Thank you!
Tomcat uses port 8099 for JMX communication (which is crucial for debugging). There is already another process using this port. Here are some possibilities:
In general, it is more practical just to finish the other process. A LOT OF TIMES, the other process is Spotify. Are you using Spotify? If so, just finish it, start Liferay and then reopen Spotify. Annoying but straightforward.
You started another Tomcat bundle. In this case, you only have to shut it down.
A previous Liferay execution just crashed and let a rogue Java process listening on the port. In this case, go to the terminal and execute jps:
$ jps
28058 org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
1787 Bootstrap
14207 Jps
Kill the process that is labeled Bootstrap:
$ kill -9 1787
Technically, you could change the port on Tomcat. Open the server configuration, click on "Open Launch Configuration." Then, go to the "Arguments" tab and look for 8099. Basically, follow the GIF below:
However, I do not know all the consequences of it. I used to do it with Tomcat servers without LDS, not sure what problems it could bring with LDS.
Please check whether the shutdown port mentioned in the server.xml file under liferay-dxp-(version)-ga1\tomcat-(version)\conf folder.
Use the below command to find the ports running in your windows machine:
netstat /nao | findstr "80"
then change the shutdown port to any available ports, say 8010:
<Server port="8010" shutdown="SHUTDOWN">
restart the server.
Please try this step if the shutdown port is already in use.

Apache tomcat start up failure

I have been working with netbeans...til yesterday night it worked but now i couldnt run even a simple code its showing the following comments in the output screen
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting of Tomcat failed, the server port 8084 is already in use.
D:\Dhivya\Job\calculator\payodaproject\nbproject\build-impl.xml:683: Deployment error:
Starting of Tomcat failed, the server port 8084 is already in use.
See the server log for details.
BUILD FAILED (total time: 3 seconds)
how to recover from this
First this isn't a constructive question as there is obvious lack of research. You didn't mention whether you tried to find out if any process was using port 8084. You may use netstat command to figure that out.
This usually happens when there is a Tomcat process already running and for whatever reason Netbeans is not able to see it, and tries to start another. You have to kill the Tomcat process manually, then Netbeans will be able to start it again.
It's a netbeans bug for port 8084 and there are few ways to resolve it. One is to remove tcnative-1.dll from the apache-tomcat/bin folder in your installation. For more you can visit netbeans-bugzilla.

GlassFish 3.1 won't start from Eclipse

I'm using Linux, and I've installed GlassFish 3.1 outside of Eclipse. It starts fine with asadmin start-domain.
In Eclipse Helios I've installed the latest version of the GlassFish tools, server adapter etc. I've added a "Server" instance for my external GlassFish, but when I try to start it, the Eclipse Console says "Waiting for domain1 to start ......" – more and more dots are printed while I wait for several minutes. Eventually there's a dialog saying "Server GlassFish 3.1 at localhost failed to start."
At no point is http://localhost:8080 responding.
There is no other errors messages that I can find. The server log (glassfish/domains/domain1/server.log) prints the long startup command, and then:
Feb 28, 2011 10:48:45 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 3 msec.
The GlassFish installation is entirely stock, with no applications loaded. It works fine when started from the command line outside of Eclipse.
I've tried to reinstall GlassFish to different locations, I've reinstalled Eclipse with no plugins except the GlassFish stuff.
The strange thing is that the "Internal GlassFish 3.1" server, which is distributed with the Eclipse plugin and lives inside eclipse/plugins, works just fine and starts up very snappily. But I'd really like to have an external GlassFish that I can easily run independently of Eclipse when I want to.
Help much appreciated!
You can have detailed logs about what is going on :
go to "Window -> Preferences -> Glassfish Preferences".
There you can check the "Start Glassfish Enterprise Server in Verbose Mode".
I had problems starting Glassfish 3.1 from inside eclipse too.
I tried to delete the "osgi-cache/" subdirectory located in the domain directory and then i could successfully launch glassfish.
Hope it helps.
CLI130 Glassfish Error and Port 4848 in Use Error
Glassfish is written in Java and if the system's TCP/IP configuration isn't setup a certain way, Glassfish will choke when it makes a getLocaHost() call. A quick fix is:
Get the system's hostname and related IP
hostname
ifconfig -a
Add a line to /etc/hosts after the localhost line:
hostname ip-address-of-hostname
A Little More Background.....
If the local hostname (value returned from the "hostname" command) does not resolve to an IP address (e.g. "nslookup my-hostname") Glassfish will fail. The following Java app will expose this:
import java.net.*;
class Testnet {
public static void main() throws Exception {
InetAddress host = InetAddress.getLocalHost();
System.out.println ("host=" + host.getHostName());
System.out.println ("addr=" + host.getHostAddress());
}
}
The root cause could be any one of a number of issues:
The Local hostname (value returned from "hostname" command) does not resolve to an IP or valid IP
Misconfigured /etc/nsswitch.conf or /etc/hosts
There have been suggestions on the web that IPV6 only addressing messes up Java in Linux. To make sure this won't befall you, it can be set on most flavors of Linux with the following command (however the above Testnet app ran for us with bindv6only set to both 1 and 0):
sysctl -w net.ipv6.bindv6only=0
In terms of HA, having an entry for the local IP and hostname in /etc/hosts is a solid thing to do and to make sure "files" is the first entry in the list for "hosts" in /etc/nsswitch.conf. The downside to this is that each host needs to be setup with this line and it could cause problems with nodes that get their IP from DHCP or are randomly assigned when configured.
I've met the same problem as I was learning java web programming, but in netbeans - windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that.
Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service.
go to (tools -> servers) add a new glassfish server instance which runs on a different, free port - that solved the problem.
The suggestion to delete "osgi-cache" worked for me on ONE machine (at work).
However on my home machine, neither that suggestion nor the suggestion to add my machine's hostname to the "hosts" file helped. Glassfish would start but Eclipse wouldn't recognize that...
The only thing that worked for me was:
go to the glassfish3/bin directory
execute "asadmin create-domain newdomain"
in this step, I was prompted for an admin username and password; I chose "admin" and "admin123" respectively
create a Glassfish server in Eclipse pointing to the new domain
Now I know that this may mean that the default domain (domain1) has some strange configuration, but that just doesn't seem right. Anyway, this did work for me, and now I can start Glassfish from within Eclipse - any Glassfish domain that I want.
HTH.
I'm using ubuntu 13.04 and had the same issue. I tried almost everything, but when i disabled IPv6 it worked. For ubuntu it's easy, just add following 3 lines to kernel parameters:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and run sudo sysctl -p. Good luck ;)
p.s. Don't forget to disable proxy server, set Active provider to Direct at General->Network connections.
Hum. Good news is that the internal server is working.
For the external one, first thing to test is if the server can be started outside Eclipse.
Check also the domain directory known by Eclipse (hint: server properties tab), and if the location is the one you want to use.
Maybe the domain has been started with a different Glassfish Server? In this case, make sure the osgi-cache/ directory in this domain is deleted first.
If the server works outside Eclipse, triple check the registration data of this server (runtime +domain) in Eclipse itself. In fact, try a new eclipse workspace...
Is this server secured with https?
I had the samere problem with Indigo + Glassfish 3.1 plug-in accessing an already working local standalone glassfish instance (with username 'admin' and my own password set).
Fortunately doing the following did the trick for me:
stop glassfish
delete osgi-cache content ( ${GLASSFISH_3.1HOME}/glassfish/domains/domain1/osgi-cache )
set my username ('admin' in my case) and reset passowrd (no password at all)
starting glassfish from within Indigo now works!