Account creation
Hi Christian Schudt,
For the below code, registration fails for the first time.when ejabberd is up and running. But when ejabberd is restarted again, same code registers the user in ejabberd. After that no issues for re-registration
xmppClient.connect();
RegistrationManager registrationManager = xmppClient.getManager(RegistrationManager.class);
registrationManager.setEnabled(true);
Registration registration = registrationManager.getRegistration();
if(!registration.isRegistered()) {
registration = Registration.builder()
.username(authUser.getUsername().toString())
.password(authUser.getPassword().toString())
.build();
registrationManager.register(registration);
}
xmppClient.login(authUser.getUsername().toString(), authUser.getPassword().toString());
Below is the error rocks.xmpp.core.session.NoResponseException: Timeout reached, while waiting on a response. at rocks.xmpp.core.session.XmppSession.sendAndAwait(XmppSession.java:609) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:537) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:518) at rocks.xmpp.extensions.register.RegistrationManager.getRegistration(RegistrationManager.java:82)
Comments (3)
-
repo owner -
repo owner Just tried that again using BOSH connection. No issues encountered. I suspect it to be an issue in ejabberd, e.g. that's not fully started.
-
repo owner - changed status to invalid
No answer since 3 years and not reproducible. Closing this one.
- Log in to comment
I also tried this. Started ejabberd 14 for the first time and could register without problems. I got a message from the server "Hi. Welcome to this XMPP server.".