Bug 1124326 - ovirt-optimizer cluster discovery fails on https
Summary: ovirt-optimizer cluster discovery fails on https
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Martin Sivák
QA Contact: Pavel Stehlik
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-29 09:06 UTC by Lior Vernia
Modified: 2016-02-10 19:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:45:00 UTC
oVirt Team: SLA


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 30792 None None None Never
oVirt gerrit 31313 None None None Never

Description Lior Vernia 2014-07-29 09:06:02 UTC
Description of problem:

It seems like ovirt-optimizer is attempting to perform cluster discovery by querying the ovirt-engine API, yet ovirt-engine redirects the requests to https, which then fails.


Version-Release number of selected component (if applicable):

oVirt 3.5, second test day.


How reproducible:

Always, both on jboss and on jetty.


Steps to Reproduce:
1. Install ovirt-optimizer (either application server) on one machine.
2. Install ovirt-engine and ovirt-optimizer-ui on either the same machine or another.
3. Take a look at the application server log on the optimizer machine.

Actual results:

The following error on jboss:

11:43:35,976 INFO  [org.ovirt.optimizer.service.ClusterDiscovery] (oVirtOptimizerScheduler_Worker-1) Starting cluster discovery
11:43:35,977 DEBUG [org.ovirt.optimizer.service.OvirtClient] (oVirtOptimizerScheduler_Worker-1) Logging to http://10.35.17.245:80/ovirt-engine/api as admin@internal
11:43:35,980 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (oVirtOptimizerScheduler_Worker-1) Connection request: [route: {}->http://10.35.17.245:80][total kept alive: 0; route allocated: 0 of
 50; total allocated: 0 of 20]
