Magnolia 4.5 reached end of life on June 30, 2016. This branch is no longer supported, see End-of-life policy.
If you use Mac OS X 10.5 or 10.6, you should update to at least 10.5.8 or 10.6.2. Earlier versions cause issues where, when two or more instances are started in the same container, some or all connections are dropped.
The symptoms are that Tomcat is unreachable ("kCFErrorDomainCFNetwork:302") but no log message clearly identifies the issue. Sometimes pages can be loaded but resources cannot, leading to missing images or stylesheets. Another symptom is that you have to kill the Tomcat process to stop it (-HUP works) because the shutdown script cannot reach the running process either. See MAGNOLIA-1959 for more details and comment on your own experience.
This error can occur on some Linux systems when using the embedded Derby database. Derby opens several file handles and may run over the maximum limit set by the system.
The solution is to increase the limit. The exact procedure varies from one Linux distribution to the next. The following works on Ubuntu. For other systems see the Too many open files wiki page for tips.
To set a system wide limit for open files on Ubuntu Linux:
ulimit -n
limits.conf
file: sudo gedit /etc/security/limits.conf
* soft nofile 10000
* hard nofile 50000
root
.sudo gedit /etc/pam.d/common-session
session required pam_limits.so
ulimit -n
When installing or updating to a new version, you may see this error message:
2009-11-24 13:02:14,970 ERROR org.apache.catalina.session.ManagerBase : IOException while loading persisted sessions
This can be due to changes in signatures of classes that are stored in the user sessions (such as permissions, user, etc). The error happens when Tomcat attempts to de-serialize serialized sessions, that is when restarting the container.
This causes the loss of persisted sessions. Users will have to log in again. Otherwise it is a harmless error and can be ignored.
If you see the following error message in your logs:
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
Add the Xalan jar to the WEB-INF/lib
folder of your Magnolia instances, delete the repositories and start again. Please see MAGNOLIA-1958 for more details and comment on your own experience.
Port 8080 is the default port for Tomcat. You can see it at the end of the default address http://localhost:8080
. If another application on the computer is already using the same port you may need to change it.
<CATALINA_HOME>/conf/server.xml
in a text editor. This file is under your Magnolia CMS installation directory.Find the following section and set the value of port
to something other than 8080, for example 8090:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8090" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
Change the defaultBaseUrl
property which is used to generate links in emails or other external systems. To do this, you need to now access Magnolia at the new port 8090.
/server/defaultBaseUrl
property to http://localhost:8090/magnolia/
/server/defaultBaseUrl
property to http://localhost:8090/magnolia/
The port also needs to be changed in publishing configuration, otherwise activating changes from the author to public instance fails.
magnoliaPublic8080
subscriber, set the URL
property to http://localhost:8090/magnoliaPublic
magnoliaPublic8090
.If you want to run two different Tomcats simultaneously you need to change other ports too. This is useful if you want to run different versions of Magnolia CMS at the same time. In <CATALINA_HOME>/conf/server.xml
, change the port numbers for the shutdown and AJP sections and any custom sections you have enabled.
Allow an exception in Windows Firewall for Java.
C:\Sun\SDK\jdk\bin\java.exe
.If you get a security alert during startup, check the Private networks checkbox and click Allow access.
CATALINA_HOME environment variable identifies the Tomcat home directory, for example C:\Program Files\magnolia\apache-tomcat
. Usually Magnolia CMS finds this directory automatically. When you type magnolia_control.bat start
in the bin
directory to start the system, a second script named startup.bat
tries to find Tomcat home. It assumes that Tomcat home is one level above the bin
directory where you issued the command, and sets the value of CATALINA_HOME to that directory.
C:\Program Files magnolia apache-tomcat <-- Tomcat home directory bin <-- magnolia_control.bat is here
However, if you added the bin
directory to your PATH environment variable you can execute magnolia_control.bat
from anywhere. This means startup.bat
does not find Tomcat home directory by simply moving up one level from where you are and displays the following error:
To correct this define CATALINA_HOME in environment variables. Follow the instructions in Set JAVA_HOME environment variable.
If the Java Virtual Machine (JVM) does not have enough memory you may see a java.lang.OutOfMemoryError
in the startup log and Magnolia CMS fails to start.
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments
Increase Java heap size to allocate more memory to JVM:
./magnolia_control.sh stop
/apache-tomcat/bin/setenv.sh
(/apache-tomcat/bin/setenv.bat
on Windows) in a text editor.Xmx
parameter to set a new maximum heap size. Default size for Magnolia CMS is 512M, try a higher amount such as 1024M../magnolia_control.sh start && tail -f ../logs/catalina.out
When installing the Enterprise Edition on Windows, you can start the installer by double-clicking the JAR file. If this does not work there is a chance that some application on your system has registered the .jar extension.
You can try to fix it yourself by restoring the association of the .jar extension with the javaw.exe
executable. .Right-click the JAR file and select Open With. Typically the javaw.exe
file is in C:\Program Files (x86)\java\jre6\bin
). Alternatively, start the installer from a command prompt with the following command: java -jar magnolia-enterprise-installer-x.y.z.jar
. Make sure the file extension is .jar. Internet Explorer has a tendency to append or change it to .zip.