Connection to Event Socket failed.

Status
Not open for further replies.

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
Freeswitch will not load


Can not access fs_cli

Connection to Event Socket failed.

I have rebooted and no sucess

Any help would greatly be appreciated
 
Last edited:

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
This is my switch.conf.xml file and I checked in settings to listen on 8021

<configuration name="switch.conf" description="Core Configuration">

<cli-keybindings>
<key name="1" value="help"/>
<key name="2" value="status"/>
<key name="3" value="show channels"/>
<key name="4" value="show calls"/>
<key name="5" value="sofia status"/>
<key name="6" value="reloadxml"/>
<key name="7" value="console loglevel 0"/>
<key name="8" value="console loglevel 7"/>
<key name="9" value="sofia status profile internal"/>
<key name="10" value="sofia profile internal siptrace on"/>
<key name="11" value="sofia profile internal siptrace off"/>
<key name="12" value="version"/>
</cli-keybindings>

<default-ptimes>
<!-- Set this to override the 20ms assumption of various codecs in the sdp with no ptime defined -->
<!-- <codec name="G729" ptime="40"/> -->
</default-ptimes>

<settings>
<!-- Colorize the Console -->
<param name="colorize-console" value="true"/>

<!-- Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default -->
<!-- <param name="1ms-timer" value="true"/> -->

<!--
Set the Switch Name for HA environments.
When setting the switch name, it will override the system hostname for all DB and CURL requests
allowing cluster environments such as RHCS to have identical FreeSWITCH configurations but run
as different hostnames.
-->
<!-- <param name="switchname" value="freeswitch"/> -->

<!-- Maximum number of simultaneous DB handles open -->
<param name="max-db-handles" value="50"/>
<!-- Maximum number of seconds to wait for a new DB handle before failing -->
<param name="db-handle-timeout" value="10"/>

<!-- Minimum idle CPU before refusing calls -->
<!-- <param name="min-idle-cpu" value="25"/> -->

<!--
Max number of sessions to allow at any given time.

NOTICE: If you're driving 28 T1's in a single box you should set this to 644*2 or 1288
this will ensure you're able to use the entire DS3 without a problem. Otherwise you'll
be 144 channels short of always filling that DS3 up which can translate into waste.
-->
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
<param name="sessions-per-second" value="30"/>
<!-- Default Global Log Level - value is one of debug,info,notice,warning,err,crit,alert -->
<param name="loglevel" value="debug"/>

<!-- Set the core DEBUG level (0-10) -->
<!-- <param name="debug-level" value="10"/> -->

<!-- SQL Buffer length within rage of 32k to 10m -->
<!-- <param name="sql-buffer-len" value="1m"/> -->
<!-- Maximum SQL Buffer length must be greater than sql-buffer-len -->
<!-- <param name="max-sql-buffer-len" value="2m"/> -->

<!--
The min-dtmf-duration specifies the minimum DTMF duration to use on
outgoing events. Events shorter than this will be increased in duration
to match min_dtmf_duration. You cannot configure a dtmf duration on a
profile that is less than this setting. You may increase this value,
but cannot set it lower than 400. This value cannot exceed
max-dtmf-duration. -->
<param name="min-dtmf-duration" value="640"/>

<!--
The max-dtmf-duration caps the playout of a DTMF event at the specified
duration. Events exceeding this duration will be truncated to this
duration. You cannot configure a duration on a profile that exceeds
this setting. This setting can be lowered, but cannot exceed 192000.
This setting cannot be set lower than min_dtmf_duration. -->
<!-- <param name="max-dtmf-duration" value="192000"/> -->

<!--
The default_dtmf_duration specifies the DTMF duration to use on
originated DTMF events or on events that are received without a
duration specified. This value can be increased or lowered. This
value is lower-bounded by min_dtmf_duration and upper-bounded by
max-dtmf-duration\. -->
<!-- <param name="default-dtmf-duration" value="2000"/> -->

<!--
If you want to send out voicemail notifications via Windows you'll need to change the mailer-app
variable to the setting below:

<param name="mailer-app" value="msmtp"/>

Do not change mailer-app-args.
You will also need to download a sendmail clone for Windows (msmtp). This version works without issue:
http://msmtp.sourceforge.net/index.html. Download and copy the .exe to %winddir%\system32.
You'll need to create a small config file for smtp credentials (host name, authentication, tls, etc.) in
%USERPROFILE%\Application Data\ called "msmtprc.txt". Below is a sample copy of this file:

###################################
# The SMTP server of the provider.
account provider
host smtp.myisp.com
from john@myisp.com
auth login
user johndoe
password mypassword

# Set a default account
account default : provider
###################################
-->
<!--<param name="mailer-app" value="sendmail"/>-->
<!--<param name="mailer-app-args" value="-t"/>-->
<param name="mailer-app" value="/usr/bin/php /var/www/fusionpbx/secure/v_mailto.php"/>
<param name="mailer-app-args" value="-t"/>
<param name="dump-cores" value="yes"/>
<!-- Enable verbose channel events to include every detail about a channel on every event -->
<!-- <param name="verbose-channel-events" value="no"/> -->

