7.4. Connection Problems¶
Contents
7.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:
/opt/jvm/bin/java -Dfile.encoding=UTF8 -jar /opt/msh-ds/bin/jar/msh-ds-milter.jar
/opt/jvm/bin/java -Dfile.encoding=UTF8 -jar /opt/msh-ds/bin/jar/msh-ds-settings.jar
If services are not running (not present on process list), start them:
/etc/init.d/msh-ds-settings start
/etc/init.d/msh-ds-milter start
If still they don’t start check these log files:
/opt/msh-ds/var/log/milter.out
/opt/msh-ds/var/log/settings.out
7.4.2. Check /etc/hosts file¶
When you receive error Connection refused to host: 127.0.1.1
then it’s a problem with /etc/hosts
file.
Now you have probably entries like this:
127.0.0.1 localhost
127.0.1.1 <something>
Java Runtime Environment have some difficulties to work with this configuration and it needs to be corrected, like this:
127.0.0.1 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 127.0.1.1
must be removed.
After the changes restart services:
/etc/init.d/msh-ds-settings restart
/etc/init.d/msh-ds-milter restart
7.4.3. Force RMI hostname¶
When you receive error Connection refused to host: 127.0.0.1
then RMI settings must be forced to use your host IP address.
Edit file /opt/msh-ds/bin/msh-ds-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. 192.168.1.100):
$JAVA_HOME/bin/java \
-Djava.rmi.server.hostname=<YOUR_IP> \
...
After saving changes restart msh-ds-settings
service:
/etc/init.d/msh-ds-settings restart
7.4.4. Force application to listen on IPv4 ports¶
Edit fie /opt/msh-ds/bin/msh-ds-settings
and add -Djava.net.preferIPv4Stack=true
to the file, like this:
$JAVA_HOME/bin/java \
-Djava.net.preferIPv4Stack=true \
...
Save changes and restart msh-ds-settings
service:
/etc/init.d/msh-ds-settings restart
7.4.5. 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 1107 and 1108 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.