DB-tools is a command-line utility for PaperCut to query or modify the database as needed. Instructions to use this tool are documented in our manual here: Database tool (db-tools). This article exists to discuss the various errors seen when running db-tools that customers have raised with us.
Error: Can’t connect to window server – not enough permissions. On some Mac systems, PaperCut 13.3 and older may generate an error and fail when attempting to use db-tools as part of restoring a database, a required activity when migrating a Primary Server installation of PaperCut.
The applicable error message is:
Error running db-tools, command: init-db. Can’t connect to window server – not enough permissions.
This can be addressed by opening the db-tools file with a text editor such as vi, and adding the following parameter line after ${JAVA_CMD} \:
"-Djava.awt.headless=true" \
Your file will then resemble:
export CLASSPATH ${JAVA_CMD} \ "-Djava.io.tmpdir=${TMP_DIR}" \ "-Dserver.home=${SERVER_HOME}" \ "-Djava.awt.headless=true" \ -Xmx256M \ biz.papercut.pcng.persistence.tools.DBTools \ "$@" Error: GC overhead limit exceeded Error occurred running db-tools, command: delete-old-logs. GC overhead limit exceeded We have seen this error at a few busy sites when using db-tools to delete old logs. (Sites printing couple of thousands of pages every day) By default, db-tools application uses 256M of memory which can be increased by making the following changes.
Open db-tools file using a text editor. Find the line Xmx256M Try adding more amount by doubling it. E.g. Xmx512M Save the file. Test it if that works and change the memory parameter accordingly to your needs. Error: Malformed \uxxxx encoding The PaperCut Support team recently came across this error when a customer was Up Sizing their PaperCut installation to use an external Microsoft SQL database.
PaperCut Supports both SQL Authentication (preferred) and Windows Authentication when connecting to the Microsoft SQL database.
In this particular instance, the Windows User was companydomain\universal. The universal is non-generic in this example. This meant that when running db-tools init-db, the Java environment that PaperCut is developed in returned the following error:
Error ocurred running db-tools, command: init-db. Malformed \uxxxx encoding. The server.properties file would require the \ to be escaped if this was the correct method of entering the Windows Authentication details. When using Windows Authentication, the username and password is not required.
More specifically, this error is because \u is reserved in Java for escaping Unicode strings.
Hopefully, this should resolve the issue. If you still see issue, please contact support. If you can include the Application server logs, that would be super helpful.
Comments
0 comments
Please sign in to leave a comment.