CFHTTP can retrieve URL OK, fails as scheduled task

I’m using the latest Lucee stable on Amazon Linux with the 1.8 JVM.

I can CFHTTP a URL for one of our projects fine (response code 200,
fileContent as expected).

If I use that same URL in the admin as a scheduled task, I get an error
logged as ‘SSLPeerUnverifiedException: peer not authenticated’.
The site is over SSL, and we’ve not applied the manual steps from
https://luceeserver.atlassian.net/browse/LDEV-292 as yet, because I’m not
sure it should help, if CFHTTP is happy with it, surely ?

Why is the admin different ?

Here’s the full error :

“ERROR”,“Thread-6313”,“07/22/2015”,“13:12:19”,"","schedule
task:update_expire_state;peer not
authenticated;javax.net.ssl.SSLPeerUnverifiedException: peer not
authenticated
at
sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
at
org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at
org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:416)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at
lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at
lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)

Which version of Lucee are you running Tom?

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.orgOn 22 July 2015 at 14:16, Tom Chiverton <@Tom_Chiverton> wrote:

I’m using the latest Lucee stable on Amazon Linux with the 1.8 JVM.

I can CFHTTP a URL for one of our projects fine (response code 200,
fileContent as expected).

If I use that same URL in the admin as a scheduled task, I get an error
logged as ‘SSLPeerUnverifiedException: peer not authenticated’.
The site is over SSL, and we’ve not applied the manual steps from
https://luceeserver.atlassian.net/browse/LDEV-292 as yet, because I’m not
sure it should help, if CFHTTP is happy with it, surely ?

Why is the admin different ?

Here’s the full error :

“ERROR”,“Thread-6313”,“07/22/2015”,“13:12:19”,"","schedule
task:update_expire_state;peer not
authenticated;javax.net.ssl.SSLPeerUnverifiedException: peer not
authenticated
at
sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
at
org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at
org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:416)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at
lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at
lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/c35df143-74cb-4ed7-80fc-cc06c15ea1d4%40googlegroups.com
https://groups.google.com/d/msgid/lucee/c35df143-74cb-4ed7-80fc-cc06c15ea1d4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Tom, Did you install the SSL cert on the server? I’ve seen this error with
scheduled tasks over ssl - the solution has been to install the cert in the
java keystore. Lucee makes this easy, I believe, with an UI feature in the
administrator.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamediaOn Wed, Jul 22, 2015 at 3:42 PM, Tom Chiverton <@Tom_Chiverton> wrote:

Ohh, and also the URL from LDEV-292 that was problmatic,
https://maps.googleapis.com/maps/api/geocode/json, returns fine on the
server as well.

So I think something in the Lucee Admin must be different ?

Tom


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/66ae3fc2-2b37-4435-9eef-f49f476932b1%40googlegroups.com
https://groups.google.com/d/msgid/lucee/66ae3fc2-2b37-4435-9eef-f49f476932b1%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

I took the three jars from LDEV-292 and the error changed to

Exception in thread “Thread-10” java.lang.NoClassDefFoundError:
org/apache/http/client/methods/HttpUriRequest
at lucee.commons.net.http.HTTPEngine.header(HTTPEngine.java:115)
at
lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:85)
at
lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)
Caused by: java.lang.ClassNotFoundException:
org.apache.http.client.methods.HttpUriRequest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at lucee.loader.classloader.LuceeClassLoader.loadClass(Unknown
Source)
at lucee.loader.classloader.LuceeClassLoader.loadClass(Unknown
Source)
… 3 more

Taking just the two you linked to instead gives

Exception in thread “Thread-12” java.lang.NoClassDefFoundError:
org/apache/http/config/Lookup
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.privateGetMethodRecursive(Class.java:3058)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:415)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at
lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at
lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)
Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 24 more

TomOn Wednesday, July 22, 2015 at 4:22:18 PM UTC+1, Andrew Dixon wrote:

Did you update the JAR files? These are not included by the automatic
updater? You need to download them and update them manually and then
restart you servlet container:

https://github.com/lucee/Lucee4/blob/master/lucee-java/libs/apache-commons-httpclient.jar

https://github.com/lucee/Lucee4/blob/master/lucee-java/libs/apache-commons-httpmime.jar

Also there is another ticket on 4.5.2.000 (currently on the “dev” channel
only) that fixes further SSL issues.

https://luceeserver.atlassian.net/browse/LDEV-429

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

On 22 July 2015 at 14:30, Tom Chiverton <tom.ch...@gmail.com <javascript:> wrote:

The latest stable, 4.5.1.022.

I should also say that wget is happy retrieving the URL too, so it’s not
an SSL setup issue.

Tom

On 22 July 2015 at 14:28, Andrew Dixon <andrew...@gmail.com <javascript:> wrote:

Which version of Lucee are you running Tom?

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

On 22 July 2015 at 14:16, Tom Chiverton <tom.ch...@gmail.com <javascript:>> wrote:

I’m using the latest Lucee stable on Amazon Linux with the 1.8 JVM.

I can CFHTTP a URL for one of our projects fine (response code 200,
fileContent as expected).

If I use that same URL in the admin as a scheduled task, I get an error
logged as ‘SSLPeerUnverifiedException: peer not authenticated’.
The site is over SSL, and we’ve not applied the manual steps from
https://luceeserver.atlassian.net/browse/LDEV-292 as yet, because I’m
not sure it should help, if CFHTTP is happy with it, surely ?

Why is the admin different ?

Here’s the full error :

“ERROR”,“Thread-6313”,“07/22/2015”,“13:12:19”,"","schedule
task:update_expire_state;peer not
authenticated;javax.net.ssl.SSLPeerUnverifiedException: peer not
authenticated
at
sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
at
org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at
org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.execute(HTTPEngine4Impl.java:416)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl._invoke(HTTPEngine4Impl.java:252)
at
lucee.commons.net.http.httpclient4.HTTPEngine4Impl.get(HTTPEngine4Impl.java:112)
at lucee.commons.net.http.HTTPEngine.get(HTTPEngine.java:86)
at
lucee.runtime.schedule.ExecutionThread.execute(ExecutionThread.java:108)
at
lucee.runtime.schedule.ExecutionThread.run(ExecutionThread.java:58)


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/c35df143-74cb-4ed7-80fc-cc06c15ea1d4%40googlegroups.com
https://groups.google.com/d/msgid/lucee/c35df143-74cb-4ed7-80fc-cc06c15ea1d4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/xpCWBzD2ci0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVg4R9Obtu63rw%3DY-4bayvbvpkgnRjtTyevQP2FfzawOw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijVg4R9Obtu63rw%3DY-4bayvbvpkgnRjtTyevQP2FfzawOw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Tom


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAKS-b5sBgaVStg%3DhSZfizZeyvUjHKtu1QHgyQ2iNGKRT25gd%2Bg%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAKS-b5sBgaVStg%3DhSZfizZeyvUjHKtu1QHgyQ2iNGKRT25gd%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.