[one-users] "occi-server start" doesn't work correctly

Charles Rodamilans charlesrodamilans at gmail.com
Fri May 14 11:02:42 PDT 2010


Hi,

I am testing OpenNebula with OCCI. I use Debian Lenny and installed
OpenNebula as root. I use only one machine  (to server and hosts) for my
tests. I tried to install OCCI (
http://opennebula.org/documentation:rel1.4:occicg ), but I have problem to
start:


# occi-server start
Error executing /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb

# cat var/occi-server.log
/usr/lib/ruby/1.8/rubygems.rb:578:in `report_activate_error': Could not find
RubyGem test-spec (>= 0) (Gem::LoadError)
 from /usr/lib/ruby/1.8/rubygems.rb:134:in `activate'
from /usr/lib/ruby/1.8/rubygems.rb:158:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:157:in `each'
from /usr/lib/ruby/1.8/rubygems.rb:157:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:158:in `activate'
from /usr/lib/ruby/1.8/rubygems.rb:157:in `each'
 from /usr/lib/ruby/1.8/rubygems.rb:157:in `activate'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
 from /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb:46



I tried to search the problem in the files custom_require.rb
and occi-server.rb.
In  cci-server.rb, line 46 has "require 'sinatra' ", but I
installed sinatra in gem.


# cat -n /usr/lib/ruby/1.8/rubygems/custom_require.rb | awk 'NR > 24 && NR <
39'
    25  #
    26  def require(path) # :nodoc:
    27    gem_original_require path
    28  rescue LoadError => load_error
    29    if load_error.message =~ /#{Regexp.escape path}\z/ and
    30       spec = Gem.searcher.find(path) then
    31      Gem.activate(spec.name, "= #{spec.version}")
    32      gem_original_require path
    33    else
    34      raise load_error
    35    end
    36  end
    37 end  # module Kernel
    38

# cat -n /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb | awk 'NR > 41 &&
NR < 61'
    42 ################################################
    43 # Required libraries
    44 ################################################
    45 require 'rubygems'
    46 require 'sinatra'
    47 require 'OCCIServer'
    48
    49 require 'OpenNebula'
    50
    51 include OpenNebula
    52
    53 $occi_server = OCCIServer.new(CONFIGURATION_FILE, TEMPLATE_LOCATION)
    54
    55
##############################################################################
    56 # Sinatra Configuration
    57
##############################################################################
    58 set :host, $occi_server.config[:server]
    59 set :port, $occi_server.config[:port]
    60


# gem list

*** LOCAL GEMS ***

amazon-ec2 (0.9.12)
crack (0.1.7)
curb (0.7.1)
daemons (1.0.10)
eventmachine (0.12.10)
macaddr (1.0.0)
mkrf (0.2.3)
multipart-post (1.0.1)
nokogiri (1.4.1)
rack (1.1.0)
rake (0.8.7)
sequel (3.11.0)
sinatra (1.0)
sqlite3-ruby (1.2.5)
thin (1.2.7)
uuid (2.3.1)
xml-simple (1.0.12)
xmlparser (0.6.81)


Hostname is etm and the ssl port is 443 because I execute lighttpd as root.
I use xen image and the bridge is eth0:0.

The lighttpd was working correctly. But when I added  "mod_proxy" with
"host"=> "127.0.0.1"  in /etc/lighttpd/lighttpd.conf and executed in the
browser https://etm:443, appeared "503 - Service Not Available".

I changed to "etm"=> "127.0.0.1", executed in the browser
https://etm:443 and appeared   " "etm" connection refused ".

In both configurations, occi-server command didn't work correctly.


# cat $ONE_LOCATION/etc/occi-server.conf
# OpenNebula administrator user
USER=root
PASSWORD=********

# OpenNebula server contact information
ONE_XMLRPC=http://localhost:2633/RPC2

# Host and port where the occi server will run
SERVER=etm
PORT=4567

# SSL proxy that serves the API (set if is being used)
#SSL_SERVER=https://localhost:443

# Configuration for the image repository
DATABASE=/srv/cloud/one/var/occi.db
IMAGE_DIR=/xen/domains/vm01

# Configuration for OpenNebula's Virtual Networks
BRIDGE=eth0:0

# Default format for FS
FS_FORMAT=ext3

# VM types allowed and its template file (inside templates directory)
VM_TYPE=[NAME=small, TEMPLATE=small.erb]
VM_TYPE=[NAME=medium, TEMPLATE=medium.erb]
VM_TYPE=[NAME=large, TEMPLATE=large.erb]




# cat /etc/lighttpd/lighttpd.conf
# Debian lighttpd configuration file
#

############ Options you really have to take care of ####################

## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory

server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_proxy",
            "mod_compress",
#           "mod_rewrite",
#           "mod_redirect",
#           "mod_evhost",
#           "mod_usertrack",
#           "mod_rrdtool",
#           "mod_webdav",
#           "mod_expire",
#           "mod_flv_streaming",
#           "mod_evasive"
)

....

## bind to port (default: 80)
server.port               = 443

...


#### proxy module
## read proxy.txt for more info
proxy.server               = ( "" =>
                                ("" =>
                                 (
                                   "host" => "127.0.0.1",
                                   "port" => 4567
                                 )
                                 )
                             )


#### SSL engine
ssl.engine                 = "enable"
ssl.pemfile                = "/etc/lighttpd/server.pem"


# cat /srv/cloud/one/etc/econe.conf
# OpenNebula administrator user
USER=root
PASSWORD=********

# OpenNebula sever contact information
ONE_XMLRPC=http://localhost:2633/RPC2

# Host and port where econe server will run
SERVER=127.0.0.1
PORT=4567

# SSL proxy that serves the API (set if is being used)
SSL_SERVER=etm

# Configuration for the image repository
DATABASE=/srv/cloud/one/var/econe.db
IMAGE_DIR=/xen/domains/vm01

# VM types allowed and its template file (inside templates directory)
VM_TYPE=[NAME=m1.small, TEMPLATE=m1.small.erb]




Why does not "occi-server start" work correctly?



Regards,

Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100514/397010a0/attachment-0002.htm>


More information about the Users mailing list