Unable to connect to remote asterisk

Hello,
I’m using Linux Centos7
I have install the server from this guide
https://computingforgeeks.com/how-to-install-asterisk-pbx-18-lts-on-centos-7/
then I have added the FreePBX using this guide:
https://computingforgeeks.com/how-to-install-freepbx-on-centos-rhel/

I have added 2 users in extentions - abel to connect from 1 PC and one android device.
then I have reboot my server , jsut to be sure all is working.
and now I get this error in the FreePBX page
“Cannot connect to Asterisk”

I guess something in the permissions
I saw that the serice is down after boot
so I have enable it

sudo systemctl status asterisk

I can see it’s running now

asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
[opc@asterisk-pbx-18–centos-7 ~]$ sudo systemctl start asterisk
[opc@asterisk-pbx-18–centos-7 ~]$ sudo systemctl status asterisk
● asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: active (exited) since Tue 2022-07-26 15:31:09 IDT; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 3642 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)

but still not working

I have check

asterisk -r
asterisk: /usr/lib64/libjansson.so.4: no version information available (required by asterisk)
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

there is no such file only asterisk.pid

what is wrong? - not working correct ?

please tell me what command to run , and I will show you the replay from them

Thanks,

I there a particular reason you used self install instructions instead of just installing the FreePBX Distro? FreePBX15-16 installation - PBX Platforms - Documentation

this was the first answer google for
install freepbx in centos 7
also I’m using oracle cloud , and not a PC

is there naything I can do?
is there a cloud intallation I can use?

Thanks,

I would install libjansson the error suggests your missing that and maybe more dependencies.

you might have selinux running which can do things you don’t expect.

Try starting at command prompt as asterisk -vvvvvc See what you get for errors.
But ultimately you are in a advanced install and so you have to do a lot of the work as its far outside the normal condition.

still not working

this is what I did:

 sudo yum install libjansson
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                    |  20 kB  00:00:00
 * base: uk.mirrors.clouvider.net
 * epel: fedora.mirrorservice.org
 * extras: uk.mirrors.clouvider.net
 * remi-php74: mirror.netweaver.uk
 * remi-safe: mirror.netweaver.uk
 * updates: uk.mirrors.clouvider.net
base                                                                                    | 3.6 kB  00:00:00
epel                                                                                    | 4.7 kB  00:00:00
extras                                                                                  | 2.9 kB  00:00:00
mariadb-main                                                                            | 3.4 kB  00:00:00
mariadb-maxscale                                                                        | 2.5 kB  00:00:00
mariadb-tools                                                                           | 2.9 kB  00:00:00
remi-php74                                                                              | 3.0 kB  00:00:00
remi-safe                                                                               | 3.0 kB  00:00:00
updates                                                                                 | 2.9 kB  00:00:00
(1/3): epel/x86_64/updateinfo                                                           | 1.1 MB  00:00:04
(2/3): remi-safe/primary_db                                                             | 2.2 MB  00:00:00
(3/3): epel/x86_64/primary_db                                                           | 7.0 MB  00:00:35
No package libjansson available.
Error: Nothing to do

the selinux is disable

setenforce 0
sudo sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config

 sestatus
SELinux status:                 disabled

thie is what I get :

sudo asterisk -vvvvvc
asterisk: /usr/lib64/libjansson.so.4: no version information available (required by asterisk)
Unable to access the running directory (Permission denied).  Changing to '/' for compatibility.
Asterisk 18.13.0, Copyright (C) 1999 - 2021, Sangoma Technologies Corporation and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Running as user 'asterisk'
Running under group 'asterisk'
XSLT support not found. XML documentation may be incomplete.
Manager registered action DBGet
Manager registered action DBPut
Manager registered action DBDel
Manager registered action DBDelTree
PBX UUID: 12159faf-e96f-4288-8b60-b03da3660aeb
There was a problem finding jansson 2.11 runtime libraries.
Please rebuild Asterisk using ./configure --with-jansson-bundled.
libjansson initialization failed.  ASTERISK EXITING!
Manager unregistered action DBGet
Manager unregistered action DBPut
Manager unregistered action DBDel
Manager unregistered action DBDelTree

is there anything else I can do?
maybe another installtion file? image I can run ?

Thanks ,

… rebuild Asterisk using ./configure --with-jansson-bundled. perhaps ?

I have run this command
still not working
do I need to run anything else after it?

Thanks,

You have to rebuild asterisk after it. ./configure simply does customisations to the build configuration; you sill need to run make menuconfig, make, etc.

this is what I have done:

make
make install
make samples
make config
systemctl restart asterisk
systemctl status asterisk
asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
   Active: active (running) since Wed 2022-07-27 11:14:31 IDT; 5s ago
     Docs: man:systemd-sysv-generator(8)

now I’m able to enter cmd

asterisk -r
Asterisk 18.13.0, Copyright (C) 1999 - 2021, Sangoma Technologies Corporation and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 18.13.0 currently running on asterisk-pbx-18--centos-7 (pid = 13046)
asterisk-pbx-18--centos-7*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups

but on the FreePBX web page I still get ‘Cannot connect to asterisk’ ,
I have try to restart the FreePBX using

fwconsole stop
fwconsole start

now the asterisk won’t stat

systemctl status asterisk
● asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

Jul 27 11:14:31 asterisk-pbx-18--centos-7 systemd[1]: Starting LSB: Asterisk PBX...
Jul 27 11:14:31 asterisk-pbx-18--centos-7 asterisk[13017]: Starting asterisk:
Jul 27 11:14:31 asterisk-pbx-18--centos-7 systemd[1]: Can't open PID file /var/run/asterisk/asterisk.pid ...ory
Jul 27 11:14:31 asterisk-pbx-18--centos-7 systemd[1]: asterisk.service: Supervising process 13046 which i...ts.
Jul 27 11:14:31 asterisk-pbx-18--centos-7 systemd[1]: Started LSB: Asterisk PBX.
Jul 27 11:23:30 asterisk-pbx-18--centos-7 asterisk[15150]: Stopping safe_asterisk: [FAILED]
Jul 27 11:23:30 asterisk-pbx-18--centos-7 asterisk[15150]: Shutting down asterisk: [FAILED]
Hint: Some lines were ellipsized, use -l to show in full.
[root@asterisk-pbx-18--centos-7 asterisk-18.13.0]# fwconsole start
Running FreePBX startup...
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 0 seconds
Setting specific permissions...
 18029 [============================]
Finished setting permissions
Starting Asterisk...
[--------------->------------] 30 secs
In Start.class.php line 193:

  Unable to connect to Asterisk. Did it start?


start [--pre] [--post] [--skipchown] [--] [<args>]...

what else could it be ?

Thanks,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.