jwolz / yajhfc

YajHFC (Yet another Java HylaFAX client) is a client for the HylaFAX fax server written completely in Java
https://www.yajhfc.de
Other
7 stars 1 forks source link

Issue with Debian 8 jessie #43

Closed jwolz closed 8 years ago

jwolz commented 8 years ago

Original report by Anonymous.


I've updated my debian server to jessie and now yajfhc does not connect to my server anymore. When I try to connect, I got the following Error message on a Archlinux machine and a Windows 7 machine

#!java

java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
    at gnu.inet.ftp.FtpClientProtocol.pass(FtpClientProtocol.java:263)
    at yajhfc.HylaClientManager.forceLogin(HylaClientManager.java:193)
    at yajhfc.model.servconn.hylafax.HylaFaxListConnection.connect(HylaFaxListConnection.java:181)
    at yajhfc.MainWin$LoginThread.run(MainWin.java:2970)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

YajHFC 0.6.0
Java 1.8.0_72 (Oracle Corporation)
OpenJDK Runtime Environment 1.8.0_72-b15
OpenJDK 64-Bit Server VM
Linux 4.3.3-3-ARCH (amd64)
jwolz commented 8 years ago

Original comment by Jonas Wolz (Bitbucket: jonaswolz, GitHub: jwolz).


Could you create a debugglng log and send me that by email?

To create such a log, start yajhfc with the "--debug --logfile=/path/to/logfile" command line parameters (e.g. "yajhfc --debug --logfile=/tmp/yajhfc.log").

jwolz commented 8 years ago

Original comment by Jonas Wolz (Bitbucket: jonaswolz, GitHub: jwolz).


Finally I got the time to analyze the problem:

It seems that your server sends an empty line in response to the password (the line after "FEIN: -> pass"):

#!
Mär 01, 2016 3:38:49 PM yajhfc.HylaClientManager forceLogin
FEIN: HylaClientManager -> forceLogin
Mär 01, 2016 3:38:49 PM gnu.hylafax.ClientProtocol open
FEIN: Connected to: HylaFAX (tm) Version 6.0.6
Mär 01, 2016 3:38:49 PM yajhfc.HylaClientManager forceLogin
INFORMATION: Greeting was: 220 xxx server (HylaFAX (tm) Version 6.0.6) ready.

Mär 01, 2016 3:38:49 PM gnu.inet.ftp.FtpClientProtocol user
FEIN: -> user xxx
Mär 01, 2016 3:38:49 PM gnu.inet.ftp.FtpClientProtocol user
FEIN: 331 Password required for xxx.

Mär 01, 2016 3:38:49 PM gnu.inet.ftp.FtpClientProtocol pass
FEIN: -> pass
Mär 01, 2016 3:38:49 PM gnu.inet.ftp.FtpClientProtocol pass
FEIN: 
Mär 01, 2016 3:38:49 PM yajhfc.util.ExceptionDialog initialize
WARNUNG: Exception occurred: Beim Verbindungsaufbau mit dem Server ist ein Fehler aufgetreten:
java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
    at gnu.inet.ftp.FtpClientProtocol.pass(FtpClientProtocol.java:263)
[...]

On my server (Debian Jessie, too), this looks different:

#!
Mrz 17, 2016 10:37:49 AM yajhfc.HylaClientManager forceLogin
FEIN: HylaClientManager -> forceLogin
Mrz 17, 2016 10:37:49 AM gnu.hylafax.ClientProtocol open
FEIN: Connected to: HylaFAX (tm) Version 6.0.6
Mrz 17, 2016 10:37:49 AM yajhfc.HylaClientManager forceLogin
INFORMATION: Greeting was: 220 ivy.local server (HylaFAX (tm) Version 6.0.6) ready.

Mrz 17, 2016 10:37:49 AM gnu.inet.ftp.FtpClientProtocol user
FEIN: -> user fax
Mrz 17, 2016 10:37:49 AM gnu.inet.ftp.FtpClientProtocol user
FEIN: 331 Password required for fax.

Mrz 17, 2016 10:37:49 AM gnu.inet.ftp.FtpClientProtocol pass
FEIN: -> pass
Mrz 17, 2016 10:37:49 AM gnu.inet.ftp.FtpClientProtocol pass
FEIN: 230 User fax logged in.

Mrz 17, 2016 10:37:49 AM gnu.hylafax.ClientProtocol tzone
FEIN: -> tzone LOCAL

I modified YajHFC so that empty lines in the server response are ignored. This version has been uploaded to http://download.yajhfc.de/betas/

Please try if this fixes the problem for you (or if you get a different error message).

jwolz commented 8 years ago

Original comment by Marc-Antón (Bitbucket: grossmaggul, ).


I tried the beat 0_6_1beta1 but the same problem is still there.

jwolz commented 8 years ago

Original comment by Jonas Wolz (Bitbucket: jonaswolz, GitHub: jwolz).


Have you tried if other clients work?

Could you also try if a "ftp -d 4559" from your Linux machine works and send me the output? (The HylaFAX protocol is FTP with some extensions, so you can use this to test the logon)

Thanks!

jwolz commented 8 years ago

Original comment by Marc-Antón (Bitbucket: grossmaggul, ).


O.K, tried that, it does not work, I get the following error(s)

#!java

Connected to 192.168.0.12.
220 <my server> server (HylaFAX (tm) Version 6.0.6) ready.
Name (192.168.0.12:<user>): 
---> USER <user>
331 Password required for <user>.
Password: 
---> PASS XXXXXXXXXXXXX
421 Service not available, remote server has closed connection
ftp: Login failed.
---> SYST
ftp: No control connection for command

I looked up with ps ax that the hylafax server is running, it does. Perhaps it has something to do with the name of Hylafax Daemon wich is hfaxd not hylafaxd, but I don't know. It seems to be a misconfiguration of hylafax, any hints?

I did not try any other client, is there another client for linux?

jwolz commented 8 years ago

Original comment by Jonas Wolz (Bitbucket: jonaswolz, GitHub: jwolz).


I only suggested another client because I wanted to find out if it is a client or a server problem. Since FTP does not work, another client would most likely not work either...

The problem certainly is not that the daemon is called hfaxd. On my server it looks like this:

#!
jonas@ivy:~$ ps ax|grep fax
 2038 ?        Ss     0:00 /usr/sbin/faxq
 2042 ?        S      0:00 /usr/sbin/hfaxd -d -i 4559
 2269 ?        Ss     0:00 /usr/sbin/faxgetty -D ttyIAX0

For a start, I would look if HylaFAX logs any errors to the server's syslog when you try to log in.

jwolz commented 8 years ago

Original comment by Jonas Wolz (Bitbucket: jonaswolz, GitHub: jwolz).


Closing this issue because it most likely is not a client problem, but a server configuration issue. Please reopen if this is not the case.