ActiveMQ shuts down on startup with "TERM Trapped" - java

I'm currently using the java service wrapper to start my ActiveMQ (5.10) service running on Ubuntu 14.04.1 LTS. Every now and then when my Jenkins instance runs the last step in my deploy script
cd /app/apache-activemq-5.10.0/bin/linux-x86-64; ./activemq restart
the wrapper will try to start up, then immediately shutdown with the following log entries.
STATUS | wrapper | 2014/10/09 08:15:09 | --> Wrapper Started as Daemon
STATUS | wrapper | 2014/10/09 08:15:09 | Launching a JVM...
STATUS | wrapper | 2014/10/09 08:15:09 | TERM trapped. Shutting down.
WARN | wrapper | 2014/10/09 08:15:09 | JVM exited unexpectedly while stopping the application.
STATUS | wrapper | 2014/10/09 08:15:09 | <-- Wrapper Stopped
I haven't got a clue why this is happening. Ideas anyone?

Related

How to get the actual start time of the service using ManagementFactory.getRuntimeMXBean().getStartTime()

I have to implement a logic based on the JVM StartTime. How may I get the actual start time of the JVM? Even the JVM restarts internally also can I able to use this ManagementFactory.getRuntimeMXBean().getStartTime() method?
Below is the sample of logs of the service which I run in my environment.
I have started the windows service # 01/01/2022 10:00:00 by which the code is created using Java. By the time the wrapper service prints the logs like below,
STATUS | wrapper | 2022/01/01 10:00:00 | Launching a JVM...
INFO | jvm 1 | 2022/01/01 10:00:00 | WrapperManager: Initializing...
INFO | jvm 1 | 2022/01/01 10:00:00 | Wrapper startup method..
After some period of time wrapper service prints, the logs like JVM is restarting and the new JVM to be launch,
STATUS | wrapper | 2022/01/01 10:58:01 | JVM requested a restart.
INFO | jvm 1 | 2022/01/01 10:58:02 | Going to shutdown the all threads...0
STATUS | wrapper | 2022/01/01 10:58:09 | Launching a JVM...
INFO | jvm 2 | 2022/01/01 10:58:09 | WrapperManager: Initializing...
INFO | jvm 2 | 2022/01/01 10:58:09 | Wrapper startup method..
What the doubt is even if the JVM is launching again internally without restarting the service manually will this ManagementFactory.getRuntimeMXBean().getStartTime() method returns the start time as 01/01/2022 10:00:00???
Someone help me in this context to find the actual start time of the service.

Apache james 3.4 message spooled but not delivered

