JBoss is getting SHUTDOWN automatically in linux - java

I have deployed my application in jboss-4.0.2RC1. It is working fine. But after some time unexpectedly jboss is getting shutdown.
Please find the below logs
2015-09-21 21:09:28,995 INFO [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages
2015-09-21 21:09:28,995 DEBUG [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Notified to shutdown
2015-09-21 21:09:28,996 DEBUG [org.jboss.deployment.MainDeployer] Undeploying
I am not able to find the root cause?
Please suggest

What operating system is hosting your jboss? There are a number of reasons this could happen depending on your configuration. For instance, if you are running on Windows and running JBoss as a service, it will shutdown upon server logoff, unless you have added to your run.conf.bat something like:
set JAVA_OPTS=%JAVA_OPTS% -Xrs

Related

Spring Boot with debug args not close debug port after application stopped

I'm running my Spring Boot application with debug mode enabled. Like:
mvn -P dev spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
I can debug the application after that without any problem. But, after stopped (ctrl + c) and try to start again, I receive this error:
[INFO] Attaching agents: []
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
So, every time that I need to start the application in debug mode after that, I need to kill the process using the port 5005.
I would like to know why the port 5005 is still opened after stop the application.
I'm using Cygwin64 on Windows 10, Maven 3.5.2, Java 8 and Spring Boot 1.5.9.RELEASE.
Thanks!
This is not a problem of Spring Boot, but a problem of non-cygwin applications running in cygwin. And your application is not only leaving port 5005 open, it just keeps running in the background, having port 8080 also opened, but as on a restart the debug port is first opened, this is what you see in the error message.
This was discussed in a SpringBoot issue back in 2014 https://github.com/spring-projects/spring-boot/issues/773. I cite from this issue (the link in the citation dates from 2006):
Anyone still following this bug, this isn't a Spring Boot bug at all. It's a known problem with non-Cygwin programs (Java in this case) running on pty-based terminals.
See this link for a full explanation why this can't be fixed: http://cygwin.com/ml/cygwin/2006-12/msg00151.html
So you can basically use one of the following approaches:
use the native windows terminal and setup your java and maven environment for that
run your maven command from within an IDE which can handle this - you might use this for debugging as well
add the Spring Actuator to your app and use the /shutdown endpoint to stop your application

Deploy order in Mobicents JAIN SLEE

I`m trying to launch Mobicents USSD Gateway. Right now the problem is following:
Jboss is trying to deploy module before he deploys its dependencies hence returning the error:
SLEE DUs not deployed, due to missing dependencies:
file:/mobicents-jainslee-2.7.0.FINAL-jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/mobicents-ussd-gateway/services-DU-1.0.0-SNAPSHOT.jar/
Missing Dependencies:
EventTypeID[name=ss7.map.DIALOG_REQUEST,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_DELIMITER,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.REJECT_COMPONENT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_PROVIDERABORT,vendor=org.mobicents,version=1.0]
ResourceAdaptorTypeID[name=MAPResourceAdaptorType,vendor=org.mobicents,version=2.0]
EventTypeID[name=ss7.map.service.suplementary.PROCESS_UNSTRUCTURED_SS_REQUEST,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_TIMEOUT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_REJECT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_CLOSE,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.service.suplementary.UNSTRUCTURED_SS_RESPONSE,vendor=org.mobicents,version=1.0]
LibraryID[name=library-map,vendor=library-map,version=2.0]
EventTypeID[name=ss7.map.DIALOG_NOTICE,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.ERROR_COMPONENT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_USERABORT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.INVOKE_TIMEOUT,vendor=org.mobicents,version=1.0]
EventTypeID[name=ss7.map.DIALOG_ACCEPT,vendor=org.mobicents,version=1.0]
MAPRA
I`ve tried to set up dependencies to deployment unit services-DU-1.0.0-SNAPSHOT.jar via jboss-deployement-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="mobicents-slee-ra-jdbc-DU-1.0.0.FINAL.jar" />
<module name="mobicents-slee-ra-map-du-2.8.0-SNAPSHOT.jar" />
</dependencies>
</deployment>
</jboss-deployment-structure>
But this time he continues to try to install services-DU first, then reports missing dependencies, then succussfully installs dependencies, then tries to install services-DU again and throws exception:
2014-12-05 07:19:24,826 ERROR [org.mobicents.slee.container.deployment.jboss.DeploymentManager] (main) Failure invoking 'InstallDeployableUnitAction[file:/mobicents-jainslee-2.7.0.FINAL-jboss-5.1.0.GA/jboss-5.1.0.GA/server/default/deploy/mobicents-ussd-gateway/services-DU-1.0.0-SNAPSHOT.jar/]
javax.slee.management.DeploymentException: Failure encountered during deploy process.
at org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl.install(DeploymentMBeanImpl.java:340)
at org.mobicents.slee.container.deployment.jboss.action.InstallDeployableUnitAction.invoke(InstallDeployableUnitAction.java:41)
at org.mobicents.slee.container.deployment.jboss.DeploymentManager.sciAction(DeploymentManager.java:316)
at org.mobicents.slee.container.deployment.jboss.DeploymentManager.installDeployableUnit(DeploymentManager.java:181)
at org.mobicents.slee.container.deployment.jboss.SLEESubDeployer.start(SLEESubDeployer.java:281)
I suppose it is a deploy order problem, but maybe I`m wrong and it is somethinf different. Can anyone help me with this?
This is not going to be a real answer... but someone may find it useful.
I'm having exactly the same problem with those jBoss deployment logs.
I don't know how to solve it, but at least in my case, jBoss continue logging messages and finally it starts the UssdGateway.
Here there are some logs after those errors:
11:21:26,288 INFO [UssdPropertiesManagement] (main) Loading USSD
Properties from
/home/ericsson/jboss-5.1.0.GA/server/default/data/UssdManagement_ussdproperties.xml
11:21:26,295 INFO [ShortCodeRoutingRuleManagement] (main) Loading
short code routig rule configuration from
/home/ericsson/jboss-5.1.0.GA/server/default/data/UssdManagement_scroutingrule.xml
11:21:26,295 WARN [ShortCodeRoutingRuleManagement] (main) Failed to
load the short code routig rule configuration file.
/home/ericsson/jboss-5.1.0.GA/server/default/data/UssdManagement_scroutingrule.xml
(No such file or directory) 11:21:26,302 INFO [UssdManagement] (main)
Started UssdManagement 11:21:26,332 INFO [ShellServer] (main)
Starting SS7 management shell environment 11:21:26,350 INFO
[ShellServer] (main) ShellExecutor listening at /127.0.0.1:3435
11:21:26,510 INFO [Http11Protocol] (main) Starting Coyote HTTP/1.1 on
http-127.0.0.1-8080 11:21:26,549 INFO [AjpProtocol] (main) Starting
Coyote AJP/1.3 on ajp-127.0.0.1-8009 11:21:26,566 INFO [ServerImpl]
(main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA
date=200905221634)] Started in 1m:7s:690ms
And the gateway is funtional, because I was able to test it with the SS7 simulator, and the TestServlet was instanciated. In fact, I was able to test it with a real HLR, so it kind of works.
Now we have to code some developments on top of it...
For that error, and what can imply... I still do not have an answer.
Anyway, if I finally guess how to fix it, I will update this text.
Just a final comment...
To build this mobicents solution, it was a real pain.
The original instructions in DeployUSSDGWFromTrunk fail.
I wasn't able to make it run, and it took us (a mate and me) about a week to make it compile and run, reading many google groups posts, and changing random stuff through the pom's.
Finally we got it running, but I still have that feeling that it is not a very good development base.

Tomcat is not shutting down

I am unable to shutdown tomcat. When I do ./shutdown.sh, I don't see any error, but the process still seems to be running. When I kill the process (kill -9), the process gets killed. After this, if I do a startup, and shutdown again, I see the same problem. How do I gracefully shut it down? Why is this happening in the first place? Please help me.
devServer:bin dev$ ps -ef|grep tomcat
501 34933 1 0 11:24PM test 0:02.02 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Djava.util.logging.config.file=/Users/dev/admin/runtime/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/dev/admin/runtime/endorsed -classpath /Users/dev/admin/runtime/bin/bootstrap.jar:/Users/dev/admin/runtime/bin/tomcat-juli.jar -Dcatalina.base=/Users/dev/admin/runtime -Dcatalina.home=/Users/dev/admin/runtime -Djava.io.tmpdir=/Users/dev/admin/runtime/temp org.apache.catalina.startup.Bootstrap start
501 34982 33786 0 11:45PM test 0:00.00 grep tomcat
devServer:bin dev$ ./shutdown.sh
Using CATALINA_BASE: /Users/dev/admin/runtime
Using CATALINA_HOME: /Users/dev/admin/runtime
Using CATALINA_TMPDIR: /Users/dev/admin/runtime/temp
Using JRE_HOME: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Using CLASSPATH: /Users/dev/admin/runtime/bin/bootstrap.jar:/Users/dev/admin/runtime/bin/tomcat-juli.jar
devServer:bin dev$ ps -ef|grep tomcat
501 34933 1 0 11:24PM test 0:02.03 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Djava.util.logging.config.file=/Users/dev/admin/runtime/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/dev/admin/runtime/endorsed -classpath /Users/dev/admin/runtime/bin/bootstrap.jar:/Users/dev/admin/runtime/bin/tomcat-juli.jar -Dcatalina.base=/Users/dev/admin/runtime -Dcatalina.home=/Users/dev/admin/runtime -Djava.io.tmpdir=/Users/dev/admin/runtime/temp org.apache.catalina.startup.Bootstrap start
501 34992 33786 0 11:45PM test 0:00.00 grep tomcat
devServer:bin dev$
Also, I see my catalina.out is rather too short. There is no port number info getting written to it at all. This is all I see everytime I startup.
Feb 15, 2014 11:24:23 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Here is my log file -
devServer:logs dev$ cat catalina.2014-02-15.log
Feb 15, 2014 11:24:23 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Something seems to be terribly messed up. I can't understand what. Please advise.
I am running tomcat 7.0.50 on Mac OS.
Judging by the logs, it is evident that tomcat is not starting up at all as it should be. I can advise a couple of other tests as well like to
Verify whether or not the ports are getting bound by the tomcat service or not. You can do this by issueing the command netstat -tuplen on the terminal and check to see if port 8080 is getting bound by the tomcat instance or not.
Check to see if you can ping the instance. Try to ping the tomcat instance from a local machine. Then try to ping the public ip of the server to verify whether that server is responding correctly or not
Verify that you have, infact, the complete tomcat template as is used by your other servers. Verify the tomcat installtion folder and compare it with the other tomcat templates as used in rest of your servers. Make sure all folders are there, all configuration (default tomcat config) files are present.
(Just a hunch) Verify read/write/execute privileges as well
Remove your application, shutdown tomcat, empty the logs, and then restart tomcat and re-deploy your application and then view the logs to see if you get some error
Point 3 seems more likely that you have an incomplete tomcat instance, so I advise you to make a copy of the tomcat instance used in any other server and use it in this server to make sure that the server environment is infact how it should be

Remote debugging on Tomcat with Eclipse

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

Unable to deploy in Netbeans 6.7.1 and Glassfish v2.1.1

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

Categories