Installing ScadaBR in Debian Gnu/Linux on Cubieboard ARM system

Hello all,

I'm trying to install ScadaBR on a Cubieboard v3 (cubietruck) ARM system that runs Cubian (Debian based system) without sucess.

I read manual and some thread like this: http://www.scadabr.com.br/?q=node/882 or this: http://www.scadabr.com.br/?q=node/981.

First I try with Tomcat7 but I stop with bug in Tomcat described in thread "981". Cubian is based on current Debian stable Wheezy but I upgrade to Jessie in order to get tomcat7 newer version, problem don't solve.

Then I try with Tomcat6, these are steps I follow (from "882" thread):

1- Install Java. There aren't a Java v1.6 from Oracle for ARM systems, then I install Openjdk:

root@cubietruck:/var/log/tomcat6# dpkg -l |grep openjd |awk '{print $2 $3'}
openjdk-6-jdk:armhf    6b33-1.13.5-2~deb7u1
openjdk-6-jre:armhf    6b33-1.13.5-2~deb7u1
openjdk-6-jre-headless:armhf    6b33-1.13.5-2~deb7u1
openjdk-6-jre-lib     6b33-1.13.5-2~deb7u1
 
2 - Install Tomcat6 (Tomcat7 is removed):
 
root@cubietruck:/var/log/tomcat6# dpkg -l |grep tomcat |awk '{print $2 $3'}
libtomcat6-java6.0.41-2
tomcat66.0.41-2
tomcat6-admin6.0.41-2
tomcat6-common6.0.41-2
tomcat6-docs6.0.41-2
 
3 - Install librxtx library:
 
root@cubietruck:/var/log/tomcat6# apt-cache policy librxtx-java
librxtx-java:
  Instalados: 2.2pre2-13
  Candidato:  2.2pre2-13
  Tabla de versión:
 *** 2.2pre2-13 0
        500 http://ftp.es.debian.org/debian/ jessie/main armhf Packages
        100 /var/lib/dpkg/status
 
