Proxy wont allow license validation

Need help? Post your questions here.
Jay Freeman
Posts: 16
Joined: 25 May 2016, 14:57
Has thanked: 0
Been thanked: 7 times

Proxy wont allow license validation

Unread post by Jay Freeman »

I am running madsonic at work, but the network I am on is behind a proxy. I am unable to validate my license, and see the following error in the logs:

Code: Select all

[2016-06-15 12:30:53,623] WARN SettingsService - Failed to validate license.
org.apache.http.conn.HttpHostConnectException: Connect to beta.madsonic.org:80 [beta.madsonic.org/52.1.190.210] failed: Connection timed out: connect
If I switch to another less secure network that does not have the proxy, then I don't see this error and I am able to validate my license. However this is not an ideal solution, I need to be on the secure network.

Is there another workaround?

Thanks
Jay Freeman
Posts: 16
Joined: 25 May 2016, 14:57
Has thanked: 0
Been thanked: 7 times

Re: Proxy wont allow license validation

Unread post by Jay Freeman »

I have tried setting the following in the vmoptions file

Code: Select all

-Dhttp.proxyHost=......
-Dhttp.proxyPort=......
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
I've also set them as environment variables (JAVA_OPTS) and in the java control panel, still no joy. I had a quick look at the source to communicate with the madsonic server and the class isn't proxying anything.

Nor does this work

Code: Select all

java -DproxySet=true -DproxyHost=..... -DproxyPort=..... -jar madsonic-booter.jar
Jay Freeman
Posts: 16
Joined: 25 May 2016, 14:57
Has thanked: 0
Been thanked: 7 times

Re: Proxy wont allow license validation

Unread post by Jay Freeman »

A quick test in SettingsService.java

Code: Select all

public void validateLicense() {
// code snipped
HttpHost proxy = new HttpHost(proxyServer, proxyPort, "http");
	        RequestConfig requestConfig = RequestConfig.custom()
					.setProxy(proxy)
// code snipped
}

Seems to work for me (made the same change to isLicenseKeyValid() also), my license is validated
These users thanked the author Jay Freeman for the post:
Madsonic
Rating: 7.69%
Post Reply