I have added the following lines to ejabberd.yml
-
port: 8888
module: ejabberd_service
access: all
shaper_rule: fast
ip: "127.0.0.1"
hosts:
"mycomponent.DESKTOP":
password: "secret"
the following is my java code using whack library
ExternalComponentManager mgr = new ExternalComponentManager("127.0.0.1", 8888,false);
mgr.setServerName("DESKTOP");
mgr.setSecretKey("mycomponent", "secret");
I get the following exception
org.xmpp.component.ComponentException: not-authorized at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:219)
and following is appended to log
2017-04-29 19:10:44.855 [info] <0.625.0>@ejabberd_listener:accept:333 (#Port<0.21604>)
Accepted connection 127.0.0.1:58398 -> 127.0.0.1:8888
2017-04-29 19:10:44.856 [info] <0.675.0>@ejabberd_service:init:90
({socket_state,gen_tcp,#Port<0.21604>,<0.674.0>}) External service connected
2017-04-29 19:10:44.905 [info] <0.675.0>@ejabberd_service:terminate:267
terminated: normal
What am i doing wrong ?