Mailinglist Archive: opensuse-buildservice (262 mails)

< Previous Next >
Re: [opensuse-buildservice] Install OBS in CentOS -- "Webclient Error: Unable to connect to API"
  • From: Jian Lee <lijian.gnu@xxxxxxxxx>
  • Date: Wed, 26 Aug 2009 09:56:52 +0800
  • Message-id: <r5uz2v8b.fsf@xxxxxxxxx>
Hi, Luke

Your help was greatly appreciated.

I've used "production_slave" already before,

and I run your command :

# script/console production_slave
Loading production_slave environment (Rails 2.0.2)
/srv/www/obs/frontend/config/environment.rb:98: warning: already initialized
=> #<User id: 1, created_at: "2009-08-25 17:05:28", updated_at: "2009-08-25
17:05:28", last_logged_in_at: "2009-08-25 17:05:28", login_failure_count: 0,
login: "Admin", email: "root@localhost", realname: "", password:
"e73a4697a25387cee5fb1b54e3253b30", password_hash_type: "md5", password_salt:
"tdTOqHcfOC", password_crypted: "osQq6OKjF0f8I", state: 2, source_host: nil,
source_port: nil, rpm_host: nil, rpm_port: nil, adminnote: nil>


I'll try to setup 1.6 on my enviroment, and come back after that.

Thanks !

Luke Imhoff <luke@xxxxxxxx> writes:

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

follow the cache page on google

and install guide on

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:


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

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


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


Jian Lee
MSN : lijian.gnu@xxxxxxxxx
Chinese Blog :
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >