6.4. Connection Problems

6.4.1. Check if services are running

When you receive error Connection refused to host: <IP_ADDRESS> then it’s probably a problem with services (daemons).

To check if all services are running invoke this command on the mail server:

ps ax | grep msh

you should get results like this:

.../bin/java -Dfile.encoding=UTF8 -jar /opt/msh-traffic-policy/bin/jar/msh-tp-milter.jar
.../bin/java -Dfile.encoding=UTF8 -jar /opt/msh-traffic-policy/bin/jar/msh-tp-settings.jar

If services are not running (not present on process list), start them:

/etc/init.d/msh-tp-settings start
/etc/init.d/msh-tp-milter start

6.4.2. Check /etc/hosts file

When you receive error Connection refused to host: then it’s a problem with /etc/hosts file.

Now you have probably entries like this:   localhost   <something>

Java Runtime Environment have some difficulties to work with this configuration and it needs to be corrected, like this:       localhost
<YOUR_REAL_IP>  <hostname>.<domainname>

The most important part is <YOUR_REAL_IP>, it should be your real host IP, and line with IP must be removed.

After the changes restart services:

/etc/init.d/msh-tp-settings restart
/etc/init.d/msh-tp-milter restart

6.4.3. Force RMI hostname

When you receive error Connection refused to host: then RMI settings must be forced to use your host IP address.

Edit file /opt/msh-traffic-policy/bin/msh-tp-settings, and add -Djava.rmi.server.hostname=<YOUR_IP> to the file, like this (don’t forget to replace <YOUR_IP> value with host IP address, ie.

$JAVA_HOME/bin/java -Dfile.encoding=UTF8 -Djava.rmi.server.hostname=<YOUR_IP> -jar $INSTALL_DIR/bin...

After saving changes restart msh-tp-settings service:

/etc/init.d/msh-tp-settings restart

6.4.4. Check firewall

If application still cannot connect it maybe be a problem with blocked ports by firewall. The easiest way to check this is to turn firewall off for time of testing.

Turn off firewall (command for your distribution could be different):

/etc/init.d/iptables stop

Try to connect with Administrator Panel application. After testing turn on firewall again:

/etc/init.d/iptables start

If turning firewall cannot be done, then port 1101 and 1102 must be opened manually. They’re default ports for communication between server services and desktop application. Please refer to your distribution documentation how to open TCP ports.