View source | Discuss this page | Page history | Printable version   

Installation/Appliance/Openbravo

Work with Openbravo



Bulbgraph.png   This document refers to the appliances 20.04 and 18.04.



Contents

Connect to the database

psql

Connect by ssh with openbravo user and then you can connect to the database with:

psql -h localhost -U tad openbravo

Default password: tad

pgadmin with ssh tunnel

ssh tunnel in linux

Connect by ssh doing a tunnel from your local port 5433 of the server port 5432

ssh openbravo@<IP_ADDRESS> -L 5433:localhost:5432

Then in your local pgadmin in host set localhost and port 5433

ssh tunnel in windows

PuTTY is an open source and free SSH client.

Use PuTTY to connect to PostgreSQL:

  1. Select Session'.
  2. In the Host Name' box, enter IP Address of the Openbravo Appliance.
  3. Select Connection -> SSH -> Tunnels.
  4. In the Source port field, enter 5433.
  5. In the Destination field, enter localhost:5432.
  6. Click Add.
  7. Click Open to open the ssh connection.
  8. Type openbravo as user name and your password, then leave this Putty window opened.

pgAdmin connection setup

Now you can start psql, pgAdmin or your favorite client and use localhost as the host and 5433 as the port in the connection details.

The database name is openbravo, the username tad and the password tad.

Appliance-ssh-tunnel-pgsql.png

Compile

Check that you are logged in with the openbravo user and in the /opt/OpenbravoERP folder.

You can check the current username with:

whoami

You can check the folder in which you are with:

pwd

Then you can compile. For example:

ant smartbuild
Bulbgraph.png   Do not use sudo or the root user for compilation. Use the openbravo user.

Logs

Openbravo Application

The main application logfile can be found here:

/var/lib/tomcat/logs/openbravo.log

Configuration of how this logfile is managed is done in the Openbravo Application configuration.

Tomcat low-level

Tomcat low-level logfiles can be found in the same folder and are kept by default for 90 days

/var/lib/tomcat/logs/catalina.<date>.log
/var/lib/tomcat/logs/localhost.<date>.log

catalina.out (gone)

Up to Appliance 18.04 a file

/var/lib/tomcat/logs/catalina.out

was present.

However using it was quite painful as:

Appliance 20.04 applies the following changes

journalctl -u tomcat
Bulbgraph.png   We strongly recommend to use log4j for any java code and to avoid using code like System.out.println, System.err.println, e.printStackTrace()

PostgreSQL database

The PostgreSQL logfile

/var/log/postgresql/postgresql-12-main.log   # Appliance 20.04
/var/log/postgresql/postgresql-10-main.log   # Appliance 18.04

And the log of the periodic/automatic backups

/var/log/openbravo/openbravo-backup.log

Customizing parameters

Customizing Tomcat parameters

The configuration for Tomcat is in

/etc/profile.d/tomcat.sh

If you need to set more ram to tomcat take a look to the memory recommendations.

Customizing PostgreSQL parameters

The configuration for PostgreSQL is:

/etc/postgresql/12/main/   # Appliance 20.04
/etc/postgresql/10/main/   # Appliance 18.04
Bulbgraph.png   The appliance (since 18.04) has the main config postgresql.conf split to several files

The appliance contains 2 files prepared:

/etc/postgresql/12/main/conf.d/01-openbravo-standard-postgres12.conf  # Do NOT edit this
/etc/postgresql/12/main/conf.d/91-local-custom.conf                   # Put your changes here 

Goals behind this are:

In practice that means instead of editing main/postgresql.conf you want to typically edit conf.d/91-local-custom.conf


Bulbgraph.png   When working with big volume databases, it may be a good idea to increase the memory assigned to postgres.

Customizing Ant parameters

The default options should be fine for most cases, but if you need to adjust them they are in

/etc/profile.d/ant.sh

Restart services

Restart Tomcat

To restart Tomcat

sudo systemctl restart tomcat

Restart PostgreSQL

Usually it is only needed to restart PostgreSQL manually when you want to apply some new configuration values.

Before restarting PostgreSQL, close all connections to postgres (openbravo, pgadmin, etc), i.e:

sudo systemctl stop tomcat
sudo systemctl restart postgresql
sudo systemctl start tomcat

Retrieved from "http://wiki.openbravo.com/wiki/Installation/Appliance/Openbravo"

This page has been accessed 43,013 times. This page was last modified on 11 May 2023, at 15:50. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.