Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Frequently asked questions

...

Which versions of Java are supported?

MessageHandler runs only with Oracle Javahas only been tested mit Java 8. The following versions are supported:

  • Java 7: 64/32 bit on Linux, 32bit on WindowsJava 8: 64/32 bit on Linux, 32bit on Windows. Any OpenJDK based distribution will do.

Note: the Unlimited Strength Jurisdiction Policy Files must be provided in the Java installation, if you plan to use the PDF signing feature of MessageHandler. The Unlimited Strength Jurisdiction Policy Files must be downloaded from the Oracle website. For Java 7, for Java 8. These files are included by default in distributions since Java 8 update 151.

Installation on Microsoft Windows

...

MSI Installer on Windows refuses to install MessageHandler

Execute the MSI installation from the command line. This way the installation process produces a logfile, which may (on may not) contain valuable information. 

Code Block
msiexec /i "C:\MessageHandler.msi" /L*V "C:\MessageHandler_Installer.log"

MessageHandler To diagnose the problem, inspect the file c:\Program Files (x86)\Open eGov MessageHandler\log\message-handler.log , while the MSI Installer still displays this error dialog:

Image Added


Note, that MessageHandler refuses to install, if you specified specify directories in the installations wizard,

  • which do not

...

  • exist! 
    Inspect the installation logfile and search for error messages

...

  • like 

    No Format
    MSI (c) (7C:54) [14:32:12:501]: Note: 1: 1314 2: /Program Files/Sedexclient/interface 
    MSI (c) (7C:54) [14:32:15:251]: Product: Open eGov MessageHandler -- Error 1314. The specified path '/Program Files/Sedexclient/interface' is unavailable.
MSI Installer fails to install or uninstall MessageHandler

Do not remove the service or installed files manually! This will break the process of uninstalling the software and thus will lead to the impossibility to reinstall and/or update MessageHandler.

However if you are in the situation that neither uninstalling nor installing works please run the appropriate Microsoft Fix-it to return to a working state.

Download Microsoft Fix-it from support.microsoft.com or download it from Open eGov Wiki.

Installation on servers in Windows Domains

The local service account has to be used, if the server is a member in a Windows domain. Using a domain with local adminstrator rights will not work.

How to configure directory and file names for Windows?

Under Windows we recommend using absolute path names including either drive name or UNC paths. For MessageHandler prior to version 3.1.2 we recommend using slashes as path separators:

Code Block
C:/sedex/inbox

d:/data/messagehandler/inbox
//fileserver.some.domain.ch/sedex/outbox
MessageHandler doesn't seem to see mounted remote directories on Windows

Suppose you configured an inbox located on a mounted remoted directory such as

...


  • to which the chosen Service User Account does not have sufficient access rights. In this case the MH service will refuse to start in the installation process and the installation fails.

Alternatively: Execute the MSI installation from the command line. This way the installation process produces a logfile, which may (on may not) contain valuable information. 

Code Block
msiexec /i "C:\MessageHandler.msi" /L*V "C:\MessageHandler_Installer.log"
MSI Installer fails to uninstall MessageHandler

Do not remove the service or installed files manually! This will break the process of uninstalling the software and thus will lead to the impossibility to reinstall and/or update MessageHandler.

However if you are in the situation that neither uninstalling nor installing works please run the appropriate Microsoft Fix-it to return to a working state.

Download Microsoft Fix-it from support.microsoft.com or download it from Open eGov Wiki.

Installation on servers in Windows Domains

The local service account has to be used, if the server is a member in a Windows domain. Using a domain with local adminstrator rights will not work.

How to configure directory and file names for Windows?

Under Windows we recommend using absolute path names including either drive name or UNC paths. For MessageHandler prior to version 3.1.2 we recommend using slashes as path separators:

Code Block
C:/sedex/inbox

d:/data/messagehandler/inbox
//fileserver.some.domain.ch/sedex/outbox
MessageHandler doesn't seem to see mounted remote directories on Windows

