1 Reply Latest reply on Aug 4, 2011 5:30 PM by wayn23

    Shutdown Error when running ServiceMix as Windows Service

    wayn23

      Environment

      I have Fuse 4.3 ServiceMix running under Apache Daemon 1.0.3 on Windows XP Pro 2002 SP3.

       

      Problem

      When I use the Windows Services console to stop the service, the process does not shutdown cleanly. In addition, it does not delete the file that stores the PID, so restarting the service ends up with the PID file being detected, then deleted, and the service stopped again. Restarting a second time works well. So does stopping the service and then manually deleting the PID file. The next restart will be successfull.

       

      Log Entries

      11:37:53,474 | INFO | Thread-3 | Main | org.apache.karaf.main.Main$2 1258 | - - | Karaf shutdown socket: received shutdown command. Stopping framework...

      11:37:53,474 | INFO | Thread-3 | ContextLoaderListener | .activator.ContextLoaderListener 449 | 67 - org.springframework.osgi.extender - 1.2.0 | Stopping http://org.springframework.osgi.extender bundle v.[http://1.2.0|http://1.2.0/]

      11:37:53,646 | INFO | Thread-3 | TimerTaskExecutor | heduling.timer.TimerTaskExecutor 179 | 55 - org.springframework.context - 3.0.3.RELEASE | Cancelling Timer

      11:37:53,662 | INFO | FelixStartLevel | GogoPlugin | karaf.webconsole.gogo.GogoPlugin 103 | 82 - org.apache.karaf.webconsole.gogo - 2.0.0 | Gogo plugin deactivated

      11:37:53,662 | INFO | FelixStartLevel | FeaturesPlugin | bconsole.features.FeaturesPlugin 85 | 81 - org.apache.karaf.webconsole.features - 2.0.0 | Features plugin deactivated

      11:37:53,662 | INFO | FelixStartLevel | AdminPlugin | raf.webconsole.admin.AdminPlugin 65 | 80 - org.apache.karaf.webconsole.admin - 2.0.0 | Admin plugin deactivated

      11:37:53,709 | INFO | FelixStartLevel | HttpServiceFactoryImpl | .internal.HttpServiceFactoryImpl 40 | 75 - org.ops4j.pax.web.pax-web-runtime - 0.7.2 | Unbinding bundle: org.apache.felix.webconsole

      11:37:53,818 | INFO | FelixStartLevel | Activator | x.web.service.internal.Activator 93 | 75 - org.ops4j.pax.web.pax-web-runtime - 0.7.2 | Pax Web stopped

      11:37:53,818 | INFO | FelixStartLevel | Activator | apache.camel.impl.osgi.Activator 77 | 63 - org.apache.camel.camel-core - 2.4.0.fuse-00-00 | Camel activator stopping

      11:37:53,818 | INFO | FelixStartLevel | Activator | apache.camel.impl.osgi.Activator 79 | 63 - org.apache.camel.camel-core - 2.4.0.fuse-00-00 | Camel activator stopped

      11:37:53,865 | INFO | FelixStartLevel | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Stopping JMX OSGi agent

      11:37:53,912 | INFO | FelixStartLevel | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering MBean with ObjectName osgi.compendium:service=cm,version=1.3 for service with service.id 10

      11:37:53,912 | INFO | JMX OSGi Agent | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@fd54d6 with name osgi.core:type=framework,version=1.5

      11:37:53,912 | INFO | JMX OSGi Agent | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@fd54d6 with name osgi.compendium:service=cm,version=1.3

      11:37:53,912 | INFO | JMX OSGi Agent | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@fd54d6 with name osgi.core:type=serviceState,version=1.5

      11:37:53,912 | INFO | JMX OSGi Agent | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@fd54d6 with name osgi.core:type=packageState,version=1.5

      11:37:53,927 | INFO | JMX OSGi Agent | jmx | ? ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@fd54d6 with name osgi.core:type=bundleState,version=1.5

      11:37:53,974 | INFO | FelixStartLevel | BeanRecipe | s.blueprint.container.BeanRecipe 764 | 7 - org.apache.aries.blueprint - 0.1.0.r964701 | Error invoking destroy method

      org.osgi.service.blueprint.container.ServiceUnavailableException: Service is unavailable

      at org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:201)

      at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:652)

      at org.apache.karaf.features.FeaturesListener$$EnhancerByCGLIB$$3f0ba484.repositoryEvent(<generated>)

      at org.apache.karaf.features.internal.FeaturesServiceImpl.callListeners(FeaturesServiceImpl.java:939)

      at org.apache.karaf.features.internal.FeaturesServiceImpl.internalRemoveRepository(FeaturesServiceImpl.java:186)

      at org.apache.karaf.features.internal.FeaturesServiceImpl.stop(FeaturesServiceImpl.java:777)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):1.6.0_22

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):1.6.0_22

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):1.6.0_22

      at java.lang.reflect.Method.invoke(Unknown Source):1.6.0_22

      at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:230)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:854)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:761)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:295)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:665)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:819)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:204)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:196)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:384)7:org.apache.aries.blueprint:0.1.0.r964701

      at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453)org.apache.felix.framework-3.0.1.jar:

      at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)org.apache.felix.framework-3.0.1.jar:

      at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3734)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2225)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1217)org.apache.felix.framework-3.0.1.jar:

      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)org.apache.felix.framework-3.0.1.jar:

      at java.lang.Thread.run(Unknown Source):1.6.0_22

      11:37:54,052 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.1.0.r964701 | Bundle org.apache.karaf.jaas.modules is waiting for namespace handlers (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/jaas/v1.0.0))

      11:37:54,177 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.1.0.r964701 | Bundle org.apache.karaf.shell.log is waiting for namespace handlers (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))

       

      The only change I have made to the default install is to configure the file Fuse/etc/org.apache.karaf.features.cfg to specify

      featuresBoot=web,activemq,activemq-broker,cxf,camel, webconsole