I have a test installation of Asterisk that has been running without issue for quite awhile, that I can no longer connect to the console of. when I execute asterisk -rvvv I receive the “Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)” error
/var/run/asterisk.ctl does it exist, I believe the permissions are correct: srwxr-xr-x (running as root). the file asterisk.pid also exists in this directory
asterisk -cvvvvvv appears to output everything normal, with the exception of this:
SIP channel loading...
== Parsing '/etc/asterisk/sip.conf': Found
Illegal instruction
I am getting core dump files in /tmp. the output of which I do not understand, enough to fill the directory to 100%. I enter the command file corefilename and this is the output
#localhost.localdomain-2021-09-13T13:41:33-0400: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/usr/sbin/asterisk -f -vvvg -c', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0
As I understand in that message, the -f is telling asterisk to run in the foreground, the -v is verbosity and the -g is to dump a core file in case of crash. Does this constant core dump indicate I need to reinstall Asterisk?
service asterisk status shows as running.
/var/log/full does not seem to be indicating any errors. The most recent logs show some Manager registered actions…config.c Parsing Found…nothing that seems to indicate an error.
I am not sure this matters, or if it was changed but asterisk.conf shows astcl commented out. this seems to match the wiki example.
Asterisk wasn’t compiled on the machine it was running on and was optimised for the machine on which it was built, or it was built on a VM that lies about its processor capabilities (a known problem). There is an option with NATIVE in its name which can be used to prevent instruction set optimisation.
The .ctl error is because Asterisk is no longer running.
so I think what I want to do then is disable the BUILD_NATIVE option in menuselect?
However there are multiple listings of Asterisk in my /usr/src/asterisk. If I make any changes to menuselect from any of those directories will asterisk know the changes have been made or do I have to pick the correct folder to run menuselect from?
I thought we were running v13 but we have directories for 13.13.0, 13.13.1, 14.2.1, and 14.7.8. I do not know how to verify my version without getting to the console and sudo asterisk -rx "show version" does not work…with asterisk not running I suppose that would be expected
I am able to run make menuselect from both of the 14 directories. but not the 13. so I guess that would mean version 14
Aside from being confusing, having multiple source directories is not a problem. Once you determine the version you are running, ‘cd’ to that directory.
Note that all of the versions you have are out of date. You may want to consider updating to current releases. (After perusing intervening change logs.)
Curious why this system could have been running for so long with the BUILD_NATIVE option enabled, then suddenly become affected by it? I believe this system was built a few years ago with this config. Any idea why it would impact it now?
I plan on implementing the changes today and will update this thread with how it goes.
that does not seem to have done the trick. I disabled BUILD_NATIVE option in menuselect. Then from my asterisk directory ran ./configure and got the great success logo…
but sill getting the same error when asterisk -rvvvvv and asterisk -cvvvvvvv returns the same output, ending with illegal instruction at SIP channel loading…though it seems to have gotten further through it this time around?
As for the reinstall I have gone through the documentation and ran the following, and still have the same issue
tar -zxvf asterisk-14.7.8.tar.gz
make
menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
./configuire
service asterisk status
service asterisk start
asterisk -rvvvvv cannot connect, asterisk -cvvvvvv returns the same output with the Illegal instruction error at the SIP channel loading.
I am also still getting core dump files…and that has not seemed to change output
#localhost.localdomain-2021-09-16T08:07:36-0400: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/usr/sbin/asterisk -f -vvvg -c', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/sbin/asterisk', platform: 'x86_64'
The find doesn’t tell you anything about running processes but does tell you the installed version of chan_sip.so is form January 6th last year, not any of the ones you built recently.
tar -zxvf asterisk-14.7.8.tar.gz
./configure
make menuselect
make
make install
I guess you can run menuselect in the command line form, instead of the make, if has previously been built.
It seems that Asterisk (no longer) follows the convention of having an INSTALL file and build instructions are in README.md.
I tried this again, in this order - except this time with the intention of making the BUILD_NATIVE change from the menu option not CLI.
tar -zxvf asterisk-14.7.8.tar.gz
./configure
make menuselect
make
make install
during the make menuselect I got this error
***********************************************************
The existing menuselect.makeopts file did not specify
that 'test_xml_escape' should not be included. However, either some
dependencies for this module were not found or a
conflict exists.
Either run 'make menuselect' or remove the existing
menuselect.makeopts file to resolve this issue.
***********************************************************
so I ran rm menuselect.makeopts and retried. Now I can access the menuselect menu, disabled BUILD_NATIVE and continued on to make…but now I am getting these missing character errors:
#localhost:/usr/src/asterisk-14.7.8[root@phast#localhost asterisk-14.7.8]# make
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-14.7.8/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-14.7.8/menuselect'
[CC] func_version.c -> func_version.o
In file included from func_version.c:39:0:
/usr/src/asterisk-14.7.8/include/asterisk/build.h:5:24: warning: missing terminating " character [enabled by default]
#define BUILD_HOSTNAME "phast
^
/usr/src/asterisk-14.7.8/include/asterisk/build.h:6:2: error: invalid preprocessing directive #localhost
#localhost.localdomain"
^
/usr/src/asterisk-14.7.8/include/asterisk/build.h:6:23: warning: missing terminating " character [enabled by default]
#localhost.localdomain"
^
func_version.c: In function ‘acf_version_exec’:
func_version.c:101:4: error: missing terminating " character
response_char = BUILD_HOSTNAME;
^
func_version.c:101:34: error: expected expression before ‘;’ token
response_char = BUILD_HOSTNAME;
^
make[1]: *** [func_version.o] Error 1
make: *** [funcs] Error 2
I went into the build.h file and corrected the hostname line. not sure why it was appending a line break in there? that seems to have corrected that issue.
after the make and makeinstall seems like everything is good to go now…onto testing
oh also sudo find / -xdev -name chan_sip.so -ls now shows chan_sip.so as installed for todays date in both /usr/lib/asterisk/modules and /usr/src/asterisk-version and it seems I am no longer taking core dump files.