Connection to swift http://10.0.2.15:8080 refused

asked 2017-09-18 01:18:01 -0500

bharati gravatar image

I have installed devstack with swift enabled in a VM inside virtual box in my laptop.

I am trying to access the swift using JOSS from my host laptop to the VM hosting devstack using following code:

IP address of VM : 192.168.223.3 and 10.0.2.15

Account account = new AccountFactory() .setUsername("khusi") .setPassword("khusi") .setAuthUrl("http://192.168.223.3/identity/v2.0/tokens") //.setTenantId("swiftusertest1") .setTenantName("service") .createAccount();

but i am getting following error Exception in thread "main" org.javaswift.joss.exception.CommandException: Unable to execute the HTTP call or to convert the HTTP Response at org.javaswift.joss.command.impl.core.AbstractCommand.call(AbstractCommand.java:58) at org.javaswift.joss.command.impl.core.AbstractSecureCommand.call(AbstractSecureCommand.java:31) at org.javaswift.joss.client.core.AbstractAccount.getInfo(AbstractAccount.java:194) at org.javaswift.joss.client.core.AbstractObjectStoreEntity.checkForInfo(AbstractObjectStoreEntity.java:98) at org.javaswift.joss.client.core.AbstractObjectStoreEntity.checkForInfo(AbstractObjectStoreEntity.java:89) at org.javaswift.joss.client.core.AbstractAccount.getServerTime(AbstractAccount.java:136) at org.javaswift.joss.client.core.AbstractAccount.synchronizeWithServerTime(AbstractAccount.java:147) at org.javaswift.joss.client.core.AbstractClient.authenticate(AbstractClient.java:44) at org.javaswift.joss.client.factory.AccountFactory.createAccount(AccountFactory.java:30) at JossCloud.main(JossCloud.java:34) Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.15:8080 refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at org.javaswift.joss.command.impl.core.AbstractCommand.call(AbstractCommand.java:49) ... 9 more Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ... 16 more

the syslog goes like this

ep 14 12:00:52 localhost devstack@keystone.service[9199]: #033[00;32mDEBUG keystone.common.authorization [#033[01;36mNone req-a38c0e3f-4002-494b-b3cc-29eee3d58667 #033[00;36mNone None#033[00;32m] #033[01;35m#033[00;32mRBAC: Authorization granted#033[00m #033[00;33m{{(pid=9203) check_policy /opt/stack/keystone/keystone/common/authorization.py:240}}#033[00m Sep 14 12:00:52 localhost keystone-wsgi-public: #033[00;32mDEBUG keystone.common.authorization [#033[01;36mNone req-a38c0e3f-4002-494b-b3cc-29eee3d58667 #033[00;36mNone None#033[00;32m] #033[01;35m#033[00;32mRBAC: Authorization granted#033[00m #033[00;33m{{(pid=9203 ... (more)

edit retag flag offensive close merge delete