Logging in works, but then a connection timeout occurs

In some circumstances, you might experience the following problem:

  • Loggging into the HylaFAX server works
  • The Test connection button in the Options dialog shows a successful connection
  • But when you try to connect to the server in the YajHFC main window, you will get an error similar to:
    yajhfc.model.servconn.hylafax.HylaFaxListConnection$StatusRefresher run
    WARNING: Socket Error refreshing the status, logging out.
    java.net.ConnectException: Connection timed out: connect
      at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    Other possible errors are Network unreachable or Connection refused.
  • Solution

    Most likely this is some problem with your firewall and not a issue in YajHFC.

    The HylaFAX protocol is basically "extended FTP" and like FTP, it uses separate control and data connections, with all the problems firewalls typically have with this. (see this site for a longer explanation how FTP works)
    So, it is usually not sufficient to just allow port 4559 through the firewall (i.e. the control connection), because the data connections must be allowed, too.

    In YajHFC you can configure if active mode (data connection is opened in direction server→client) or passive mode (data connection opened client→server) should be used. The port ranges used cannot be configured on a per application basis, however (it is possible to configure the "temporary"/ephemereal port ranges globally, but changing this may have other side effects).

    The best solution to this problem (if possible) usually is to activate the firewall's FTP support and to tell the firewall that you are using FTP over port 4559.