Stand alone tool for data gathering

The credentials are defined in the <Resource> in /opt/tomcat8/conf/server.xml:

username="orbeon" password="SECRET"

When you try to save a form you get an error too.
I need to check, maybe we need to fill the db manually first.

Indeed.

Seems so

" Database setup : You setup the database and create a schema with a few tables"

https://github.com/orbeon/orbeon-forms/blob/master/form-runner/jvm/src/main/resources/apps/fr/persistence/relational/ddl/mysql-2019_1.sql

1 Like

Oh, mysql 5.7 and higher is supported so we need a newer mariadb.

https://doc.orbeon.com/form-runner/persistence/relational-db#mysql-database-setup

ah yes, we now have mariadb-5.5.68-1.el7.x86_64

I used mariadb103 by @stephdl and the schema import worked without errors:

yum -y install http://mirror.de-labrusse.fr/NethServer/7/x86_64/nethserver-stephdl-1.1.7-1.ns7.sdl.noarch.rpm
yum install nethserver-rh-mariadb103 --enablerepo=stephdl -y

Config DB:

mysql103
CREATE USER 'orbeon'@'%' IDENTIFIED BY 'SECRET';
CREATE schema orbeon;
GRANT ALL PRIVILEGES ON *.* TO 'orbeon'@'%' WITH GRANT OPTION;
exit;
wget https://raw.githubusercontent.com/orbeon/orbeon-forms/master/form-runner/jvm/src/main/resources/apps/fr/persistence/relational/ddl/mysql-2019_1.sql
cat mysql-2019_1.sql | mysql103 orbeon

Enable logging, see https://doc.orbeon.com/installation/logging

Edit /opt/tomcat8/webapps/orbeon/WEB-INF/resources/config/log4j.xml, search for orbeon.log and change the path to /var/log/orbeon.log

touch /var/log/orbeon.log
chown tomcat:tomcat /var/log/orbeon.log
chmod 600 /var/log/orbeon.log

Change the url in /opt/tomcat8/conf/server.xml to fit the newer mariadb and restart tomcat, for mariadb103 you need to use 127.0.0.1 and port 3313 instead of localhost.

url="jdbc:mysql://127.0.0.1:3313/orbeon?useUnicode=true&amp;characterEncoding=UTF8">

Tomcat8 is working without complaining about a missing database but orbeon still does.

From orbeon.log: javax.servlet.ServletException: No database instance available

I think we are missing some additional component config…

1 Like

Yep, so I got it runing om mariadb 103 as per instructions above. I get a lot of errors in various logs so I wonder if I have a mix of MySQL and MariaDB e.g. connector-java etc

1 Like

I’m going to test more later. I think the DB is ok because the schema worked without issues.

1 Like

Sure!

This is my orbeon.log for trying to save a form https://pastebin.com/rKEHpCYF

The root cause seems to be a ‘permission denied’ somewhere…

I get the same errors, I tried it with Tomcat 7 but no luck so far…

1 Like

The answer could well be in doing:

chown -R tomcat:tomcat /opt/tomcat8/webapps/orbeon/
systemctl restart tomcat8

A first small test with both MariaDB 10.3 as well as the internal Orbeon DB looks good so far. So basically all your instructions based on MariaDB103 and setting correct tomcat permissions.

Can you try please?

1 Like

I’ll try it later to confirm but I think that was the issue.

If so:

  1. we need to set back permissions on the logfile.
  2. Make sure it runs via HTTPS only
  3. Nicer URL?
  4. RTFM :slight_smile:

Confirmed.

chown tomcat:tomcat /var/log/orbeon.log
chmod 600 /var/log/orbeon.log

Create a reverse proxy to http://localhost:8080 to use https://reverseproxydomainname/orbeon

To change the path /orbeon, just edit the context line added previously to /opt/tomcat8/conf/server.xml

i.e. <Context path="/whatever" or <Context path="/".

:laughing:

2 Likes

Note to self, I did something that changed the ownership of /opt/tomcat8/webapps/orbeon back to apache. Needed to set permissions back to tomcat

I added the chown lines to my posts…

For accuracy, does the your posting need to be adjusted for using Maridb103 instead of the default MySQL?

1 Like

You’re right, I linked the mariadb103 part to the first post.

1 Like

Using the internal DB of Orbeon (eXist-db) is deprecated and NOT recommended of supported any longer. (been there, done that…)

Please see: https://doc.orbeon.com/configuration/advanced/exist-db

@mrmarkuz is the create command correct please for it gives me an error:

MariaDB [(none)]> CREATE USER ‘orbeon’@‘%’ IDENTIFIED BY ‘SECRET’;
ERROR 1396 (HY000): Operation CREATE USER failed for ‘orbeon’@‘%’
MariaDB [(none)]>

Thanks

Actually I don;t know what is wrong. It is not working with MariaDB (time out). Followed all the directions above, double checked server.xml, ports, hosts etc etc. No luck :frowning:

Really need some help for I am staring blind at stuff by now

  • Ok, not working yet, but found a possible issue. Since we initially started with mysql and are now using MariaDB, MariaDB will not start due to the fact that there is already /var/lib/mysql/mysql.sock file from MySQL. So when trying to start MariaDB the status says fails due to the .sock file already exists.