Suppose you configured an inbox located on a mounted remoted directory such as

Code Block
<outbox dirPath="O:/application_a/interface/outbox" msgType="10301">

...

  • Installieren Sie pro gewünschte MessageHandler Instanz einen sedex Client. Die Installation und Konfiguration mehrerer sedex Clients ist hier nicht beschrieben. Fahren Sie erst weiter, wenn jede der sedex Client Instanzen korrekt funktioniert.
  • Sie brauchen pro MessageHandler Instanz ein separates Installationsverzeichnis (z.B. c:\mh-SEDEXID, wo SEDEXID die sedex ID des entsprechenden eSchKG Teilnehmers ist) und separate Arbeitsverzeichnisse.
  • Passen Sie die Variablen wrapper.ntservice.namewrapper.ntservice.displaynamewrapper.ntservice.description in der Datei conf/wrapper.conf jeder Instanz entsprechend Ihren Bedürfnissen an.
  • Passen Sie den Port der Webservice Schnittstelle von Messagehandler in jeder Instanz an (Attribut /config/messageHandler/webserviceInterface/@port in der Datei conf/config.xml). Jede Instanz braucht einen eigenen Port, sonst kann der Messagehandler den Webservice nicht starten.

MessageHandler logs an ERROR on startup

If starting MessageHandler for the first time after a fresh installation, you will notice the following error message in the file 

Code Block
[ERROR] WrapperListener_start_runner DbLogService Table not found in 
statement [DELETE FROM status WHERE (received_date IS NULL AND 
DATEDIFF('dd', sent_date, CURRENT_TIMESTAMP) > ?) OR DATEDIFF('dd', 
received_date, CURRENT_TIMESTAMP) > ?] Query: DELETE FROM status WHERE 
(received_date IS NULL AND DATEDIFF('dd', sent_date, CURRENT_TIMESTAMP) > ?) 
OR DATEDIFF('dd', received_date, CURRENT_TIMESTAMP) > ? Parameters: [2, 2]

This error message can be ignored, as a automatic cleanup job of MessageHandler tries to cleanup a database table, which has not yet been created.

MessageHandler Service refuses to start with an SQLException

A known bug in MH prior to version 3.4 (on Windows only!) corrupts the status database. If you encounter the following log entry in wrapper.log upon startup of MH

No Format
INFO   | jvm 1    | 2019/05/22 09:38:19 | Exception in thread "Thread-2" java.lang.IllegalStateException: log service cannot be started: java.sql.SQLException: Table already exists: STATUS in statement [CREATE CACHED TABLE status] Query: CREATE CACHED TABLE status (participant_id VARCHAR(255) NOT NULL, filename VARCHAR(255) NOT NULL, message_id VARCHAR(255), sent_date DATETIME, received_date DATETIME, status TINYINT NOT NULL, source TINYINT NOT NULL, UNIQUE (participant_id, filename)) Parameters: []
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.startLogService(MessageHandler.java:180)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.run(MessageHandler.java:165)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at java.lang.Thread.run(Thread.java:748)
STATUS | wrapper  | 2019/05/22 09:38:21 | <-- Wrapper Stopped

the following workaround gets MH going again:

How to upgrade a MH installation on Windows

If you installed MH using the MSI installer, be aware, that the installer always performs a completely new installation. It is not conceive to perform an upgrade! So back-up your MH configuration before installing the new version.

To upgrade:

  • Stop the MH service.
  • Backup at least the directories listed below. Recommended: backup the whole server before proceeding.
  • Uninstall the older version.
  • Install the new version. During the installation process, you must list the same directories that the previous installation referenced (sedex directory, etc.)

The MH configuration file config.xml lists all the directories and files to back up. The XML elements referencing the directories to back up are:

  • /config/messageHandler/workingDir
  • /config/messageHandler/statusDatabase
How to upgrade a MH installation on Linux

Since the installation of the Linux distribution is not carried out with a installer, an upgrade can be done fairly easy.