4 - Copy ScadaBR.war (v 0.9.1 I can't find 1.0 or extract from .exe) to /var/lib/tomcat6/webapps and change permissions:
 
root@cubietruck:/var/log/tomcat6# ll /var/lib/tomcat6/webapps/
total 37M
drwxr-xr-x  3 root    root    4,0K dic 17 12:23 ROOT
drwxr-xr-x 12 tomcat6 tomcat6 4,0K dic 17 12:45 ScadaBR
-rw-r--r--  1 tomcat6 tomcat6  37M dic 17 12:44 ScadaBR.war
 
5 - Create /var/lib/tomcat6/bin and change permissions:
 
root@cubietruck:/var/log/tomcat6# ll /var/lib/tomcat6/
total 20K
drwxr-xr-x 3 tomcat6 tomcat6 4,0K dic 17 12:29 bin
drwxr-xr-x 3 tomcat6 tomcat6 4,0K dic 17 12:23 common
lrwxrwxrwx 1 root    root      12 ago 24 22:54 conf -> /etc/tomcat6
lrwxrwxrwx 1 root    root      17 ago 24 22:54 logs -> ../../log/tomcat6
drwxr-xr-x 3 tomcat6 tomcat6 4,0K dic 17 12:23 server
drwxr-xr-x 3 tomcat6 tomcat6 4,0K dic 17 12:23 shared
drwxrwxr-x 4 tomcat6 tomcat6 4,0K dic 17 12:44 webapps
lrwxrwxrwx 1 root    root      19 ago 24 22:54 work -> ../../cache/tomcat6
 
6 - Restart Tomcat6: "service tomcat6 restart"
 
ScadaBR don't run. I try to remove all and deploy from manager-webapp but fail again. Follow log:

 

---------------- Cut from catalina.out -------------

 

root@cubietruck:/var/log/tomcat6# tail -n10 -f catalina.out 
17-dic-2014 13:07:49 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Desplieque del descriptor de configuración docs.xml
17-dic-2014 13:07:50 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Desplieque del descriptor de configuración manager.xml
17-dic-2014 13:07:51 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Desplieque del descriptor de configuración ROOT.xml
17-dic-2014 13:07:52 org.apache.coyote.http11.Http11Protocol start
INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
17-dic-2014 13:07:52 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5457 ms
17-dic-2014 13:08:25 org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo ScadaBR.war de la aplicación web
2014-12-17 12:09:29.509 GMT Thread[http-8080-1,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
----------------------------------------------------------------
2014-12-17 12:09:30.131 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - 10.6.1.0 - (938214): instance a816c00e-014a-5827-2ab3-000000370b38 
on database directory /var/lib/tomcat6/bin/scadabrDB   with class loader WebappClassLoader
  context: /ScadaBR
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@90659a
 
 
Database Class Loader started - derby.database.classpath=''
17-dic-2014 13:09:45 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
17-dic-2014 13:09:45 org.apache.catalina.core.StandardContext start
GRAVE: Falló en arranque del Contexto [/ScadaBR] debido a errores previos
 
2014-12-17 12:09:45.335 GMT:
Shutting down instance a816c00e-014a-5827-2ab3-000000370b38 with class loader WebappClassLoader
  context: /ScadaBR
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@90659a
 
----------------------------------------------------------------
17-dic-2014 13:09:45 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/ScadaBR] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
17-dic-2014 13:09:45 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [/ScadaBR] appears to have started a thread named [Dispatcher-Thread-4] but has failed to stop it. This is very likely to create a memory leak.
17-dic-2014 13:09:45 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
GRAVE: The web application [/ScadaBR] created a ThreadLocal with key of type [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@13c9936]) and a value of type [java.util.WeakHashMap] (value [{=null, =null, =null, =null, ={2}}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2014-12-17 12:11:02.581 GMT Thread[http-8080-1,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
----------------------------------------------------------------
2014-12-17 12:11:03.080 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - 10.6.1.0 - (938214): instance a816c00e-014a-5828-9643-0000007de5a8 
on database directory /var/lib/tomcat6/bin/scadabrDB   with class loader WebappClassLoader
  context: /ScadaBR
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@90659a
 
 
Database Class Loader started - derby.database.classpath=''
17-dic-2014 13:11:06 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
17-dic-2014 13:11:06 org.apache.catalina.core.StandardContext start
GRAVE: Falló en arranque del Contexto [/ScadaBR] debido a errores previos
 
2014-12-17 12:11:06.724 GMT:
Shutting down instance a816c00e-014a-5828-9643-0000007de5a8 with class loader WebappClassLoader
  context: /ScadaBR
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@90659a
 
----------------------------------------------------------------
17-dic-2014 13:11:06 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/ScadaBR] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
17-dic-2014 13:11:06 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [/ScadaBR] appears to have started a thread named [Dispatcher-Thread-7] but has failed to stop it. This is very likely to create a memory leak.
17-dic-2014 13:11:06 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
GRAVE: The web application [/ScadaBR] created a ThreadLocal with key of type [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@3f7c9e]) and a value of type [java.util.WeakHashMap] (value [{=null, ={2}}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
----------------------- end of catalina.out -------------------------------
 
Anyone can help?
 
So many thanks.
 
Best regards.
 
Salud y Revolución.
 
Lobo.
---
¿Libertad? ¿Quien ha dicho libertad?

Hello all,

I can solve it installing Java 8 for Arm.

There are two ways for do it, but I follow fast way (http://www.adminreseau.fr/how-to-install-oracle-java-8-in-debian-via-repository-jdk8/) and not Debian way (https://wiki.debian.org/JavaPackage).

I need to remove all installation of ScadaBR and deploy again, and, well I'm not sure but I change permissions of /var/lib/tomcat6 to tomcat6.tomcat6 instead of root.root. Restarting several times Tomcat6 it, finally, works.

Now, I try to use a Lxc or Docker container to use ScadaBR, anyone do it before?

Best regards.

Salud y Revolución.

Lobo.

---

¿Libertad? ¿Quien ha dicho libertad?