Mailinglist Archive: opensuse-buildservice (348 mails)

< Previous Next >
[opensuse-buildservice] http://127.0.42.1/project/list_my has openSUSE Webclient Error: Errorcode: 500 Message: Unable to connect to API host. (localhost)
  • From: chia-hung tai <glaxy.tai@xxxxxxxxx>
  • Date: Mon, 26 Apr 2010 10:27:07 +0800
  • Message-id: <t2xd117e67c1004251927gc700fe93uf4adb5fcb2998547@xxxxxxxxxxxxxx>
Dear sir,

I installed a OBD in whole new openSuse 11.2 OS. And read
http://gitorious.org/opensuse/build-service/blobs/raw/master/dist/README.SETUP
for configuration and followed below steps.
1. sudo zypper ar -f
http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/
openSUSE_Tools_Devel
2. sudo zypper install obs-worker obs-api mysql obs-server osc
3. Start MySQL and set password by: sudo /etc/init.d/mysql start
4. sudo mysql_secure_installation
5. Create the empty production databases:
# mysql -u root -p
mysql> create database api_production;
mysql> quit
6. sudo cp /srv/www/obs/api/config/database.yml.example
/srv/www/obs/api/config/database.yml
7. Write MySQL password to database.yml by: sudo vi
/srv/www/obs/api/config/database.yml
8. populate the database
# cd /srv/www/obs/api/
# sudo RAILS_ENV="production" rake db:migrate # cd /srv/www/obs/webui/
# sudo RAILS_ENV="production" rake db:migrate
9. To enable these vhosts, make sure to uncomment the following in the
'custom includes' section at the bottom of
/etc/lighttpd/lighttpd.conf:
##
## custom includes like vhosts.
##
#include "conf.d/config.conf"
# following line uncommented as per
# /usr/share/doc/packages/obs-api/README.SETUP
include_shell "cat vhosts.d/*.conf"
Also, the modules "mod_magnet", "mod_rewrite" and fastcgi need to be
enabled by uncommenting the corresponding lines in
/etc/lighttpd/modules.conf:
server.modules = (
"mod_access",
# "mod_alias",
# "mod_auth",
# "mod_evasive",
# "mod_redirect",
"mod_rewrite",
# "mod_setenv",
# "mod_usertrack",
)
##
## mod_magnet
##
include "conf.d/magnet.conf"
##
## FastCGI (mod_fastcgi)
##
include "conf.d/fastcgi.conf"
10. After that,I found the owner for
/srv/www/obs/api/log/backend_access.log is root, so I set: sudo chown
-R lighttpd.lighttpd /srv/www/obs/api/log/backend_access.log
11. Then I start the service by
sudo /usr/sbin/rcmysql start
sudo /usr/sbin/rcobsrepserver start
sudo /usr/sbin/rcobssrcserver start
sudo /usr/sbin/rcobsscheduler start
sudo /usr/sbin/rcobsworker start
sudo /usr/sbin/rcobsdispatcher start
sudo /usr/sbin/rcobspublisher start
sudo /usr/sbin/rclighttpd start
After above steps, the http://127.0.42.2 works fine. And the command:
curl -0 --user "Admin:opensuse" -X PUT \ -T
/usr/share/doc/packages/obs-api/openSUSE.org.xml \
http://127.0.42.2/source/openSUSE.org/_meta
works fine.
But...when I use http://127.0.42.1, everything goes wrong. After log
in as Admin, My Projects, My Requests, Home Project all sows openSUSE
Webclient Error:
Error Details:
Errorcode: 500
Message: Unable to connect to API host. (localhost) the api log file
/srv/www/obs/api/log/production.log is below.
[D|# 5000] default_server for :rest models: localhost:5352 [D|# 5000]
setting up transport for model project [D|# 5000] [BSSQL] initialize(
"bssql", {} ) [D|# 5000] setting up transport for model package [D|#
5000] setting up transport for model bsrequest [D|# 5000] [REST]
initialize( "rest", {:all=>#<URI::Generic:0xb6960cc4
URL:rest://localhost:5352/request>} ) [D|# 5000] setting up transport
for model collection
[D|# 5000] [4;36;1mSQL (10.8ms) [0m [0;1mSET SQL_AUTO_IS_NULL=0 [0m
[D|# 5000] [4;35;1mDelayed::Job Columns (4.3ms) [0m [0mSHOW FIELDS
FROM `delayed_jobs` [0m
[D|# 5000] [4;36;1mSQL (1.2ms) [0m [0;1mBEGIN [0m
[D|# 5000] [4;35;1mDelayed::Job Create (19.1ms) [0m [0mINSERT INTO
`delayed_jobs` (`failed_at`, `locked_by`, `created_at`, `handler`,
`updated_at`, `priority`, `run_at`, `attempts`, `locked_at`,
`last_error`) VALUES(NULL, NULL, '2010-04-26 04:59:04', '---
!ruby/object:StatusMonitorJob {}\n\n', '2010-04-26 04:59:04', 0,
'2010-04-26 04:59:04', 0, NULL, NULL) [0m
[D|# 5000] [4;36;1mSQL (67.4ms) [0m [0;1mCOMMIT [0m
[D|# 5015] default_server for :rest models: localhost:5352 [D|# 5015]
setting up transport for model project [D|# 5015] [BSSQL] initialize(
"bssql", {} ) [D|# 5015] setting up transport for model package [D|#
5015] setting up transport for model bsrequest [D|# 5015] [REST]
initialize( "rest", {:all=>#<URI::Generic:0xb697dc34
URL:rest://localhost:5352/request>} ) [D|# 5015] setting up transport
for model collection
[D|# 5015] [4;36;1mSQL (2.2ms) [0m [0;1mSET SQL_AUTO_IS_NULL=0 [0m
[D|# 5015] [4;35;1mDelayed::Job Columns (4.9ms) [0m [0mSHOW FIELDS
FROM `delayed_jobs` [0m
[D|# 5015] [4;36;1mSQL (1.5ms) [0m [0;1mBEGIN [0m
[D|# 5015] [4;35;1mDelayed::Job Create (39.5ms) [0m [0mINSERT INTO
`delayed_jobs` (`failed_at`, `locked_by`, `created_at`, `handler`,
`updated_at`, `priority`, `run_at`, `attempts`, `locked_at`,
`last_error`) VALUES(NULL, NULL, '2010-04-26 05:00:06', '---
!ruby/object:StatusMonitorJob {}\n\n', '2010-04-26 05:00:06', 0,
'2010-04-26 05:00:06', 0, NULL, NULL) [0m
[D|# 5015] [4;36;1mSQL (29.7ms) [0m [0;1mCOMMIT [0m
I have read the mailing archive of opensuse-buildservice, but I can't
find any solution. It sounds the api work fine, but webui has some
problems to communicate with api. Can anyone help me for this issue?
Thanks a lot.

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

< Previous Next >
Follow Ups