Mailinglist Archive: opensuse-buildservice (262 mails)

< Previous Next >
Re: [opensuse-buildservice] Install OBS in CentOS -- "Webclient Error: Unable to connect to API"
  • From: Luke Imhoff <luke@xxxxxxxx>
  • Date: Tue, 25 Aug 2009 08:05:18 -0500
  • Message-id: <4A93E18E.1030805@xxxxxxxx>
Jian Lee wrote:
Hi, your guys!

I want install obs on CentOS 5, after I build
obs-server-0.9.1-4.1.src.rpm, and installed
-------------------------
# rpm -qa|grep obs
obs-worker-0.9.1-4.1
obs-api-0.9.1-4.1
obs-server-0.9.1-4.1
=========================

follow the cache page on google
http://203.208.39.132/search?q=cache:Dm1eKDTlDg4J:https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/dist/README.SETUP+/srv/www/obs/webclient&cd=1&hl=zh-CN&ct=clnk&gl=cn&st_usg=ALhdy2-CIRL7BuSdU0Mm0wjPK0gG3mcGUA
and install guide on
http://en.opensuse.org/Build_Service/Build_Service_Installation_Tutorial/CentOS
use the default configure but just modified the ip interface and
username/password of mysql database , and create the needed empty
database in mysql server .

but when i login the web interface, i get following errors:

---------------------------
OpenSUSE Webclient Error:

Error Details:
Errorcode: 500
Message: Unable to connect to API
===========================

no useful info I found in /srv/obs/log/ and /var/log/lighttpd/, anyone
can give me a help?

Thanks for all your guys!

Did you go with virtual hosts or ips for the obs.conf for lighttpd? Are the virtual hosts resolvable from the local machine? (i.e. did you add them to /etc/hosts or your DNS?)


The README.SETUP says to put the username and password in the 'production' section:

* Configure your MySQL user and password in
in the "production:" section of these files:

/srv/www/obs/frontend/config/database.yml
/srv/www/obs/webclient/config/database.yml



but that's wrong. By default you'd be using the 'production_slave' environment in obs.conf:

rails_mode = "production_slave"


Also, you ran rake db:migrate on production_slave:

* populate the database

# cd /srv/www/obs/frontend/
# sudo -u lighttpd RAILS_ENV="production_slave" rake db:migrate



So, the tables for frontend are only available when using the production_slave environment, but if you followed the README.SETUP, your password and username may not be there. Add the username and password to the production_slave section, and NOT the production section.

You can also check if the frontend is sane by trying to load it from the console

cd /srv/www/obs/frontend
sudo script/console production_slave

If that gives you prompt without errors then the frontend is working.

You can also try to find yourself, by doing

User.find_by_login('Admin')

If that doesn't work then either the frontend can't talk to MySQL or the tables don't exist. You'll know based on the error you get.

Also, if the permissions on the log directories are not writable by lighttpd, you won't see a thing, so make sure /srv/www/obs/frontend/log and any files in there are writable by lighttpd:lighttpd.


--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References