Bug - Waiting for Info Not updating EasyFax list

Easyfax's list of available monsters on Sourceforge but mafia is not requesting a new list. the easyfax.xml file in the data directory hasn't been updated since January
 

lostcalpolydude

Developer
Staff member
I tried deleting easyfax.xml from my data folder, and got
Could not load easyfax configuration from "https://sourceforge.net/p/easyfax/code/HEAD/tree/Easyfax.xml?format=raw"
The URL seems to work fine...
 

heeheehee

Developer
Staff member
I tried deleting easyfax.xml from my data folder, and got

The URL seems to work fine...

The next line would be more useful...
Code:
		if ( FaxBotDatabase.faxBotError )
		{
			KoLmafia.updateDisplay( MafiaState.ABORT, "Could not load " + data.name + " configuration from \"" + data.URL + "\"" );
			RequestLogger.printLine( FaxBotDatabase.faxBotErrorMessage );
			return;
		}

edit: That said, I can't seem to reproduce this issue, as easyfax.xml materialized in my data/ directory just fine. Is it still happening for everyone else?
 

Veracity

Developer
Staff member
I stuck a stacktrace in the place where we got an IOException in FileUtilities.downloadFile and got this:

Code:
Unexpected error, debug log printed.
class javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
	at net.sourceforge.kolmafia.utilities.FileUtilities.downloadFile(FileUtilities.java:302)
	at net.sourceforge.kolmafia.persistence.FaxBotDatabase$DynamicBotFetcher.run(FaxBotDatabase.java:434)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:286)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:271)
	at net.sourceforge.kolmafia.persistence.FaxBotDatabase.configureFaxBot(FaxBotDatabase.java:150)
	at net.sourceforge.kolmafia.persistence.FaxBotDatabase.configureFaxBots(FaxBotDatabase.java:137)
	at net.sourceforge.kolmafia.persistence.FaxBotDatabase.configure(FaxBotDatabase.java:97)
	at net.sourceforge.kolmafia.swingui.FaxRequestFrame.<clinit>(FaxRequestFrame.java:91)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at net.sourceforge.kolmafia.KoLmafiaGUI.constructFrame(KoLmafiaGUI.java:236)
	at net.sourceforge.kolmafia.swingui.listener.DisplayFrameListener.execute(DisplayFrameListener.java:84)
	at net.sourceforge.kolmafia.swingui.listener.ThreadedListener.run(ThreadedListener.java:239)
	at net.sourceforge.kolmafia.RequestThread$SequencedRunnable.run(RequestThread.java:418)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	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)
It's not that we can't parse your file, currently, it's that some of us can't download it.

I was able to download it in my browser.
 

xKiv

Active member
I suppose the question then is - what version of java? Older versions of java may not support the version of ssl/tls required by sourceforge.
Or java does not know the root CA that signs sourceforge's certificate.
Or about a million other things that can manifest as a "handshake failure". Java really does not care about reporting what went wrong.
 

lostcalpolydude

Developer
Staff member
Java 1.8.0_40 here (which I realize could be updated, but I don't use Java for anything but this anyway), with the same log as Veracity.

The next line would be more useful...
You would think so from looking at that code, but
C:\path\to\files\easyfax.xml (The system cannot find the file specified)
(with an actual path) doesn't seem helpful.
 

heeheehee

Developer
Staff member
Code:
$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode

I fully expect to be an outlier, since I'm running this on Linux.

That said, it could very well be an issue with an older version of Java, although that does strike me as a bit strange.
 

xKiv

Active member
I believe java 7 shouldn't have the specific problem I described, but java 6 could (depending on patchlevel, and if it's oracle/openjdk/ibm java?).
 

heeheehee

Developer
Staff member
Code:
$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode

I fully expect to be an outlier, since I'm running this on Linux.

That said, it could very well be an issue with an older version of Java, although that does strike me as a bit strange.

Doubly so, since from another thread:
My test:

Code:
bash-3.2$ java -jar KoLmafia-17.5.jar 

KoLmafia v17.5 r17696
Released on November 22, 2016

Currently Running on Mac OS X
Local Directory is /Users/xxx/Library/Application Support/KoLmafia
Using Java 1.8.0_121
It compiles and executes just fine with the latest Java 1.8 release.

Veracity is using at least a similar version of Java.
 

Veracity

Developer
Staff member
Yes. I'm still using that version of Java.

I deleted (renamed) the old easyfax.xml and, unlike certain others, get the same stack trace trying to download the XML file.

I copied the xml file I downloaded with my browser to the data directory and KoLmafia read that successfully, at least.
 

Veracity

Developer
Staff member
I recently upgraded my computer and tried running Eclipse for the first time - and am told that I "need to install Legacy Java 1.6" in order to do so. So, I upgraded Eclipse and am now trying to get back up to speed with my KoLmafia workspace so I can try debugging this.
 
I am now getting it on Java 8 131. I can post a debug log if needed. I think my previous was because I manually downloaded the file.
 

heeheehee

Developer
Staff member
Hm.

Per http://stackoverflow.com/questions/30350120/sslhandshakeexception-while-connecting-to-a-https-site --
Java crypto has a crock dating back to the 1990s when the US government severely restricted export of crypto software, and as a result the JRE (or JDK) as distributed by then-Sun now-Oracle does not permit use of 256-bit symmetric encryption

ssllabs indicates that sourceforge.net only supports the following cipher suites:
Cipher Suites
# TLS 1.2 (suites in server-preferred order)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014) ECDH secp256r1 (eq. 3072 bits RSA) FS 256
TLS_RSA_WITH_AES_256_CBC_SHA (0x35) 256
TLS_RSA_WITH_AES_256_CBC_SHA256 (0x3d) 256
i.e., all of them are 256-bit.
 

heeheehee

Developer
Staff member
So yeah, basically I'm an outlier because I'm running OpenJDK on Linux, which has no such restrictions. Neat.
 
Top