Packet for query is too large (MySQL)
If you get an error like this:
Packet for query is too large (1708726 > 1048576).
You can change this value on the server by setting the 'max_allowed_packet' variable.
You need to modify your MySQL server configuration file and increase the value of the max_allowed_packet property. Don't forget to restart the MySQL after any change in this file. In Debian based distros like Ubuntu, this configuration file is located at /etc/mysql/my.cnf.
Not able to connect from other computer in the network
Ensure you have access from the other computers to the server.
Ensure your server firewall allows remote connection to the destination port.
If you expose the tomcat port 8080, ensure is binding your ip, the "address" parameter value should be "0.0.0.0" at $TOMCAT_HOME/conf/server.xml:
<Connector port="8080" address="0.0.0.0" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
After any modification in server.xml to take effect must restart the tomcat.
Error downloading document as PDF
This error usually is caused by OpenOffice or LibreOffice service configuration.
Check if the OpenOffice or LIbreOffice service is started by OpenKM. You should get a program named "soffice.bin" running after application finished the startup.
IMAP SSL certificate error
First obtain the certificate with the openssl command and after this import the certificate with:
$ keytool -import -alias mail.yourcompany.com -keystore /etc/java-6-sun/security/cacerts -file imapd.pem
The application must be restarted to refresh the SSL certificates. More information at Connecting+to+SSL+services.
OpenKM server has no direct Internet connection
If you need a proxy to access the Internet, edit your "/etc/bash.bashrc" file as root and put these lines at the end of your "/etc/bash.bashrc" file:
export http_proxy=http://username:email@example.com:port/ export ftp_proxy=http://username:firstname.lastname@example.org:port/
You can omit the username:password, if your proxy server has no password.
Access denied installing OpenKM as service on Windows 7
The command shell works slightly differently in Vista. By default when you run cmd.exe, it does not give administrator rights. To get around it, create a shortcut to cmd.exe on desktop, open Properties > Compatibility tab and check box for Administrator rights. Then you can do admin stuff on cmd line.
Problems with character encodings
If your language has non-ASCII characters and they are displayed as garbage you have a problem with encodings.
Check the $TOMCAT/bin/setenv.sh or $TOMCAT/bin/setenv.bat file. You should have set the JVM parameter "-Dfile.encoding=utf-8".
The application must be restarted.
Since Java 8 there is no such PermSize and MaxPermSize options.
If you see this error:
java.lang.OutOfMemoryError: PermGen space
Edit your "$TOMCAT_HOME/bin/setenv.sh" (or "$TOMCAT_HOME/bin/setenv.bat" if using Windows) and increase the value of the JVM parameter "-XX:MaxPermSize":
JAVA_OPTS="-Xms256m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=512m"
See also Presenting the Permanent Generation.
LDAP Sizelimit exceeded
Caused because bindDN has size limit for each ldap query.
In Openldap The solution is to increase the limit of bindDN, for example ( to change size limit to user used by openkm ldap connection )
limits dn.exact="cn=reader,ou=accounts,ou=admins,dc=example,dc=com" size=100000
See also OpenLDAP Limits.
Behind IIS proxy you get error 404 or 404.15
Using IIS as a web server by default it has a limit for the query string sent to the server if limit is passed then you get some error screen on the client side:
In the server side we get a more detailed error:
To solve this issue we need to increase the maximum size of the query string on the web server:
- Open Internet Information Services (IIS) Manager.
- In the Connections pane, go to the connection > site > application, or directory for which you want to modify your request filtering settings.
- In the Home pane, double-click Request Filtering.
Click Edit Feature Settings... in the Actions pane.
Change the maximum query string length:
More information at OpenKM forum.
IIS gets IOException: Internal Server Error while uploading file
Change the "Maximum allowed content lenght (Bytes)" from your IIS configuration parameters:
- Go to webapps folder
- Edit the web.config file and add the following under <configuration> where "2097151" is the maximum allowed in IIS:
<system.web> <httpRuntime maxRequestLength="2097151" /> </system.web>
If there is no web.config then just create one from text file and add the following :
<configuration> <system.web> <httpRuntime maxRequestLength="2097151" /> </system.web> </configuration>
Zoho fails with SSL connection
To use Zoho integration you have to configure your server to deliver the whole certificate chain by itself, because the Zoho client does not looks for the chain. Our solution is reconfigure APR in Tomcat to deliver the CA chain separatly to the server certificate.
The configuration file at "$TOMCAT_HOME/conf/server.xml" it looks like this:
<!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation --> <Connector port="8443" address="0.0.0.0" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" acceptCount="100" enableLookups="false" clientAuth="true" sslProtocol="SSLv3" SSLCipherSuite="ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT" SSLCertificateFile="/home/openkm/tomcat-7.0.27/cert/serverpublic.pem" SSLCertificateKeyFile="/home/openkm/tomcat-7.0.27/cert/serverprivate.pem" SSLCertificateChainFile="/home/openkm/tomcat-7.0.27/cert/serverpublicchain.pem" allowUnsafeLegacyRenegotiation="false" />
More information at our Forum.
Sigar java.lang.UnsatisfiedLinkError Known issue in Windows
If you have OpenOffice or LibreOffice configured and you get the error "sigar java.lang.UnsatisfiedLinkError"probably you have missing the "sigar path" in "PATH" environment variable.
Caused by: java.lang.UnsatisfiedLinkError: org.hyperic.sigar.Sigar.getSigNum(Ljava/lang/String;)I at org.hyperic.sigar.Sigar.getSigNum(Native Method) at org.hyperic.sigar.Sigar.kill(Sigar.java:275)
Edit your general environment variable "PATH" and add your "$TOMCAT_HOME\lib\sigar\" folder, for example like PATH=...;C:\tomcat-7.0.27\lib\sigar
The application must be restarted.
If you see this message:
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limit
Do you experiencing any performance or usability problems as a result of this warning? If not then it seems like you should treat this warning as just that: a warning.
Otherwise, it looks like the solution is to increase the size of maxElementsInMemory to account for the difference in what is cached versus what is realistically being used.
OpenOffice is not starting on Windows
Sometimes is not easy to get OpenKM with soffice service started for several and strange reason which depends on your OS Windows version and other specific configuration done in server.
First of all ensure your OpenOffice path is correctly configured at Administration > Configuration parameters > "system.openoffice.path" parameter.
Ensure there's no other soffice.bin instance running. If there're another soffice.bin instance on execution openkm will not be able to start their own soffice service. Take a look at the process running on Widnows or use a tool like Process Explorer.
Stop firewall and other possible tools which be able to do not allow start soffice service. For example the antivirus.
Try starting application from command line at "%TOMCAT_HOME/bin":
$ catalina.bat run
Another option is open a command line with administrator grants. In some Windows OS appears a checkbox to execute with some restrictions, we suggest try both options.
We've observated in some cases the execution with some restrictions goes right and not the case without any restriction.