I am not able to use xmpp client inside a docker container. I used this code it is working very well on my machine but not in a docker container.
var xmpp = require('node-xmpp-client');
var client = new xmpp.Client({
jid: '[email protected]',
password: 'xyz',
port: 5235,
host: 'fcm-xmpp.googleapis.com',
reconnect : true,
legacySSL: true,
preferredSaslMechanism : 'PLAIN'
});
client.on('online', function() {
console.log('fcm online');
});
client.on('close', function() {
console.log('fcm close');
});
client.on('stanza', function(stanza) {
console.log('fcm stanza');
});
client.on('error', function(e) {
console.log(e);
});
Does anyone know what might be going on? I checked firewall , I can connect through ports 5222,5223, 5269,5298 from inside the container using netcat.