Work with Openbravo
Connect to the database
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:
- Select Session'.
- In the Host Name' box, enter IP Address of the Openbravo Appliance.
- Select Connection -> SSH -> Tunnels.
- In the Source port field, enter 5433.
- In the Destination field, enter localhost:5432.
- Click Add.
- Click Open to open the ssh connection.
- 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.
Check that you are logged in with the openbravo user and in the /opt/OpenbravoERP folder.
You can check the current username with:
You can check the folder in which you are with:
Then you can compile. For example:
The main application logfile can be found here:
Configuration of how this logfile is managed is done in the Openbravo Application configuration.
Tomcat low-level logfiles can be found in the same folder and are kept by default for 90 days
Up to Appliance 18.04 a file
However using it was quite painful as:
- it was not rotated so growing to huge size in some scenarios
- Mixing two different types of output
- tomcat created logger message (with a timestamp) which are already present in catalina.<date>.log files
- Output of System.out.println or similar code just writing to standard output
Appliance 20.04 applies the following changes
- Stop duplicating content of catalina.<date>.log files in any other place.
- Those catalina.<date>.log files are rotated so much easier to analyze anyway
- Remove catalina.out as a text logfile
- Remaining output (i.e. System.out.println) is now logged into the systemd journal and can be seen with
journalctl -u tomcat
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
Customizing Tomcat parameters
The configuration for Tomcat is in
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
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:
- Splitting the configuration of a server into:
- Openbravo Standard configuration
- Custom local changes done in a particular server
- Allowing to centrally manage some config files in advanced scenarios (i.e. Openbravo Cloud)
In practice that means instead of editing main/postgresql.conf you want to typically edit conf.d/91-local-custom.conf
Customizing Ant parameters
The default options should be fine for most cases, but if you need to adjust them they are in
To restart Tomcat
sudo systemctl restart tomcat
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