<!-- Enable clock nanosleep -->
<!-- <param name="enable-clock-nanosleep" value="true"/> -->

<!-- Enable monotonic timing -->
<!-- <param name="enable-monotonic-timing" value="true"/> -->

<!-- NEEDS DOCUMENTATION -->
<!-- <param name="enable-softtimer-timerfd" value="true"/> -->
<!-- <param name="enable-cond-yield" value="true"/> -->
<!-- <param name="enable-timer-matrix" value="true"/> -->
<!-- <param name="threaded-system-exec" value="true"/> -->
<!-- <param name="tipping-point" value="0"/> -->
<!-- <param name="timer-affinity" value="disabled"/> -->
<!-- NEEDS DOCUMENTATION -->

<!-- RTP port range -->
<!-- <param name="rtp-start-port" value="16384"/> -->
<!-- <param name="rtp-end-port" value="32768"/> -->

<param name="rtp-enable-zrtp" value="true"/>

<!-- <param name="core-db-dsn" value="$${dsn}" /> -->
<!--
Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for
better performance on most linux distro (note, you loose the data if you reboot))
-->
<!-- <param name="core-db-name" value="/dev/shm/core.db" /> -->

<!-- The system will create all the db schemas automatically, set this to false to avoid this behaviour -->
<!-- <param name="auto-create-schemas" value="true"/> -->
<!-- <param name="auto-clear-sql" value="true"/> -->
<!-- <param name="enable-early-hangup" value="true"/> -->

<!-- <param name="core-dbtype" value="MSSQL"/> -->

<!-- Allow multiple registrations to the same account in the central registration table -->
<!-- <param name="multiple-registrations" value="true"/> -->

</settings>

</configuration>
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
root@npusa:~# systemctl status freeswitch.service
● freeswitch.service - freeswitch
Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled)
Active: failed (Result: start-limit) since Sat 2018-02-24 20:34:11 UTC; 13s ago
Process: 710 ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS (code=exited, status=1/FAILURE)

Feb 24 20:34:11 npusa systemd[1]: freeswitch.service: control process exited, code=exite...s=1
Feb 24 20:34:11 npusa systemd[1]: Failed to start freeswitch.
Feb 24 20:34:11 npusa systemd[1]: Unit freeswitch.service entered failed state.
Feb 24 20:34:11 npusa systemd[1]: freeswitch.service holdoff time over, scheduling restart.
Feb 24 20:34:11 npusa systemd[1]: Stopping freeswitch...
Feb 24 20:34:11 npusa systemd[1]: Starting freeswitch...
Feb 24 20:34:11 npusa systemd[1]: freeswitch.service start request repeated too quickly,...rt.
Feb 24 20:34:11 npusa systemd[1]: Failed to start freeswitch.
Feb 24 20:34:11 npusa systemd[1]: Unit freeswitch.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
I guess I am going to have to destroy the server then rebuild it. I didn't make a back up :(
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
I just need to go and pick up mrs, from work will be back in about three quarters of an hour

In the meantime, what files on the filesystem have you changed, I can definitely see files present that shouldn't be?

You are aware that most of the config gets delivered out of the database on demand and in general you shouldn't be touching the xml files at all?
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
I was trying to use OPENCNAM as my cnam provider in the xml file cidlookup. I will be happy to pay you to fix things. I use ip authentication with opencnam so the SID and auth token are not even necessary.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
Still not properly back though, about another 20 mins, looks like there is some corrupt xml though.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
I wonder how a default.xml would even get in there. I didn't put it there. Sounds like a gremlin was messing with my xml
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
I'm nailing it slowly, there are multiple problems, cannot understand how it has got like this.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
I guess more important than fixing the problem is to determine how the problem occurred.

Here are some facts:

- Installed a fresh installaton yesterday
- I use Vultr servers cloud
- Today I added a domain
- Today I messed with the cidlookup xml to work with open cnam
- Today I went to default settings and input smtp info for voicemail to email
- I added gateways, extensions, etc...

That was it
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
There was something else you did that I just found that really was the start of all your problems...

At some point you did this, its in the history:

apt-get update && apt-get install -y freeswitch-meta-all

Installing freeswitch-meta-all overwrote the custom fusionpbx systemd freeswitch.service, this then cause all the wrong permissions to be used, ie freeswitch was now running as user freeswitch rather than user www-data

Its now running again, on top of this there is corruption in the cid lookup file, I have moved it to a file named with a .bak suffix

The box is now running again at least.

I don't know what further problems that meta all may cause in the future.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
You are an awesome person to take time out of your day and help a complete stranger. I am taking an online course as we speak 2 - 3 hours per day in Linux, Debian specifically, and Fusionpbx. I am learning. I probably took something I learned in the freeswitch area and applied it to the server not thinking about its interaction with Fusionpbx. Thank you for your help and if there is any way I can ever help you with anything you let me know.
 
Status
Not open for further replies.