Projects tigase _server server-core Issues #1443
Register using jaxmpp with high rate failed (#1443)
Unknown opened 4 years ago

I have a problem with… I register 10 different accounts using jaxmpp every 100ms,but just one account was registered.If Interval time is 1000ms(1s).10 accounts can be registered successfully.

Details (please complete the following information):

  • Tigase version: [e.g. 8.1.2]
  • JVM flavour and version [e.g. AdoptOpenJDK11]
  • Operating system/distribution/version [e.g. Linux CentOS 7]

The register code is:

Jaxmpp contact = new Jaxmpp();
contact.getConnectionConfiguration().setConnectionType(ConnectionConfiguration.ConnectionType.bosh);
contact.getConnectionConfiguration().setBoshService("http://abc.im.tigase.com:5280/");
contact.getConnectionConfiguration().setDomain("abc.im.tigase.com");

String userName = option.userNamePrefix + "_" + i;
String password = option.password;
String email = userName + "@mail.tigase.com";
ABUser abUser = new ABUser(userName, password, email);
contact.getModulesManager().register(new InBandRegistrationModule());
contact.getEventBus().addHandler(Connector.ConnectedHandler.ConnectedEvent.class, new Connector.ConnectedHandler() {
            @Override
            public void onConnected(SessionObject sessionObject) {
                try {
                    contact.getModulesManager().getModule(InBandRegistrationModule.class).register(abUser.getUserName(), abUser.getPassword(), abUser.getEmail(), new AsyncCallback() {
                        @Override
                        public void onError(Stanza stanza, XMPPException.ErrorCondition errorCondition) throws JaxmppException {
                            logger.error("register failed for user name:" + abUser.getUserName(), errorCondition);
                        }

                        @Override
                        public void onSuccess(Stanza stanza) throws JaxmppException {
                            logger.info("register success for user name:" + abUser.getUserName());
                        }

                        @Override
                        public void onTimeout() throws JaxmppException {
                            logger.error("register time out for user name:" + abUser.getUserName());
                        }
                    });
                } catch (Exception e) {
                    logger.error("response error", e);
                }
                logger.info("connect success");
            }
        });

contact.getEventBus().addHandler(Connector.DisconnectedHandler.DisconnectedEvent.class, new Connector.DisconnectedHandler() {
            @Override
            public void onDisconnected(SessionObject sessionObject) {
                logger.info("disconnect success");
            }
        });


if (!contact.isConnected()) {
    try {
        contact.login(false);
    } catch (JaxmppException e) {
        logger.error("login failed", e);
    }
}

The register config is:

    'jabber:iq:register' {
        captchaRequired = 'false'
	emailRequired = 'false'
    }

Unknown commented 4 years ago

There is Account Registration Limits - please adjust your server configuration according to the documentation.

Unknown commented 4 years ago

@woj-tek OK,I got it.Thank you very much!

issue 1 of 1
Type
Question
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1443
Please wait...
Page is in error, reload to recover