Dear Hutson, Thanks for the help! Changing OCCI server from "localhost" to 192.168.1.201 solved the problem.
Kind regards, Nodir. On 27 January 2012 00:32, Hutson Betts <[email protected]> wrote: > > Dear Nodir, > > This actually might be a more appropriate discussion for the OpenNebula > user mailing list since it's more of an OCCI configuration issue. > > You mention that the OCCI server is operating on 192.168.1.201. > Furthermore, you mention that you are using Libcloud on 192.168.1.13. > > However, you have configured OCCI to only listen on localhost. You > either need to change the 'server' value, or you need to setup a proxy > to bind another port on 192.168.1.201 to redirect to 4567. > > Another note, the e-mail you referenced is quite old. Nearly the entire > OpenNebula driver has been re-written. > > Something like: > > from libcloud.types import Provider > from libcloud.providers import get_driver > one = get_driver(Provider.OPENNEBULA) > driver = one(USERNAME, PASSWORD, secure=False, host='192.168.1.201', > port=PORT) > images = driver.list_images() > print images > > Should be sufficient. > > -- > Sincerely, > Hutson Betts (Computer Science and Engineering - Texas A&M University) > Key ID: 70354B36 <http://pgp.mit.edu/> > > > On Thu, 2012-01-26 at 16:32 +0900, Nodir Kodirov wrote: > > Hi! > > > > I am trying to access my OpenNebula cloud with libcloud, which gives me > > > socket.error: [Errno 111] Connection refused > > > > I have OpenNebula version 3.0 (I have Python 2.7) running on Ubuntu > > 11.04, 64 bit server. OpenNebula installed at 192.168.1.201 and > > Occi-server is being run at the same host with configuration > > > > # OpenNebula sever contact information > > :one_xmlrpc: http://localhost:2633/RPC2 > > > > # Host and port where OCCI server will run > > :server: localhost > > :port: 4567 > > > > I am trying to access OpenNebula from 192.168.1.13 with libcloud 0.7.1 > > I modified libcloud/compute/drivers/opennebula.py as > > API_HOST = '192.168.1.201' > > API_PORT = (4567, 443) > > API_SECURE=False > > > > I am running the script below: > > > > from libcloud.types import Provider > > from libcloud.providers import get_driver > > one = get_driver(Provider.OPENNEBULA) > > driver = one('one_user', 'one_password') > > images = driver.list_images() > > print images > > > > as it is described > > http://lists.opennebula.org/pipermail/ecosystem-opennebula.org/2010-June/000036.html > > But having: [...] socket.error: [Errno 111] Connection refused > > Is there anything I am doing wrong? > > > > Kind regards, > > Nodir.
