iotaledger / chat.ixi

Apache License 2.0
28 stars 8 forks source link

Failed to connect to Ict: java.rmi.NotBoundException: ict #2

Closed lismore closed 5 years ago

lismore commented 5 years ago

I followed the instructions on a clean Windows 10 x64 machine, I built both the IOTA ICT and Chat.ixi from source. Checked that ports were also open.

Locally running IOTA ICT

Output from Chat.ixi

C:\Users\lismore\Documents\GitHub\chat.ixi>java -jar chat.ixi-1.1.jar ict lismore areallylongstring

Failed to connect to Ict: java.rmi.NotBoundException: ict

Please make sure that:
 - your Ict is running
 - the name of your Ict is 'ict'
 - you set ixi_enabled=true in your ict.cfg
 - CHAT.ixi runs on the same device as your Ict

java.lang.RuntimeException: java.rmi.NotBoundException: ict
    at org.iota.ict.ixi.IxiModule.<init>(IxiModule.java:42)
    at org.iota.ixi.ChatIxi.<init>(ChatIxi.java:90)
    at org.iota.ixi.ChatIxi.main(ChatIxi.java:73)
Caused by: java.rmi.NotBoundException: ict
    at sun.rmi.registry.RegistryImpl.lookup(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Unknown Source)
    at org.iota.ict.ixi.IxiModule.<init>(IxiModule.java:39)
    ... 2 more

Output from IOTA ICT

C:\Users\lismore\Documents\GitHub\ict>java -jar ict-0.4-SNAPSHOT.jar -config ict.cfg
2754
13:57:07.546 INFO  [main/Main]   Starting new Ict 'ict' (version: 0.4-SNAPSHOT)
13:57:07.914 INFO  [main/Main]   Ict started on /0.0.0.0:1337.

13:58:07.575 INFO  [Sender/Neighbor]   ALL  |NEW  |REQ  |INV  |IGN     ADDRESS
14:09:07.589 INFO  [Sender/Neighbor]   ALL  |NEW  |REQ  |INV  |IGN     ADDRESS
vuapo-eth commented 5 years ago

Have you:

lismore commented 5 years ago

hi, it is set to true, I have started ict before starting chat.ixi, reproducible

vuapo-eth commented 5 years ago

This issue will be fixed with the next release when IXI modules will work differently and no longer use RMI.

samuel-rufi commented 5 years ago

Fixed by replacing RMI with dynamic class loading.