the8472/mldht

mldht doesn't seem to run, no errors but client can't connect

Closed this issue · 6 comments

voltagex@devbox:~/src/mldht/src$ java -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:10044,server=y,suspend=n  -cp "../target/*:../target/dependency/*" the8
472.mldht.Launcher
Listening for transport dt_socket at address: 10044

(in another tmux tab)

voltagex@devbox:~/src/mldht/src$ java -Xdebug -cp ./lib/*:$DIR/../target/* the8472.mldht.cli.Client "$@"
Exception in thread "main" java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:454)
        at java.base/sun.nio.ch.Net.connect(Net.java:446)
        at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
        at java.base/java.nio.channels.SocketChannel.open(SocketChannel.java:194)
        at the8472.mldht.cli.Client.<init>(Client.java:31)
        at the8472.mldht.cli.Client.main(Client.java:92)

if you want to use the CLI you need to enable that component

https://github.com/the8472/mldht#optional-components

@the8472 apologies for my inability to read there.

I've uncommented it in the config but I still get errors running the command.

Check if it's listening on port 33348

I did a git clean -fdx, rebuilt with maven, then re-ran the server after uncommenting the components in config.xml

voltagex@devbox:~/src/mldht/work$ java -cp "../target/*:../target/dependency/*" the8472.mldht.Launcher


voltagex@devbox:~/src/mldht/work$ sudo netstat -lp | grep java
udp6       0      0 fd10:41ad:2767:0::49001 [::]:*                              1926/java
udp6       0      0 2001-44b8-31aa-db:49001 [::]:*                              1926/java
voltagex@devbox:~/src/mldht/work$ java -Xdebug -cp ./lib/*:$DIR/../target/* the8472.mldht.cli.Client "$@"
Error: Could not find or load main class the8472.mldht.cli.Client
Caused by: java.lang.ClassNotFoundException: the8472.mldht.cli.Client

then re-ran the server after uncommenting the components in config.xml

did you restart the server after changing the .xml? only some config options are picked up on file changes

not listening on that port

check logs/exceptions.log. although it should print to stderr if it tries to load the component but fails to bind the port for some reason, so it's more likely that it's not even trying to load it.

Caused by: java.lang.ClassNotFoundException: the8472.mldht.cli.Client

different error than previously. you now seem to be specifying the classpath incorrectly.

closing due to inactivity