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.