ActiveMQ Service unavailable

572 views
Skip to first unread message

Markus Kehrer

unread,
Oct 18, 2018, 3:24:56 AM10/18/18
to Opencast Users
Hello everybody,

i'm new to this group and also new in the field of opencast. I'm studying computer science and media in a german university and need to get the new opencast version running on a testserver for my team. 

I installed the opencast version 5.1 and got it running on a ubuntu 14.04 system. Everything works fine and i can access my opencast installation over the network. 

But everytime i open up opencast ,there is a error message telling me "ActiveMQ Service unavailable", altough i installed it too. When i try to get ActiveMQ Broker to run with 

$ sudo activemq start

the system tells me it is not running, altough it works when i type in

$ sudo activemq restart

Does anybody know this error and can provide me with some help?

Thanks very much in advance. 

Markus Kehrer

unread,
Oct 18, 2018, 3:29:52 AM10/18/18
to Opencast Users
btw, my console output is this:

VM1157:1 GET http://141.64.64.100/info/me.json 404 (Not Found)

VM1157:1 GET http://141.64.64.100/broker/status 503 (Service Unavailable)
fdsb.PNG

Maxime Pedrotti

unread,
Oct 18, 2018, 3:34:10 AM10/18/18
to Opencast Users
Hi,

Unless you compiled ActiveMQ yourself, it should be installed via the package manager, and subsequently registered as a service with systemd, which means you would not start it directly, but rather like this:

$ systemctl restart activemq

You can then check the status of the service by calling:

$ systemctl status activemq

and get systemd log with journalctl:

$ journalctl -u activemq


The same goes for Opencast, the DB server (e.g. MariaDB), and a proxy web server you might have (e.g. nginx or Apache), with the unit names adjusted accordingly, of course.

Best,

Maxime

Maxime Pedrotti

unread,
Oct 18, 2018, 3:42:49 AM10/18/18
to Opencast Users
Sorry, missed a point, I just remembered that systemd may not be the default in 14.04...

The commands to start up the service and check the status might thus be different:

$ sudo service activemq restart

and

$ sudo service activemq status

Message logs should then be located somewhere under /var/log/ either in a subdirectory for activemq, or in the central messages log (which will be crowded with messages from other parts of the OS, however).
Opencast logs are usually in /var/log/opencast/ and could be helpful, as well.
Message has been deleted

Markus Kehrer

unread,
Oct 18, 2018, 4:13:03 AM10/18/18
to Opencast Users
Thanks for the fast help. Altough the command seems to operate something, the output is still an error. I dont really get this: 

