Server Won't Start
 

Which startup log files to examine?

 

If the server doesn't start, the cause will usually be revealed in catalina.out and stdout.log files. These files are typically located at:

 

/var/opt/mailarchiva/tomcat/logs (Linux)
C:ProgramDataMailArchivaTomcatlogs (Windows)

 

If the Tomcat directory does not exist, create it manually using File Explorer and restart MailArchiva service.

 

Another way to troubleshoot startup on Windows, is to run the MailArchiva process in console mode. Simply run C:Program FilesMailArchivaserverbinMailArchivaServer.exe from the command-line. It should output the reason why the server cannot start the console.

 

Upgrade to MailArchiva V8/V9

 

Server won't start due to the upgrade of MailArchiva. It may be necessary to follow these additional upgrade steps

 

Incorrect memory size allocation

 

The server may not start because:
 

a) MailArchiva has been allocated more RAM than is physically available on your machine

b) MailArchiva has been allocated too little RAM. The minimum amount of allocated RAM should be 384 MB

c) On 32 bit OS platforms, MailArchiva has been allocated more than 1512m (the limit on 32bit Windows OS)
 

How To Change Memory Settings: Refer to Memory Settings for details on how to adjust the product's memory allocation settings.

 

Virtual Environments (VM) Note: if you are running MailArchiva in a VM, you may need to edit your VM settings to allocate more RAM to the virtual environment

 

Common resolution

 

Linux repair

 

systemctl stop mailarchiva
Take note of heap space setting in /opt/mailarchiva/server/startserver CATALINA_OPTS
curl -sS https://bs.stimulustech.io/api/v1/download/product/maonprem/linux/latest | grep -oP '"downloadUrl": *"K[^"]*' | xargs curl | tar -xz -C /tmp && cd /tmp/mailarchiva_dist* && ./install
Please choose the same heap space setting as before.
mv /var/opt/mailarchiva/ROOT/queue/receive to mv /var/opt/mailarchiva/ROOT/queue/restore_receive
mv /var/opt/mailarchiva/ROOT/queue/index to mv /var/opt/mailarchiva/ROOT/queue/restore_index

It may also be necessary to clear the folder structures due to the Orient DB database corruption. Doing so will blow away folder structures, if any, but not user information. This is an optional step.

mv /var/opt/mailarchiva/ROOT/database/archiva /root/archiva (or backup location)

systemctl start mailarchiva

 

Windows repair

 

If the MailArchiva task tray applet isn't loaded, load it from the Windows program files menu.

Take note of Heap space settings in the MailArchiva applet. Right click Configure on the MailArchiva task tray applet, select Java tab ()
Download the latest setup from https://bs.stimulustech.io/downloads & run the setup
Follow the exact same heap space settings as used before.
Rename C:ProgramDataMailArchivawebappsROOTqueuereceive to C:ProgramDataMailArchivawebappsROOTqueuerestore_receive
Rename C:ProgramDataMailArchivawebappsROOTqueueindex to C:ProgramDataMailArchivawebappsROOTqueuerestore_index

It may also be necessary to clear the  folder structures due to Orient DB database corruption. Doing so will blow away folder structures, if any, but not user information. This is an optional step.

Rename C:ProgramDataMailArchivawebappsROOTdatabasearchiva to C:archiva (or backup location)
Start MailArchiva from service applet

 

If the server still doesn't start, examine the log files below for clues:
 

/var/opt/mailarchiva/tomcat/logs (Linux)
C:ProgramDataMailArchivaTomcatlogs (Windows)

 

Other reasons why the service won't start

 

Recently upgraded from a previous version (Windows)

 

If the server doesn't start after having recently upgraded from a previous version, it could be that there is a mix-up in program files. The steps to resolve are as follows:

 

Locked files during upgrade (WIndows)

 

While upgrading MailArchiva to a newer version, it is possible that the setup could not shut down the previous version of MailArchiva and its program files could not be overwritten. To resolve this, try switching the MailArchiva Windows service to manual start using the Windows Services applet and reboot the machine. Thereafter, after the machine is rebooted, rerun the installer. 

 

Common listening ports already taken

 

a) The server cannot listen on ports 8090, 8005, 8091, 8092, 8009 since they have already been taken

b) You can check if these ports are taken by doing the following:

From the Windows command-line, type:

 

netstat -abn > ports.txt
notepad ports.txt
ctrl+F to search for desired port
From the Linux commandline, type:
netstat -l | grep 8090


c) On Windows, you can run MailArchiva in Console mode by running the C:Program FilesMailArchivaServerbinMailArchivaServer.exe file.

d) In the console output, if it complains about a port conflict, you know you need to change ports.

e) On Linux, you should see the symptoms of a port conflict in the /usr/local/mailarchiva/server/logs/catalina.out file.

 

Resolution:


(a) Edit the file server.xml in C:Program FilesMailArchivaServerconf or /usr/local/mailarchiva/server/conf and change the ports

(b) Edit the 8091 (smtp) and 8092 (milter) ports in the MailArchiva server GUI or server.conf file
 
Port Information: Refer to Ports for an exhaustive list of ports used by MailArchiva.

 

VMWare Server and Symantec Antivirus often use ports 8005 and 8009, so you may need to switch these ports.
(We typically switch them to 8015, and 8019, respectively)

 

Directory and file interference


MailArchiva loads multiple tenants based on the contents of the instances and program directoryserverwebapps folders. If there are backup files and directories placed in these folders, system instability can result. The resolution is to:

 

 

Corrupted database

 

Safety Warning: If you delete the database, you will lose all folder and tree view information.

 

Stop the server

Rename [application data]/database to [application data]/database_bak

Start the server

 

Corrupted queue database

 

Safety Note: You will not lose any information by deleting the queue database.

 

It is possible that your queue database is corrupted. 

 

Stop the server

Delete the contents of [application data]/queue/ctl

Start the server

 

Multiple servers running


There are multiple instances of the server running.

From the Windows Task Manager, kill all Java processes before starting the server

On Linux, enter the following command in the command prompt:
 

killall java

 

Java runtime path issues


The location of the Java Runtime Environment is not on the PATH environment.

Resolution:

Add C:Program FilesMailArchivajrebin to the Windows PATH.
 

This advice should be taken especially in the case where you get procrun.c errors in C:Program FilesMailArchivaServerlogsjakarta_service*.log files.


C++ runtime libraries

 

In some installations, Tomcat may not be able to locate the C++ runtime libraries.


Resolution:

Copy C:Program FilesMailArchivajrebinmsvcr71.dll to C:WindowsSystem32 and restart the server.

 

Further debugging

 

If your problem is not helped by any of the above, startup errors are usually displayed in the catalina.out log, located at:
 

C:Program FilesMailArchivaserverlogscatalina.out (Windows)
C:Program FilesMailArchivaserverlogsstdout.log (Windows)

 

/var/opt/mailarchiva/tomcat/logs/catalina.out (Linux)
/var/opt/mailarchiva/tomcat/stdout.log (Linux)

 

Please also examine the log files in:

 

C:ProgramDataMailArchivaROOTlogs (Windows)
C:ProgramDataMailArchivacorelogs (Windows)

 

/var/log/mailarchiva/ROOT/logs (Linux)
/var/log/mailarchiva/core/logs (Linux)
Create your own Knowledge Base