Jasperserver uses internal PostgreSQL database to store all its objects. This database runs – as usual for PostgreSQL – on port 5432. But to access it you need to check where this database stores its .lock and .pid files.

If you login into server / instance where Jasperserver is running check processes for postgresql string:

ps -ef|grep postgresql

You will see output like this one:

myuser  13365     1  0 Mar12 ?        00:00:06 /home/myuser/jasperreports-server-cp-6.4.2/postgresql/bin/postgres.bin -D /home/myuser/jasperreports-server-cp-6.4.2/postgresql/data

This shows you PostgreSQL data directory (/home/myuser/jasperreports-server-cp-6.4.2/postgresql/data), so .lock and .pid files are usually stored in /home/myuser/jasperreports-server-cp-6.4.2/postgresql

To access JS internal PostgreSQL database using standard psql command (if missing install it using “sudo apt-get install postgresql-client”) you will have to use this command (do not forget to remove “/data” from the end of the name of PG data directory):

psql -p 5432 -H localhost -h /home/myuser/jasperreports-server-cp-6.4.2/postgresql -U postgres -d jasperserver

Generally there are 2 users you can use for connection:
postges / postgres
jasperdb / password

Configuration in pg_hba.conf and postgresql.conf file does not allow remote connections from other machines and I would strongly recommend to keep it that way. Because these 2 users mentioned above are well known together with their passwords. So the best protection is to not allow remote access to JS internal database.