11:43:35,981 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (oVirtOptimizerScheduler_Worker-1) Connection leased: [id: 2][route: {}->http://10.35.17.245:80][total kept alive: 0; route allocated
: 1 of 50; total allocated: 1 of 20]
11:43:35,981 DEBUG [org.apache.http.impl.conn.DefaultClientConnectionOperator] (oVirtOptimizerScheduler_Worker-1) Connecting to 10.35.17.245:80
11:43:35,982 DEBUG [org.apache.http.client.protocol.RequestAddCookies] (oVirtOptimizerScheduler_Worker-1) CookieSpec selected: best-match
11:43:35,983 DEBUG [org.apache.http.client.protocol.RequestAuthCache] (oVirtOptimizerScheduler_Worker-1) Auth cache not set in the context
11:43:35,983 DEBUG [org.apache.http.client.protocol.RequestTargetAuthentication] (oVirtOptimizerScheduler_Worker-1) Target auth state: UNCHALLENGED
11:43:35,983 DEBUG [org.apache.http.client.protocol.RequestProxyAuthentication] (oVirtOptimizerScheduler_Worker-1) Proxy auth state: UNCHALLENGED
11:43:35,983 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (oVirtOptimizerScheduler_Worker-1) Attempt 1 to execute request
11:43:35,983 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (oVirtOptimizerScheduler_Worker-1) Sending request: GET /ovirt-engine/api HTTP/1.1
11:43:35,986 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "GET /ovirt-engine/api HTTP/1.1[\r][\n]"
11:43:35,987 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "Content-type: application/xml[\r][\n]"
11:43:35,987 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "Filter: false[\r][\n]"
11:43:35,987 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "Prefer: persistent-auth[\r][\n]"
11:43:35,987 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "Host: 10.35.17.245:80[\r][\n]"
11:43:35,988 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "Connection: Keep-Alive[\r][\n]"
11:43:35,988 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "User-Agent: Apache-HttpClient/4.2.5 (java 1.5)[\r][\n]"
11:43:35,988 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) >> "[\r][\n]"
11:43:35,988 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> GET /ovirt-engine/api HTTP/1.1
11:43:35,988 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> Content-type: application/xml
11:43:35,989 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> Filter: false
11:43:35,989 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> Prefer: persistent-auth
11:43:35,989 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> Host: 10.35.17.245:80
11:43:35,989 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> Connection: Keep-Alive
11:43:35,989 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) >> User-Agent: Apache-HttpClient/4.2.5 (java 1.5)
11:43:36,002 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (Thread-63) Closing expired connections
11:43:36,003 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (Thread-63) Closing connections idle longer than 30 SECONDS
11:43:36,181 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "HTTP/1.1 302 Moved Temporarily[\r][\n]"
11:43:36,182 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Date: Tue, 29 Jul 2014 08:43:35 GMT[\r][\n]"
11:43:36,182 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips[\r][\n]"
11:43:36,182 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Pragma: No-cache[\r][\n]"
11:43:36,182 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Cache-Control: no-cache[\r][\n]"
11:43:36,183 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Expires: Thu, 01 Jan 1970 02:00:00 IST[\r][\n]"
11:43:36,183 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Location: https://10.35.17.245/ovirt-engine/api[\r][\n]"
11:43:36,183 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Content-Length: 0[\r][\n]"
11:43:36,183 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Keep-Alive: timeout=5, max=100[\r][\n]"
11:43:36,184 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "Connection: Keep-Alive[\r][\n]"
11:43:36,184 DEBUG [org.apache.http.wire] (oVirtOptimizerScheduler_Worker-1) << "[\r][\n]"
11:43:36,184 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (oVirtOptimizerScheduler_Worker-1) Receiving response: HTTP/1.1 302 Moved Temporarily
11:43:36,184 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << HTTP/1.1 302 Moved Temporarily
11:43:36,184 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Date: Tue, 29 Jul 2014 08:43:35 GMT
11:43:36,185 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips
11:43:36,185 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Pragma: No-cache
11:43:36,185 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Cache-Control: no-cache
11:43:36,185 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Expires: Thu, 01 Jan 1970 02:00:00 IST
11:43:36,185 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Location: https://10.35.17.245/ovirt-engine/api
11:43:36,186 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Content-Length: 0
11:43:36,186 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Keep-Alive: timeout=5, max=100
11:43:36,186 DEBUG [org.apache.http.headers] (oVirtOptimizerScheduler_Worker-1) << Connection: Keep-Alive
11:43:36,186 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (oVirtOptimizerScheduler_Worker-1) Connection can be kept alive for 5000 MILLISECONDS
11:43:36,187 DEBUG [org.apache.http.impl.client.DefaultRedirectStrategy] (oVirtOptimizerScheduler_Worker-1) Redirect requested to location 'https://10.35.17.245/ovirt-engine/api'
11:43:36,187 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (oVirtOptimizerScheduler_Worker-1) Resetting target auth state
11:43:36,188 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (oVirtOptimizerScheduler_Worker-1) Connection 0.0.0.0:51706<->10.35.17.245:80 shut down
11:43:36,188 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (oVirtOptimizerScheduler_Worker-1) Connection 0.0.0.0:51706<->10.35.17.245:80 closed
11:43:36,188 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (oVirtOptimizerScheduler_Worker-1) Connection released: [id: 2][route: {}->http://10.35.17.245:80][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 20]
11:43:36,189 ERROR [org.ovirt.optimizer.service.ClusterDiscovery] (oVirtOptimizerScheduler_Worker-1) Cluster discovery failed: org.apache.http.client.ClientProtocolException
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:909) [httpclient.jar:4.2.5]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) [httpclient.jar:4.2.5]
        at org.ovirt.engine.sdk.web.ConnectionsPool.execute(ConnectionsPool.java:96) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.web.HttpProxy.execute(HttpProxy.java:114) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.web.HttpProxyBroker.get(HttpProxyBroker.java:414) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.web.HttpProxyBroker.get(HttpProxyBroker.java:393) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.Api.getEntryPoint(Api.java:534) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.Api.initResources(Api.java:546) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.engine.sdk.Api.<init>(Api.java:239) [ovirt-engine-sdk-java.jar:]
        at org.ovirt.optimizer.service.OvirtClient.connect(OvirtClient.java:56) [ovirt-optimizer-core.jar:]
        at org.ovirt.optimizer.service.ClusterDiscovery.getClusters(ClusterDiscovery.java:35) [ovirt-optimizer-core.jar:]
        at org.ovirt.optimizer.service.OptimizerServiceBean.discoveryTimeout(OptimizerServiceBean.java:75) [ovirt-optimizer-core.jar:]
        at org.ovirt.optimizer.service.OptimizerServiceBean$Proxy$_$$_WeldClientProxy.discoveryTimeout(OptimizerServiceBean$Proxy$_$$_WeldClientProxy.java) [ovirt-optimizer-core.jar:]
        at org.ovirt.optimizer.service.DiscoveryTimeout.execute(DiscoveryTimeout.java:18) [ovirt-optimizer-core.jar:]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz.jar:]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz.jar:]
Caused by: org.apache.http.HttpException: Scheme 'https' not registered.
        at org.apache.http.impl.conn.DefaultHttpRoutePlanner.determineRoute(DefaultHttpRoutePlanner.java:115) [httpclient.jar:4.2.5]
        at org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:791) [httpclient.jar:4.2.5]
        at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1129) [httpclient.jar:4.2.5]
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:548) [httpclient.jar:4.2.5]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) [httpclient.jar:4.2.5]
        ... 15 more

11:43:36,194 ERROR [org.ovirt.optimizer.service.OptimizerServiceBean] (oVirtOptimizerScheduler_Worker-1) Cluster discovery failed

Similar error on jetty.


Expected results:

No errors, some sort of result at http://<optimizer-ip>:8080/ovirt-optimizer/result/ (instead of 404).


Additional info:

Comment 1 Sandro Bonazzola 2014-10-17 12:45:00 UTC
oVirt 3.5 has been released and should include the fix for this issue.


Note You need to log in before you can comment on or make changes to this bug.