how to open ejabberd server to public
Verify that connections really go through to the server.
On an Internet-connected box use
telnet
,nc
or a similar command to verify connecting to well-known ports of your server works. Do$ telnet 123.123.10.210 5222
and then type in some gibberish and press Enter to send it—you should receive an XML stanza from your server telling you you've sent a malformed stream and indicating a stream closure (to exit
telnet
session, press Crl-] then enter q and hit Enter).If this command hangs and then times out or outright fails, you have a network connectivity problem.
When you're checking it's really handy to have an instance of
tcpdump
running to see if clien't packets come in and replies come out:# tcpdump -n -i eth0 'tcp and (port 5222 or port 5269)'
(substitute the name of your Internet-connected interface instead of
eth0
).You must have a proper DNS setup for your XMPP domain.
That is, if your users have JIDs in
example.domain.com
, everyone on the Internet should be able to ask their DNS servers about how to contact users with JIDs in that domain using XMPP. This is done using SRV records. The DNS server(s) maintaining theexample.domain.com
must have two DNS records:_xmpp-client._tcp.example.domain.com
pointing to the host and port of the server accepting client connections (so they should be123.123.10.210
and5222
)._xmpp-server._tcp.example.domain.com
pointing to the host and port of the server accepting server connections (so they should be123.123.10.210
and5269
).
More info here.
Run
$ host -t srv _xmpp-client._tcp.gmail.com
$ host -t srv _xmpp-server._tcp.gmail.comto get some idea about how it should look like.
One more thing to be aware here is that if your server is in a DMZ (not directly connected to Internet but mediated by a NAT device) the firewall setup should be more involved. But before delving into this please check the connectivity as explained above.
What is the max number of users per room on ejabberd?
Ok, we tried to set max users per room to 5000 and that worked.
max_users: Number: This option defines at the service level, the
maximum number of users allowed per room. It can be lowered in each
room configuration but cannot be increased in individual room
configuration. The default value is 200.
It looks like, I misunderstood what the doc says: The limit max users per room is set globally. It can be only lowered per room (it can't be increased over the global maximum).
Note: we would expect the server to log an error or at least a warning, why value 10000 can't be set, but we couldn't find anything.
Installing exmpp on Centos
You can install exmpp in two ways. both will work
Installation via source
Download the source from the following Source_Link
cd /usr/local/src/
wget the source here.
tar -xvf file.tar.gz
cd exmpp*
autoreconf -i
./configure
make
make install
Installation complete.
Installation via git
git clone git://git.process-one.net/exmpp/mainline.git exmpp_mainline
cd exmpp_mainline
./configure
make
make install
Installation is complete.
There are few dependencies for the exmpp to get installed. Make sue that they are installed in the server.
- Erlang/OTP
C compiler
gcc
XML parsing library
LibXML2
Expat
Related Topics
How to Start/Restart/Stop Apache Server on Linux as Non-Root User
Using Sed Replace Line in File with Another File
Installing Gnu Parallel Without Root Permission
Environment Variable Used in Shell Script Appear Blank in Log File When Run by Cron
File Glob Patterns in Linux Terminal
How to Set Firefox Binary Path of Firefox in Selenium in Linux
How to Switch to Root User Without Entering Password in Bash Script on Redhat
How to Make a Programme Executable Anywhere in the Shell
Shell Command to Get Directory with Least Access Date/Time
Determine Os from a Single Command Line Operation
Use Bash Variable Within Slurm Sbatch Script
How to Make Linux Power Off When Halt Is Run
How to Scale Ejabberd Server MAChine on Centos to Handle 200 K Connections
How to Run Ionic in the Background
Print the Output of Strace Command in a Text File
Run Bash Script in Raspberry Pi via Ifttt