Hi,<div><br></div><div>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 ( <a href="http://opennebula.org/documentation:rel1.4:occicg" target="_blank">http://opennebula.org/documentation:rel1.4:occicg</a> ), but I have problem to start:</div>
<div><br></div><div><br></div><div># occi-server start</div><div><div>Error executing /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb</div><div><br></div><div><div># cat var/occi-server.log </div><div>/usr/lib/ruby/1.8/rubygems.rb:578:in `report_activate_error': Could not find RubyGem test-spec (>= 0) (Gem::LoadError)</div>
<div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:134:in `activate'</div><div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:158:in `activate'</div>
<div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:157:in `each'</div><div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:157:in `activate'</div>
<div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:158:in `activate'</div><div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:157:in `each'</div>
<div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems.rb:157:in `activate'</div><div><span style="white-space:pre"> </span>from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'</div>
<div><span style="white-space:pre"> </span>from /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb:46</div><div><br></div><div><br></div><div><br></div><div>I tried to search the problem in the files custom_require.rb and occi-server.rb. </div>
<div>In cci-server.rb, line 46 has "require 'sinatra' ", but I installed sinatra in gem.</div><div><br></div><div><br></div><div><div># cat -n /usr/lib/ruby/1.8/rubygems/custom_require.rb | awk 'NR > 24 && NR < 39' </div>
<div> 25<span style="white-space:pre"> </span> #</div><div> 26<span style="white-space:pre"> </span> def require(path) # :nodoc:</div><div> 27<span style="white-space:pre"> </span> gem_original_require path</div>
<div> 28<span style="white-space:pre"> </span> rescue LoadError => load_error</div><div> 29<span style="white-space:pre"> </span> if load_error.message =~ /#{Regexp.escape path}\z/ and</div>
<div> 30<span style="white-space:pre"> </span> spec = Gem.searcher.find(path) then</div><div> 31<span style="white-space:pre"> </span> Gem.activate(<a href="http://spec.name" target="_blank">spec.name</a>, "= #{spec.version}")</div>
<div> 32<span style="white-space:pre"> </span> gem_original_require path</div><div> 33<span style="white-space:pre"> </span> else</div><div> 34<span style="white-space:pre"> </span> raise load_error</div>
<div> 35<span style="white-space:pre"> </span> end</div><div> 36<span style="white-space:pre"> </span> end</div><div> 37<span style="white-space:pre"> </span>end # module Kernel</div>
<div> 38<span style="white-space:pre"> </span></div><div><br></div><div><div># cat -n /srv/cloud/one/lib/ruby/cloud/occi/occi-server.rb | awk 'NR > 41 && NR < 61' </div><div> 42<span style="white-space:pre"> </span>################################################</div>
<div> 43<span style="white-space:pre"> </span># Required libraries</div><div> 44<span style="white-space:pre"> </span>################################################</div>
<div> 45<span style="white-space:pre"> </span>require 'rubygems'</div><div> 46<span style="white-space:pre"> </span>require 'sinatra'</div><div> 47<span style="white-space:pre"> </span>require 'OCCIServer'</div>
<div> 48<span style="white-space:pre"> </span></div><div> 49<span style="white-space:pre"> </span>require 'OpenNebula'</div><div> 50<span style="white-space:pre"> </span></div>
<div> 51<span style="white-space:pre"> </span>include OpenNebula</div><div> 52<span style="white-space:pre"> </span></div><div> 53<span style="white-space:pre"> </span>$occi_server = OCCIServer.new(CONFIGURATION_FILE, TEMPLATE_LOCATION)</div>
<div> 54<span style="white-space:pre"> </span></div><div> 55<span style="white-space:pre"> </span>##############################################################################</div>
<div> 56<span style="white-space:pre"> </span># Sinatra Configuration</div><div> 57<span style="white-space:pre"> </span>##############################################################################</div>
<div> 58<span style="white-space:pre"> </span>set :host, $occi_server.config[:server]</div><div> 59<span style="white-space:pre"> </span>set :port, $occi_server.config[:port]</div>
<div> 60<span style="white-space:pre"> </span></div><div><br></div></div></div><div><div><br></div></div></div><div><div># gem list</div><div><br></div><div>*** LOCAL GEMS ***</div><div><br></div>
<div>amazon-ec2 (0.9.12)</div><div>crack (0.1.7)</div><div>curb (0.7.1)</div><div>daemons (1.0.10)</div><div>eventmachine (0.12.10)</div><div>macaddr (1.0.0)</div><div>mkrf (0.2.3)</div><div>multipart-post (1.0.1)</div><div>
nokogiri (1.4.1)</div><div>rack (1.1.0)</div><div>rake (0.8.7)</div><div>sequel (3.11.0)</div><div>sinatra (1.0)</div><div>sqlite3-ruby (1.2.5)</div><div>thin (1.2.7)</div><div>uuid (2.3.1)</div><div>xml-simple (1.0.12)</div>
<div>xmlparser (0.6.81)</div><div><br></div><div><br></div></div><div>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.</div><div><br></div><div>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 <a href="https://etm:443" target="_blank">https://etm:443</a>, appeared "503 - Service Not Available". </div>
<div><br></div><div>I changed to "etm"=> "127.0.0.1", executed in the browser <a href="https://etm:443" target="_blank">https://etm:443</a> and appeared " "etm" connection refused ".</div>
<div>
<br></div><div>In both configurations, occi-server command didn't work correctly.</div><div><br></div><div> </div><div><div># cat $ONE_LOCATION/etc/occi-server.conf</div>
<div><div># OpenNebula administrator user</div><div>USER=root</div><div>PASSWORD=********</div><div><br></div><div># OpenNebula server contact information</div><div>ONE_XMLRPC=<a href="http://localhost:2633/RPC2" target="_blank">http://localhost:2633/RPC2</a></div>
<div><br></div><div># Host and port where the occi server will run</div><div>SERVER=etm </div><div>PORT=4567</div><div><br></div><div># SSL proxy that serves the API (set if is being used)</div><div>#SSL_SERVER=<a href="https://localhost:443" target="_blank">https://localhost:443</a></div>
<div><br></div><div># Configuration for the image repository</div><div>DATABASE=/srv/cloud/one/var/occi.db</div><div>IMAGE_DIR=/xen/domains/vm01</div><div><br></div><div># Configuration for OpenNebula's Virtual Networks</div>
<div>BRIDGE=eth0:0</div><div><br></div><div># Default format for FS</div><div>FS_FORMAT=ext3</div><div><br></div><div># VM types allowed and its template file (inside templates directory)</div><div>VM_TYPE=[NAME=small, TEMPLATE=small.erb]</div>
<div>VM_TYPE=[NAME=medium, TEMPLATE=medium.erb]</div><div>VM_TYPE=[NAME=large, TEMPLATE=large.erb]</div><div><br></div></div><div><br></div><div><br></div><div><div><br></div><div># cat /etc/lighttpd/lighttpd.conf</div><div>
# Debian lighttpd configuration file</div>
<div>#</div><div><br></div><div>############ Options you really have to take care of ####################</div><div><br></div><div>## modules to load</div><div># mod_access, mod_accesslog and mod_alias are loaded by default</div>
<div># all other module should only be loaded if neccesary</div><div># - saves some time</div><div># - saves memory</div><div><br></div><div>server.modules = (</div><div> "mod_access",</div>
<div> "mod_alias",</div><div> "mod_accesslog",</div><div> "mod_proxy",</div><div> "mod_compress",</div><div># "mod_rewrite",</div>
<div># "mod_redirect",</div><div># "mod_evhost",</div><div># "mod_usertrack",</div><div># "mod_rrdtool",</div><div># "mod_webdav",</div>
<div># "mod_expire",</div><div># "mod_flv_streaming",</div><div># "mod_evasive"</div><div>)</div><div><br></div><div>....</div><div><br></div><div>## bind to port (default: 80) </div>
<div>server.port = 443 </div><div><br></div><div>...</div><div><br></div><div><br></div><div><div>#### proxy module</div><div>## read proxy.txt for more info</div><div>proxy.server = ( "" =></div>
<div> ("" =></div><div> (</div><div> "host" => "127.0.0.1", </div><div> "port" => 4567</div>
<div> )</div><div> )</div><div> )</div><div><br></div><div><br></div><div>#### SSL engine</div><div>ssl.engine = "enable"</div>
<div>ssl.pemfile = "/etc/lighttpd/server.pem"</div><div><br></div></div><div><br></div><div><div># cat /srv/cloud/one/etc/econe.conf</div><div># OpenNebula administrator user</div><div>USER=root </div>
<div>PASSWORD=********</div><div><br></div><div># OpenNebula sever contact information</div><div>ONE_XMLRPC=<a href="http://localhost:2633/RPC2" target="_blank">http://localhost:2633/RPC2</a></div><div><br></div><div># Host and port where econe server will run</div>
<div>SERVER=127.0.0.1</div><div>PORT=4567</div><div><br></div><div># SSL proxy that serves the API (set if is being used)</div><div>SSL_SERVER=etm </div><div><br></div><div># Configuration for the image repository</div><div>
DATABASE=/srv/cloud/one/var/econe.db</div><div>IMAGE_DIR=/xen/domains/vm01</div><div><br></div><div># VM types allowed and its template file (inside templates directory)</div><div>VM_TYPE=[NAME=m1.small, TEMPLATE=m1.small.erb]</div>
<div><br></div><div><br></div><div><br></div><div><br></div></div><div>Why does not "occi-server start" work correctly?</div><div><br></div><div><br></div><div><br></div></div></div></div><div>Regards,</div><div>
<br></div><div>Charles</div>