我刚刚下载了cloudify2.6.2。当运行cloudify的CLI时,我无法运行REST API,因为我收到此错误
Starting Non-Interactive Shell
>>> connect http://$localhost:8100
http://$localhost:8100/service/testrest Rest api error: Operation failed. org.apache.http.conn.HttpHostConnectException: Connection to http://$localhost:8100 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.cloudifysource.restclient.GSRestClient.executeHttpMethod(GSRestClient.java:371)
at org.cloudifysource.restclient.GSRestClient.get(GSRestClient.java:278)
at org.cloudifysource.restclient.GSRestClient.get(GSRestClient.java:265)
at org.cloudifysource.shell.rest.RestAdminFacade.doConnect(RestAdminFacade.java:87)
at org.cloudifysource.shell.AbstractAdminFacade.connect(AbstractAdminFacade.java:55)
at org.cloudifysource.shell.commands.Connect.doExecute(Connect.java:62)
at org.cloudifysource.shell.commands.AbstractGSCommand.execute(AbstractGSCommand.java:99)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:172)
at org.apache.karaf.shell.console.Main.run(Main.java:191)
at org.apache.karaf.shell.console.Main.run(Main.java:89)
at org.cloudifysource.shell.GigaShellMain.main(GigaShellMain.java:126)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
... 24 more
Communication Error accessing http://$localhost:8100/service/testrest. Reason: Connection to http://$localhost:8100 refused
我没有防火墙,我也使用jdk7 我需要对此进行一些解释。
答案 0 :(得分:2)
您是否使用bootstrap-localcloud
在计算机上引导 Cloudify ?此外,您似乎正在使用$localhost
而不是localhost
。
答案 1 :(得分:0)
这里有一些注意事项。 首先要使REST服务工作,它必须启动,因此必须完成引导程序,然后执行连接操作。
在我的情况下,位于〜/ gigaspaces / bin / setenv.sh的setenv.sh出了问题。 有两个宣言不应该在那里。 一个用于NIC,另一个用于LOOKUPLOCATOR,所以我将它们注释掉,然后我终于引导了云。
Cloudify版本2.6.0
达诺斯