Installed apache james 3.4 on my local machine. Tried sending a smtp email , enabled debug mode in logs , I can see that email was received and sent to spool but it does not really go to database or get stored anywhere. Could see below logs after an email was sent:
DEBUG 14:40:22,520 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension#139346fe
DEBUG 14:40:22,523 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger#7e0a3d14
DEBUG 14:40:22,523 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor#7727309d
DEBUG 14:40:22,526 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.smtpserver.AddDefaultAttributesMessageHook#2ecd38f
DEBUG 14:40:22,527 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger#7e0a3d14
DEBUG 14:40:22,527 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor#7727309d
DEBUG 14:40:22,528 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.smtpserver.SendMailHandler#e301d29
DEBUG 14:40:22,528 | org.apache.james.smtpserver.SendMailHandler | sending mail
INFO 14:40:22,567 | org.apache.james.smtpserver.SendMailHandler | Successfully spooled mail Mail1584042022511-573e00a5-df5c-4bd0-a9d2-0d4e45e12b0d from MaybeSender{mailAddress=Optional[kart2#kmart.com]} on 127.0.0.1/127.0.0.1 for [kart2#kmart.com]
DEBUG 14:40:22,568 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger#7e0a3d14
DEBUG 14:40:22,569 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor#7727309d
DEBUG 14:40:22,583 | org.apache.james.mailetcontainer.impl.JamesMailSpooler | ==== Begin processing mail Mail1584042022511-573e00a5-df5c-4bd0-a9d2-0d4e45e12b0d ====
DEBUG 14:40:22,584 | org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor | Call MailProcessor root
DEBUG 14:40:22,587 | org.apache.camel.component.direct.DirectProducer | Starting producer: Producer[direct://processor.root]
DEBUG 14:40:22,588 | org.apache.camel.impl.ProducerCache | Adding to producer cache with key: direct://processor.root for producer: Producer[direct://processor.root]
DEBUG 14:40:22,591 | org.apache.camel.impl.ProducerCache | >>>> direct://processor.root Exchange[]
DEBUG 14:40:22,610 | org.apache.camel.processor.MulticastProcessor | Done sequential processing 1 exchanges
DEBUG 14:40:22,616 | org.apache.camel.processor.MulticastProcessor | Done sequential processing 1 exchanges
DEBUG 14:40:22,617 | org.apache.camel.processor.MulticastProcessor | Done sequential processing 1 exchanges
DEBUG 14:40:22,618 | org.apache.camel.processor.MulticastProcessor | ExchangeId: ID-WW-CFT2PV2-1584041951079-0-9 is marked to stop routing: Exchange[ID-WW-CFT2PV2-1584041951079-0-9]
DEBUG 14:40:22,618 | org.apache.camel.processor.MulticastProcessor | Done sequential processing 1 exchanges
DEBUG 14:40:22,619 | org.apache.camel.processor.Pipeline | ExchangeId: ID-WW-CFT2PV2-1584041951079-0-1 is marked to stop routing: Exchange[ID-WW-CFT2PV2-1584041951079-0-1]
DEBUG 14:40:22,637 | org.apache.james.mailetcontainer.impl.JamesMailSpooler | ==== End processing mail Mail1584042022511-573e00a5-df5c-4bd0-a9d2-0d4e45e12b0d ====
Any help is appreciated. Let me know
I've also been having this issue and found that commenting out the following section in the default conf/mailetcontainer.xml configuration file did the trick.
<mailet matcher="All" class="WithPriority">
<value>8</value>
</mailet>
<mailet matcher="HasPriority=8" class="Null"/>
<mailet matcher="AtLeastPriority=8" class="Null"/>
<mailet matcher="AtMostPriority=8" class="Null"/>
It looks like this stops mail getting beyond the root processor.
I had initially followed this advice to get the server running Apache James Spring distribution not starting but this seems to be more relevant Re: Getting Apache James 3.4 to process mail.

Fitnesse: Slim server fails to start; using Eclipse

I'm trying to get a very basic Fitnesse test to run; using Fitnesse / Slim; Java in Eclipse.
Test runs, or at least starts, but doesn't finish; get this error:
Unable to start test system 'slim': fitnesse.slim.SlimError: Error SLiM server died before a connection could be established. JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
Fitnesse test is:
!define TEST_SYSTEM {slim}
!path: C:\Users\<my folder>\EclipseWorkspace\CalculatorProject
| import | packageCalculator |
| TestCalculator |
| operand | result? |
| 4 | 8 |
| 2 | 4 |
| 7 | 14 |
| 2 | 4 |
This is a similar issue: Fitnesse: SLiM server died before a connection could be established; suggests this might be a regression bug; but I tried earlier versions of fitnesse, which made no difference
And it's not this one either: https://github.com/unclebob/fitnesse/issues/726; there is no space in the classpath
Help!!!

Jar try to create service in windows on java wrapper

Hellow.
Today in first time I Try to create service in OS Windows used jar.
I try to used java wrapper community edition 3.5.29
Create test_service in windows is OK.
For next step I try to start new test_service.
Service try to Startup and down.
In Logs JAVA WRAPPER has this information.
STATUS | wrapper | 2016/07/19 11:53:21 | --> Wrapper Started as Service
STATUS | wrapper | 2016/07/19 11:53:21 | Java Service Wrapper Community Edition 32-bit 3.5.29
STATUS | wrapper | 2016/07/19 11:53:21 | Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2016/07/19 11:53:21 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2016/07/19 11:53:21 |
STATUS | wrapper | 2016/07/19 11:53:22 | Launching a JVM...
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Starting Oracle.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Try Update.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Update OK.
ERROR | wrapper | 2016/07/19 11:54:21 | Startup failed: Timed out waiting for a signal from the JVM.
ADVICE | wrapper | 2016/07/19 11:54:21 |
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 | Advice:
ADVICE | wrapper | 2016/07/19 11:54:21 | The Wrapper consists of a native component as well as a set of classes
ADVICE | wrapper | 2016/07/19 11:54:21 | which run within the JVM that it launches. The Java component of the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper must be initialized promptly after the JVM is launched or the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper will timeout, as just happened. Most likely the main class
ADVICE | wrapper | 2016/07/19 11:54:21 | specified in the Wrapper configuration file is not correctly initializing
ADVICE | wrapper | 2016/07/19 11:54:21 | the Wrapper classes:
ADVICE | wrapper | 2016/07/19 11:54:21 | COM.MainRunner
ADVICE | wrapper | 2016/07/19 11:54:21 | While it is possible to do so manually, the Wrapper ships with helper
ADVICE | wrapper | 2016/07/19 11:54:21 | classes to make this initialization processes automatic.
ADVICE | wrapper | 2016/07/19 11:54:21 | Please review the integration section of the Wrapper's documentation
ADVICE | wrapper | 2016/07/19 11:54:21 | for the various methods which can be employed to launch an application
ADVICE | wrapper | 2016/07/19 11:54:21 | within the Wrapper:
ADVICE | wrapper | 2016/07/19 11:54:21 | http://wrapper.tanukisoftware.com/doc/english/integrate.html
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 |
ERROR | wrapper | 2016/07/19 11:54:21 | JVM did not exit on request, termination requested.
STATUS | wrapper | 2016/07/19 11:54:21 | JVM exited after being requested to terminate.
STATUS | wrapper | 2016/07/19 11:54:26 | Launching a JVM...
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Starting Oracle.
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Try Update.
INFO | jvm 2 | 2016/07/19 11:54:27 | [11:54:26 19.07.2016]: Update OK.
If I right understand in my Class COM.MainRunner absent some implements on Wrapper.
Please help to simple working example with java wrapper.
this configuration solve problem
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=../lib/example.jar
wrapper.java.classpath.2=../lib/wrapper.jar
wrapper.java.library.path.1=../lib
wrapper.java.library.path.2=../lib/lib
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1="Oracle"
wrapper.app.parameter.1=

Fuse ESB mysteriously hangs - "JVM appears hung: Timed out waiting for signal from JVM."

My Fuse ESB application suddenly stopped, with no clues in fuseesb.log and the following weird log items in wrapper.log:
ERROR | wrapper | 2014/02/12 02:36:59 | JVM appears hung: Timed out waiting for signal from JVM.
ERROR | wrapper | 2014/02/12 02:36:59 | JVM did not exit on request, terminated
STATUS | wrapper | 2014/02/12 02:37:02 | JVM exited in response to signal SIGKILL (9).
ERROR | wrapper | 2014/02/12 02:37:02 | Unable to start a JVM
STATUS | wrapper | 2014/02/12 02:37:02 | <-- Wrapper Stopped
We are using Nagios to monitor the system.
System info: FuseESBEnterprise-7.1.0 / linux-gnu (x86_64).
For various reasons we need to sick with Fuse ESB (not possible to migrate to JBoss Fuse...)
This was a system issue - the vm hung.
You can catch this kind of condition in one of two ways:
monitor the java jvm process
monitor the wrapper.log file for errors

Categories