[Bug 700947] New: Unable to connect to API host
https://bugzilla.novell.com/show_bug.cgi?id=700947 https://bugzilla.novell.com/show_bug.cgi?id=700947#c0 Summary: Unable to connect to API host Classification: Internal Novell Products Product: openSUSE Build Service Version: 2.1 Platform: x86-64 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: General AssignedTo: adrian@novell.com ReportedBy: andrewzro@gmail.com QAContact: adrian@novell.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 I've created an OBS set-up using the instructions located at: http://gitorious.org/opensuse/build-service/blobs/raw/master/dist/README.SET... I had a number of small issues, but the biggest one was that the API could not be connected while using a secure connection. Reproducible: Always Steps to Reproduce: 1. Install OBS - openSUSE 11.4 x64 host 2. Set-up OBS / apache2 as per the install instructions provided 3. Try to connect to the webui Actual Results: The WebUI displays: Error Code: 503 Mesage: Unable to connect to API host (localhost) The webui log displays: [D|# 5110] [REST] find( Person, [{:login=>"Admin"}] ) [D|# 5110] http_do #1: method: get url: http://<ip>:444/person/Admin [E|# 5110] --> caught Net::HTTPBadResponse: wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">", retrying with new HTTP connection Expected Results: The webui is properly displayed I did a little digging - I have no previous experience with ruby - and it seems to me the problem is that the ruby code prevents connecting the API when using encrypted mode. This is because http_do only considers it's using https, when the 443 port is used. But the API at 444 uses https also. Here is the patch that fixed things for me: --- /srv/www/obs/common/lib/activexml/transport.rb.orig 2011-06-20 03:16:32.000000000 -0400 +++ /srv/www/obs/common/lib/activexml/transport.rb 2011-06-20 04:24:18.676000083 -0400 @@ -470,6 +470,7 @@ @http = Net::HTTP.new(url.host, url.port) # FIXME: we should get the protocol here instead of depending on the port @http.use_ssl = true if url.port == 443 + @http.use_ssl = true if url.port == 444 @http.start end @http.read_timeout = opt[:timeout] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=700947 https://bugzilla.novell.com/show_bug.cgi?id=700947#c1 --- Comment #1 from Andrei Zlate <andrewzro@gmail.com> 2011-06-20 12:25:45 UTC --- I also had to update the frontend information in "/srv/www/obs/webui/config/environments/production.rb" to: FRONTEND_PORT = 444 FRONTEND_PROTOCOL = 'https' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=700947 https://bugzilla.novell.com/show_bug.cgi?id=700947#c2 Adrian Schröter <adrian@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Adrian Schröter <adrian@suse.com> 2012-04-04 07:37:46 UTC --- OBS 2.3 takes care about the scheme now at that place. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com