0 Replies Latest reply on Apr 29, 2017 7:33 AM by Piyush

    Unable to add component ComponentException: not-authorized


      I have added the following lines to ejabberd.yml
      port: 8888
      module: ejabberd_service
      access: all
      shaper_rule: fast
      ip: ""
      password: "secret"

      the following is my java code using whack library

      ExternalComponentManager mgr = new ExternalComponentManager("", 8888,false);
      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 ->
      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 ?