Suppose, you have installed MH under ${INSTALL_DIR}. To upgrade:

  • Unpack the distro unter ${DISTRO_DIR}
  • Stop the MH service.
  • Remove the current version of MH with

    Code Block
    languagebash
    themeEmacs
    rm ${INSTALL_DIR}/lib/*


  • Install the new version with 

    Code Block
    languagebash
    themeEmacs
    cp ${DISTRO_DIR}/lib/* ${INSTALL_DIR}/lib/*


  • Start the MH service

MessageHandler logs an ERROR on startup

If starting MessageHandler for the first time after a fresh installation, you will notice the following error message in the file 

Code Block
[ERROR] WrapperListener_start_runner DbLogService Table not found in 
statement [DELETE FROM status WHERE (received_date IS NULL AND 
DATEDIFF('dd', sent_date, CURRENT_TIMESTAMP) > ?) OR DATEDIFF('dd', 
received_date, CURRENT_TIMESTAMP) > ?] Query: DELETE FROM status WHERE 
(received_date IS NULL AND DATEDIFF('dd', sent_date, CURRENT_TIMESTAMP) > ?) 
OR DATEDIFF('dd', received_date, CURRENT_TIMESTAMP) > ? Parameters: [2, 2]

This error message can be ignored, as a automatic cleanup job of MessageHandler tries to cleanup a database table, which has not yet been created.

MessageHandler Service refuses to start with an SQLException

A known bug in MH prior to version 3.4.0 (on Windows only!) corrupts the status database. If you encounter a log entry complaining about an java.sql.SQLException  in wrapper.log or message-handler.log  upon startup of MH such as

No Format
INFO   | jvm 1    | 2019/05/22 09:38:19 | Exception in thread "Thread-2" java.lang.IllegalStateException: log service cannot be started: java.sql.SQLException: Table already exists: STATUS in statement [CREATE CACHED TABLE status] Query: CREATE CACHED TABLE status (participant_id VARCHAR(255) NOT NULL, filename VARCHAR(255) NOT NULL, message_id VARCHAR(255), sent_date DATETIME, received_date DATETIME, status TINYINT NOT NULL, source TINYINT NOT NULL, UNIQUE (participant_id, filename)) Parameters: []
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.startLogService(MessageHandler.java:180)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.run(MessageHandler.java:165)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at java.lang.Thread.run(Thread.java:748)
STATUS | wrapper  | 2019/05/22 09:38:21 | <-- Wrapper Stopped

or  

No Format
Caused by: java.sql.SQLException: Violation of unique index SYS_IDX_47: duplicate value(s) for column(s)  in statement [UPDATE status SET status = ?, received_date = ? WHERE message_id = ?] Query: UPDATE status SET status = ?, received_date = ? WHERE message_id = ? Parameters: [2, 2019-11-25 08:37:31.217, fa3d12fa-d16c-4d54-af45-27ea311cafb9]


the following instructions get MH going again:

  • run MH on Linux (smile) This behaviour never occured on Linux.
  • If you prefer to stay on Windows:
    • Make sure that MH is not running.
    • Remove the files of the MH database from the directory 'db'. The directory is located underneath the directory configured in the config element <workingDir dirPath="..."/> in the config.xml file.
    • Decrease the value of the attribute dataHoldTimeInDays  in the element <statusDatabase>. A value of 2 is usually enough.
    • Upgrade to MH v 3.4.0
    • Start MH.

(warning) be aware of the fact, that with this workaround you remove the status database. If your application check checks the status of message messages using the MH REST interface, you will loose the state information of not already delivered messages! In this case you must probably change the state of these messages manually in your applications database.

...

Reason: your Java installation does not have the Unlimited Strength Jurisdiction Policy Files installed. 

Is MessageHandler affected by "Log4Shell" vulnerability?

Although MessageHandler uses the log4j software library, MessageHandler is not affected by the vulnerability. The reason is that MessageHandler uses an older version of log4j, which is not vulnerable.

Please note that the sedex client, with which MessageHandler work together, is also not vulnerable in versions > 5.0.