activemq.service - Messaging and Integration Patterns provider
   Loaded: loaded (/etc/systemd/system/activemq.service; disabled; vendor preset: enable
   Active: failed (Result: exit-code) since Do 2018-10-18 10:10:46 CEST; 9s ago
  Process: 21831 ExecStart=/usr/bin/activemq console (code=exited, status=1/FAILURE)
 Main PID: 21831 (code=exited, status=1/FAILURE)

Okt 18 10:10:46 teacher activemq[21831]:         at java.lang.reflect.Method.invoke(Meth
Okt 18 10:10:46 teacher activemq[21831]:         at org.apache.activemq.console.Main.run
Okt 18 10:10:46 teacher activemq[21831]:         at org.apache.activemq.console.Main.mai
Okt 18 10:10:46 teacher activemq[21831]: Caused by: java.io.FileNotFoundException: class
Okt 18 10:10:46 teacher activemq[21831]:         at org.springframework.core.io.ClassPat
Okt 18 10:10:46 teacher activemq[21831]:         at org.springframework.beans.factory.xm
Okt 18 10:10:46 teacher activemq[21831]:         ... 24 more
Okt 18 10:10:46 teacher systemd[1]: activemq.service: Main process exited, code=exited,
Okt 18 10:10:46 teacher systemd[1]: activemq.service: Unit entered failed state.
Okt 18 10:10:46 teacher systemd[1]: activemq.service: Failed with result 'exit-code'.

Maxime Pedrotti

unread,
Oct 18, 2018, 4:25:19 AM10/18/18
to Opencast Users
At first glance at the last few lines it would seem some file is missing for ActiveMQ to start up correctly. The output from the status call is cut off, however, you may have to check the output from

$ journalctl -u activemq

maybe post a few more blocks up to the actual error. Stack traces from applications like ActiveMQ or Opencast tend to be very long, often the most useful information point is at the top, where the actual exception is named.

Also: Did you check (and double-check) you went through all the steps described in the docs for the ActiveMQ configuration (https://docs.opencast.org/r/5.x/admin/configuration/message-broker/)?

I had some trouble setting up the message broker (and other parts of Opencast) the first time, as well, sometimes it is easy to miss some setting or adjustment. :)
Message has been deleted

Markus Kehrer

unread,
Oct 18, 2018, 4:33:33 AM10/18/18
to Opencast Users
Thansk Maxime. I think i went trough all the configuration steps, but maybe i will jsut do that again. Thanks for the suggestion.
 
And here ist output from the journalctl cmd:

teacher@teacher:/opt/activemq/bin$ journalctl -u activemq
-- Logs begin at So 2018-10-14 16:32:13 CEST, end at Do 2018-10-18 10:28:36 CEST. --
Okt 18 10:06:25 teacher systemd[1]: Stopped Messaging and Integration Patterns provider.
Okt 18 10:06:25 teacher systemd[1]: Started Messaging and Integration Patterns provider.
Okt 18 10:06:25 teacher activemq[21293]: INFO: Loading '/etc/default/activemq'
Okt 18 10:06:25 teacher activemq[21293]: INFO: Using java '/usr/bin/java'
Okt 18 10:06:25 teacher activemq[21293]: INFO: Starting in foreground, this is just for
Okt 18 10:06:25 teacher activemq[21293]: INFO: Creating pidfile /usr/share/activemq//dat
Okt 18 10:06:25 teacher activemq[21293]: Java Runtime: Oracle Corporation 1.8.0_181 /usr
Okt 18 10:06:25 teacher activemq[21293]:   Heap sizes: current=121856k  free=120586k  ma
Okt 18 10:06:25 teacher activemq[21293]:     JVM args: -Djava.util.logging.config.file=l
Okt 18 10:06:25 teacher activemq[21293]: Extensions classpath:
Okt 18 10:06:25 teacher activemq[21293]:   [/usr/share/activemq/lib,/usr/share/activemq/
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_HOME: /usr/share/activemq
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_BASE: /usr/share/activemq
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_CONF: /usr/share/activemq/conf
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_DATA: /usr/share/activemq/data
Okt 18 10:06:25 teacher activemq[21293]: Loading message broker from: xbean:activemq.xml
Okt 18 10:06:25 teacher activemq[21293]: ERROR: java.lang.RuntimeException: Failed to ex
Okt 18 10:06:25 teacher activemq[21293]: java.lang.RuntimeException: Failed to execute s
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.NativeMethodAccessorImpl
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.NativeMethodAccessorImpl
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.DelegatingMethodAccessor
Okt 18 10:06:25 teacher activemq[21293]:         at java.lang.reflect.Method.invoke(Meth
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.Main.run
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.Main.mai
Okt 18 10:06:25 teacher activemq[21293]: Caused by: org.springframework.beans.factory.Be
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.beans.factory.xm
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.beans.factory.xm
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.Reso
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.Reso
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.Reso
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.Reso
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.xbean.XBeanBroke
lines 1-41...skipping...
-- Logs begin at So 2018-10-14 16:32:13 CEST, end at Do 2018-10-18 10:28:36 CEST. --
Okt 18 10:06:25 teacher systemd[1]: Stopped Messaging and Integration Patterns provider.
Okt 18 10:06:25 teacher systemd[1]: Started Messaging and Integration Patterns provider.
Okt 18 10:06:25 teacher activemq[21293]: INFO: Loading '/etc/default/activemq'
Okt 18 10:06:25 teacher activemq[21293]: INFO: Using java '/usr/bin/java'
Okt 18 10:06:25 teacher activemq[21293]: INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
Okt 18 10:06:25 teacher activemq[21293]: INFO: Creating pidfile /usr/share/activemq//data/activemq.pid
Okt 18 10:06:25 teacher activemq[21293]: Java Runtime: Oracle Corporation 1.8.0_181 /usr/lib/jvm/java-8-openjdk-amd64/jre
Okt 18 10:06:25 teacher activemq[21293]:   Heap sizes: current=121856k  free=120586k  max=1791488k
Okt 18 10:06:25 teacher activemq[21293]:     JVM args: -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/share/activemq//conf/login.config -Djava.awt.headles
Okt 18 10:06:25 teacher activemq[21293]: Extensions classpath:
Okt 18 10:06:25 teacher activemq[21293]:   [/usr/share/activemq/lib,/usr/share/activemq/lib/camel,/usr/share/activemq/lib/optional,/usr/share/activemq/lib/web,/usr/share/activemq/lib/extra]
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_HOME: /usr/share/activemq
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_BASE: /usr/share/activemq
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_CONF: /usr/share/activemq/conf
Okt 18 10:06:25 teacher activemq[21293]: ACTIVEMQ_DATA: /usr/share/activemq/data
Okt 18 10:06:25 teacher activemq[21293]: Loading message broker from: xbean:activemq.xml
Okt 18 10:06:25 teacher activemq[21293]: ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing
Okt 18 10:06:25 teacher activemq[21293]: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML do
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Okt 18 10:06:25 teacher activemq[21293]:         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Okt 18 10:06:25 teacher activemq[21293]:         at java.lang.reflect.Method.invoke(Method.java:498)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.Main.main(Main.java:115)
Okt 18 10:06:25 teacher activemq[21293]: Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [activemq.xml]; nested
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344)
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:614)
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:515)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
Okt 18 10:06:25 teacher activemq[21293]:         at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
Okt 18 10:06:25 teacher activemq[21293]:         ... 10 more
Okt 18 10:06:25 teacher activemq[21293]: Caused by: java.io.FileNotFoundException: class path resource [activemq.xml] cannot be opened because it does not exist
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
Okt 18 10:06:25 teacher activemq[21293]:         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330)
Okt 18 10:06:25 teacher activemq[21293]:         ... 24 more

Maxime Pedrotti

unread,
Oct 18, 2018, 4:44:58 AM10/18/18
to Opencast Users
OK, so from this output the application cannot find the central configuration file (which should be /etc/activemq/activemq.xml). If you followed the steps from the docs, you should have started with a copy of Opencast's sample configuration, and adjusted some settings to make ActiveMQ accessible to Opencast.

Can you check that the config file is actually at /etc/activemq/activemq.xml and contains all adjustments mentioned in the configuration guide from the docs?

Markus Kehrer

unread,
Oct 22, 2018, 7:37:29 AM10/22/18
to Opencast Users
Thanks Maxime for the help.

It helped me a lot. I figured i copied the config file into the wrong directory. Now ActiveMQ is running fine.

Opencast also seems to run now, altough i can not upload videos by now and the menu is not doing anything, but i guess is just have to go trough the opencast configuration doc as soon as possible.

Thanks a lot again.
Reply all
Reply to author
Forward
0 new messages