[opensuse-buildservice] http://127.0.42.1/project/list_my has openSUSE Webclient Error: Errorcode: 500 Message: Unable to connect to API host. (localhost)
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.SET...
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=>#
Am Montag, 26. April 2010 04:27:07 schrieb chia-hung tai: ...
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.
Are you sure that the api is configured right in /srv/www/obs/webui/config/environments/production.rb ? -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Adrian Schröter
-
chia-hung tai