Difficulty Running OTP 25 With FreeSwitch On Local Machine

Hi Friends!

I spooled up an AWS EC2 Debian machine and have installed both Erlang/OTP 25 and the latest version of FreeSwitch. However, I cannot seem to verify the connection between the two of them and documentation is, unsurprisingly, limited.

This is my Erlang event configuration file:

<configuration name="erlang_event.conf" description="Erlang Socket Client">
  <settings>
    <param name="listen-ip" value="127.0.0.1"/>
    <param name="listen-port" value="8031"/>
    <!-- Specify the first part of the node name
         (the host part after the @ will be autodetected)
         OR pass a complete nodename to avoid autodetection
         eg. freeswitch@example or freeswitch@example.com.
         If you pass a complete node name, the 'shortname' parameter has no effect. -->
    <param name="nodename" value="freeswitch@ip-172-31-84-82"/>
    <!-- Specify this OR 'cookie-file' or $HOME/.erlang.cookie will be read -->
    <param name="cookie" value="ClueCon"/>
    <!-- Read a cookie from an arbitary erlang cookie file instead -->
    <!--<param name="cookie-file" value="/$${temp_dir}/erlang.cookie"/>-->
    <param name="shortname" value="true"/>
    <!-- in additon to cookie, optionally restrict by ACL -->
    <!--<param name="apply-inbound-acl" value="lan"/>-->
    <!-- alternative is "binary" -->
    <param name="encoding" value="binary"/>
    <!-- provide compatability with previous OTP release (use with care) -->
    <!--<param name="compat-rel" value="12"/> -->
  </settings>
</configuration>

I am positive mod_erlang_event has loaded, verified with this command/output below:

sudo grep -i "published erlang cnode" /var/log/freeswitch/freeswitch.log | tail -1
2025-06-24 18:09:06.276076 99.87% [DEBUG] mod_erlang_event.c:2092 Connected to epmd and published erlang cnode at freeswitch@ip-172-31-84-82

Checking empty epmd names, I see:

epmd -names
epmd: up and running on port 4369 with data:
name freeswitch at port 8031

I then try to spawn an Erlang node with cookies like the following:

erl -sname test -setcookie ClueCon

And then simply try to ping the node like so:

(test@ip-172-31-84-82)1> net_kernel:verbose(1).
0
(test@ip-172-31-84-82)2> net_adm:ping('freeswitch@ip-172-31-84-82').

Which almost exclusively returns pang rather than pong. The verbose output is

=INFO REPORT==== 24-Jun-2025::18:10:52.977509 === {net_kernel,{auto_connect,'freeswitch@ip-172-31-84-82', {14607677,#Ref<0.2232301458.1565917185.77160>}}} =INFO REPORT==== 24-Jun-2025::18:10:52.982964 === {net_kernel,{'EXIT',<0.93.0>,shutdown}} =INFO REPORT==== 24-Jun-2025::18:10:52.983042 === {net_kernel,{net_kernel,1411,nodedown,'freeswitch@ip-172-31-84-82'}} pang =INFO REPORT==== 24-Jun-2025::18:10:52.983147 === {net_kernel,{disconnect,'freeswitch@ip-172-31-84-82'}}

I’ve also tried to modify the configuration file to not include the host name (and changed the short name toggle as a result). I’ve also tried to configure and ping freeswitch@localhost, which hangs.

Any help would be greatly appreciated!

Hello,

You may want to check the contents of /etc/hosts as well as any active firewall on your system.

When debugging this in the past, it’s helped me to remove as many variables as possible. For instance, try this in 2 different shells:

erl -name a@127.0.0.1 -setcookie TEST

erl -name b@127.0.0.1 -setcookie TEST

If you get pang, look for any active local firewall rules that may be in effect. If you get pong, you can move to -sname a/-same b etc. Eventually you should find whatever is standing in the way of the freeswitch node connection.

HTH