jboss-5.1.0.GA startup issue - java

I am trying to configure jboss-5.1.0.GA server for my application on linux platform. When I am starting the server I can see in the log that it starts successfully, but when I am trying to access the started port(8080 by default) it shows no response from server as if server not started. Can any one please help me to sort out this thing.

these are just reasonable guesses, but try the following:
start your server on a commandline with following option:
-b 0.0.0.0
try following options to check if your server is running:
http://127.0.0.1:8080/
http://localhost:8080/
http://(your ip):8080/
good luck

Related

Error during Intellij idea remote Tomcat Server debug

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.

How to start H2 database command line without PG server and Web Console?

I have the H2 database v1.4.199 on an AWS EC2 machine that I want to start in TCP mode via the command line, but it looks like by default the PG server and Web Console also start, which I don't want.
I'm using a very basic command to set the port. Here's the command and output:
$ java -cp h2*.jar org.h2.tools.Server -tcpPort 9092
TCP server running at tcp://10.1.64.202:9092 (only local connections)
PG server running at pg://10.1.64.202:5435 (only local connections)
Web Console server running at http://10.1.64.202:8082 (others can connect)
Failed to start a browser to open the URL http://10.1.64.202:8082: Browser detection failed, and java property 'h2.browser' and environment variable BROWSER are not set to a browser executable.
You can see the PG Server and Console Server are up, but I thought the PG Server and Web Console were something you had to explicitly enable? I also do not want outside connections to this H2 (my Java app is on the same EC2), so seeing that the console is configured so "others can connect" in the output is a bit concerning.
What's the right way to startup H2 to make this more restricted and safer?
edit: For more context a Java app on the localhost will connect with this code:
String url = "jdbc:h2:tcp://localhost:9092/" + filePath + ";MODE=MYSQL;AUTO_RECONNECT=TRUE;DB_CLOSE_ON_EXIT=FALSE";
return DataSourceBuilder.create()
.username("sa")
.url(url)
.driverClassName(org.h2.Driver.class.getName()).build();
The Java app connects just fine, but it shouldn't need the PG server and web console to make it work.
The server's help option may offer some guidance:
java -cp h2.jar org.h2.tools.Server -?
The output includes this:
Starts the H2 Console (web-) server, TCP, and PG server.
Usage: java org.h2.tools.Server <options>
When running without options, -tcp, -web, -browser and -pg are started.
…
The solution is to start the TCP server explicitly:
java -cp h2.jar org.h2.tools.Server -tcp -tcpPort 9092

Operation timeout - tomcat amazon server

So I am typing in terminal
ssh -i "MyCustomKeyPair.pem" ...#....eu-west-2.compute.amazonaws.com
I get the following message and can't connect to the tomcat's amazon server.
That's strange because the instance runs just fine.
How can I fix this?
Thanks,
Theo.

cannot use both TOMCAT server and my internet connection

I cannot have my tomcat server started and at the same time use internet.
either I can start Tomcat (in Eclipse) and internet is not available.
or I can access the internet but tomcat cannot be started.
Here the original probleme I had when I first wanted to use Tomcat and display my html page on localhost.
GRAVE: StandardServer.await: create[localhost:8005]: I find a way to start the Tomcat Server: in the terminal:
sudo lsof -i : 8005 # checks port 80
sudo route -n flush
sudo route add default 192.168.1.1
then I can use tomcat and localhost:8080 but my internet connexion is dead
if I want my internet connexion then I stop the tomcat server by clicking on the red square in eclipse and then in the terminal I do:
sudo route -n flush
sudo route add default 192.168.0.1
THen I can use internet but tomcat cannot be restarted. I have to undergo the first process.
this of course is a very boring process and I would like to know what 's wrong and how I could fix it.
I use tomcat 9 / Mac OS sierra / Eclipse Neon3
When you say "my internet connexion is dead", do you mean that your network connection drops or that your DNS lookups fail? (What do you think this command is doing and why are you performing it: sudo route add default 192.168.1.1?)
If your program is modifying your system's connectivity settings, I would strongly recommend against preventing it from doing that. There's no reason for it to do so at that level, a more appropriate place to set settings would be at some deploy stage.
Alternatively, you could run your app in a Docker container which I strongly suspect will solve your problem. Visit www.docker.com to learn more.

java remote debugging Tomcat app: Why does the JVM not listen?

I want to remote debug an application running in Tomcat 7. Tomcat is running as a service on a Win2008 server.
I added the following to the Java options in the Java Configuration Panel of Tomcat:
-Xdebug -Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n and opened the firewall on my workstation and the server for this port.
But when I try debugging from IntelliJ 9 on my workstation, I get an error message Unable to open debugger port : java.net.ConnectException "Connection timed out: connect". The jvm is the standatd Sun/Oracle 64 bit JVM version 1.6.0_27.
I verified that the command line parameters are in use by accessing ManagementFactory.getRuntimeMXBean().getInputArguments() within the application deployed to Tomcat and logging the result to the log file.
I verified via Wireshark on my workstation and on the server that the TCP request on port 4711 is sent from my pc and arriving on the server, but there is is no answer. Running netstat -a on the server does not show a process listening on this port. So I assume somehow Tomcat/JVM does not start the remote debugging.
You need to put -Xdebug and -Xrunjdwp... on separate lines in the Java panel of the Tomcat Service Configuration Panel.
So having:
-Xdebug -Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n
will not work, but:
-Xdebug
-Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n
will.

Categories

Resources