Dan Cropp
2017-Mar-14 16:45 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Some background information. I have used Debian with Asterisk for several years. Have encountered zero problems. I am now trying to setup an Asterisk on a CentOS7 box using VMWare Workstation. I am brand new to CentOS and RHEL so I may be missing something obvious. I am installing CentOS Minimal Install and Asterisk from Source. (I have installed Asterisk from Source on Debian hundreds of times without any problems). After installing CentOS (only root user), I update CentOS. I then install the CentOS "Development Tools". Also install, I install net-tools and wget. After that, I am following the Wiki pages for Asterisk from Source. https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2 I uncompress them, run the asterisk install_prereq script to install all required packages. I configure PJPROJECT, make dep, make, make install, and ldconfig After that, I install asterisk ./configure make menuselect make make install make samples make progdocs make config After that, I modify the asterisk conf files for a couple pjsip endpoints and turn on debugging and verbosity. Copying settings from another box which is working. I am seeing two different issues.... First, when I restart the box, the asterisk process is present. However, it's not writing anything to the log files so it seems to be stuck. Any idea why running Asterisk as a service after the make config would not seem to fully start up? Second, I stop the asterisk service. Make sure asterisk process is not present. Then, I start it up manually going to the console. Everything is running. I see information written to the asterisk log files. However, I try to connect phones to this and it does not work. I used tcpdump to verify the SIP packets are making it to the CentOS box, however Asterisk is not seeing the SIP messages. I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060. The one thing I notice is my Debian installations have always been eth0. CentOS is using the newer ens33. Might this cause a proble? Any suggestions? Have a great day! Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170314/7f49ee12/attachment.html>
Tzafrir Cohen
2017-Mar-14 16:53 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
On Tue, Mar 14, 2017 at 04:45:38PM +0000, Dan Cropp wrote:> After that, I modify the asterisk conf files for a couple pjsip endpoints and turn on debugging and verbosity. Copying settings from another box which is working. > > I am seeing two different issues.... > > First, when I restart the box, the asterisk process is present. However, it's not writing anything to the log files so it seems to be stuck. Any idea why running Asterisk as a service after the make config would not seem to fully start up?You mentioned starting asterisk manually. Do you do that with the proper permissions (assuming you do run Asterisk as a non-root user, as you should). Any chance asterisk does not have write permissions to the log files? Failing that, try strace. strace -p $PID_OF_ASTERISk Maybe also add -f and / or -o if there's too much output. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Jean Aunis
2017-Mar-14 17:03 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Hello, Did you disable selinux ? It usually causes troubles when starting asterisk as a service. You can do this with : setenforce 0 (this will not totally disable selinux, but switch it to a permissive mode). For your second point, maybe you should check that firewalld is either stopped or configured properly. By default it has quite restrictive rules. Best regards Jean Aunis Le 14/03/2017 ? 17:45, Dan Cropp a ?crit :> > Some background information. > > I have used Debian with Asterisk for several years. Have encountered > zero problems. > > I am now trying to setup an Asterisk on a CentOS7 box using VMWare > Workstation. I am brand new to CentOS and RHEL so I may be missing > something obvious. > > I am installing CentOS Minimal Install and Asterisk from Source. (I > have installed Asterisk from Source on Debian hundreds of times > without any problems). > > After installing CentOS (only root user), I update CentOS. I then > install the CentOS ?Development Tools?. > > Also install, I install net-tools and wget. > > After that, I am following the Wiki pages for Asterisk from Source. > > https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source > > Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2 > > I uncompress them, run the asterisk install_prereq script to install > all required packages. > > I configure PJPROJECT, make dep, make, make install, and ldconfig > > After that, I install asterisk > > ./configure > > make menuselect > > make > > make install > > make samples > > make progdocs > > make config > > After that, I modify the asterisk conf files for a couple pjsip > endpoints and turn on debugging and verbosity. Copying settings from > another box which is working. > > I am seeing two different issues?. > > First, when I restart the box, the asterisk process is present. > However, it?s not writing anything to the log files so it seems to be > stuck. Any idea why running Asterisk as a service after the make > config would not seem to fully start up? > > Second, I stop the asterisk service. Make sure asterisk process is > not present. Then, I start it up manually going to the console. > Everything is running. I see information written to the asterisk log > files. However, I try to connect phones to this and it does not > work. I used tcpdump to verify the SIP packets are making it to the > CentOS box, however Asterisk is not seeing the SIP messages. > > I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060. > > The one thing I notice is my Debian installations have always been > eth0. CentOS is using the newer ens33. Might this cause a proble? > > Any suggestions? > > Have a great day! > > Dan > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170314/009d18eb/attachment.html>
Dan Cropp
2017-Mar-14 17:09 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Thank you Tzafrir. I had been using different users in earlier attempts to make this work. Decided to try everything where root is the only user, simply to verify it's working. For problem 2, where asterisk is writing to the log but doesn't seem to receive the SIP packets even though tcpdump indicates they are making it to the box on 5060, I am starting asterisk while logged in as root. /usr/sbin/asterisk -vvvvvvvvdddddddc For problem 1, where it seems to be stuck when running as a service, I simply reboot the machine. Then I log it as root and notice it's not writing to the log. When running it as a service (after restart). Here is what the output from strace -p $PID_OF_ASTERISK [root at localhost ~]# strace -p 1470 Process 1470 attached wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2505 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2505, si_status=0, si_utime=0, si_stime=0} --- wait4(-1, 0x7ffd2cbd4490, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 stat("/bin/pkill", {st_mode=S_IFREG|0755, st_size=28336, ...}) = 0 stat("/bin/pkill", {st_mode=S_IFREG|0755, st_size=28336, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/pkill", X_OK) = 0 stat("/bin/pkill", {st_mode=S_IFREG|0755, st_size=28336, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/pkill", R_OK) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2509 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 2509 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2509, si_status=1, si_utime=0, si_stime=0} --- wait4(-1, 0x7ffd2cbd4490, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=132, ...}) = 0 chdir("/tmp") = 0 stat("/bin/stty", {st_mode=S_IFREG|0755, st_size=70264, ...}) = 0 stat("/bin/stty", {st_mode=S_IFREG|0755, st_size=70264, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/stty", X_OK) = 0 stat("/bin/stty", {st_mode=S_IFREG|0755, st_size=70264, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/stty", R_OK) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2510 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2510 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2510, si_status=0, si_utime=0, si_stime=0} --- wait4(-1, 0x7ffd2cbd3d10, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 stat("/bin/nice", {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0 stat("/bin/nice", {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/nice", X_OK) = 0 stat("/bin/nice", {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/nice", R_OK) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2511 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 2511 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2511, si_status=1, si_utime=3, si_stime=0} --- wait4(-1, 0x7ffd2cbd3e10, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 open("/dev/tty9", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fcntl(1, F_GETFD) = 0 fcntl(1, F_DUPFD, 10) = 10 fcntl(1, F_GETFD) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 dup2(3, 1) = 1 close(3) = 0 write(1, "Asterisk ended with exit status "..., 34) = 34 dup2(10, 1) = 1 fcntl(10, F_GETFD) = 0x1 (flags FD_CLOEXEC) close(10) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 open("/dev/tty9", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fcntl(1, F_GETFD) = 0 fcntl(1, F_DUPFD, 10) = 10 fcntl(1, F_GETFD) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 dup2(3, 1) = 1 close(3) = 0 write(1, "Asterisk died with code 1.\n", 27) = 27 dup2(10, 1) = 1 fcntl(10, F_GETFD) = 0x1 (flags FD_CLOEXEC) close(10) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 pipe([3, 4]) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2512 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGCHLD, {0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, {0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, 8) = 0 close(4) = 0 read(3, "2511\n", 128) = 5 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2512, si_status=0, si_utime=0, si_stime=0} --- wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 2512 wait4(-1, 0x7ffd2cbd39d0, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 5 read(3, "", 128) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 pipe([3, 4]) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2513 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGCHLD, {0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, {0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, 8) = 0 close(4) = 0 read(3, "2017-03-14T12:01:01-0500\n", 128) = 25 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2513, si_status=0, si_utime=0, si_stime=0} --- wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 2513 wait4(-1, 0x7ffd2cbd3b10, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn() = 25 read(3, "", 128) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 stat("/tmp/core.2511", 0x7ffd2cbd4370) = -1 ENOENT (No such file or directory) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 stat("/tmp/core", 0x7ffd2cbd4260) = -1 ENOENT (No such file or directory) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 open("/dev/tty9", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fcntl(1, F_GETFD) = 0 fcntl(1, F_DUPFD, 10) = 10 fcntl(1, F_GETFD) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 dup2(3, 1) = 1 close(3) = 0 write(1, "Automatically restarting Asteris"..., 35) = 35 dup2(10, 1) = 1 fcntl(10, F_GETFD) = 0x1 (flags FD_CLOEXEC) close(10) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0 stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/sleep", X_OK) = 0 stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/sleep", R_OK) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0 rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1a02e24a10) = 2514 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, 8) = 0 wait4(-1, Have a great day! Dan -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tzafrir Cohen Sent: Tuesday, March 14, 2017 11:54 AM To: asterisk-users at lists.digium.com Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7 On Tue, Mar 14, 2017 at 04:45:38PM +0000, Dan Cropp wrote:> After that, I modify the asterisk conf files for a couple pjsip endpoints and turn on debugging and verbosity. Copying settings from another box which is working. > > I am seeing two different issues.... > > First, when I restart the box, the asterisk process is present. However, it's not writing anything to the log files so it seems to be stuck. Any idea why running Asterisk as a service after the make config would not seem to fully start up?You mentioned starting asterisk manually. Do you do that with the proper permissions (assuming you do run Asterisk as a non-root user, as you should). Any chance asterisk does not have write permissions to the log files? Failing that, try strace. strace -p $PID_OF_ASTERISk Maybe also add -f and / or -o if there's too much output. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Dan Cropp
2017-Mar-14 17:54 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Thank you Jean. I changed selinux to permissive in the /etc/selinux/config and restarted. Asterisk was able to start up. One oddity though, I now see two different pids for asterisk (pgrep asterisk). Is this to be expected or do I still have something wrong? For my second issue, after stopping firewalld, SIP traffic is now making it through to Asterisk. I need to research both selinux and firewalld some more. They are both new to me. Have a great day! Dan From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jean Aunis Sent: Tuesday, March 14, 2017 12:04 PM To: asterisk-users at lists.digium.com Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7 Hello, Did you disable selinux ? It usually causes troubles when starting asterisk as a service. You can do this with : setenforce 0 (this will not totally disable selinux, but switch it to a permissive mode). For your second point, maybe you should check that firewalld is either stopped or configured properly. By default it has quite restrictive rules. Best regards Jean Aunis Le 14/03/2017 ? 17:45, Dan Cropp a ?crit : Some background information. I have used Debian with Asterisk for several years. Have encountered zero problems. I am now trying to setup an Asterisk on a CentOS7 box using VMWare Workstation. I am brand new to CentOS and RHEL so I may be missing something obvious. I am installing CentOS Minimal Install and Asterisk from Source. (I have installed Asterisk from Source on Debian hundreds of times without any problems). After installing CentOS (only root user), I update CentOS. I then install the CentOS "Development Tools". Also install, I install net-tools and wget. After that, I am following the Wiki pages for Asterisk from Source. https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2 I uncompress them, run the asterisk install_prereq script to install all required packages. I configure PJPROJECT, make dep, make, make install, and ldconfig After that, I install asterisk ./configure make menuselect make make install make samples make progdocs make config After that, I modify the asterisk conf files for a couple pjsip endpoints and turn on debugging and verbosity. Copying settings from another box which is working. I am seeing two different issues.... First, when I restart the box, the asterisk process is present. However, it's not writing anything to the log files so it seems to be stuck. Any idea why running Asterisk as a service after the make config would not seem to fully start up? Second, I stop the asterisk service. Make sure asterisk process is not present. Then, I start it up manually going to the console. Everything is running. I see information written to the asterisk log files. However, I try to connect phones to this and it does not work. I used tcpdump to verify the SIP packets are making it to the CentOS box, however Asterisk is not seeing the SIP messages. I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060. The one thing I notice is my Debian installations have always been eth0. CentOS is using the newer ens33. Might this cause a proble? Any suggestions? Have a great day! Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170314/b3c36ac8/attachment.html>
Tzafrir Cohen
2017-Mar-14 18:21 UTC
[asterisk-users] Having problem getting Asterisk to work on CentOS 7
On Tue, Mar 14, 2017 at 06:03:33PM +0100, Jean Aunis wrote:> Hello, > > Did you disable selinux ? It usually causes troubles when starting asterisk > as a service. You can do this with : setenforce 0 (this will not totally > disable selinux, but switch it to a permissive mode).Generally before advising that, check if this is the error: tail -f /var/log/audit/audit.log and try the command. Is there any open bug for a security policy for Asterisk? -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Reasonably Related Threads
- Sieve redirect does not collect the sendmail child process correctly (Dovecot 2.3.4.1, Pigeonhole 0.5.4)
- Sieve redirect does not collect the sendmail child process correctly (Dovecot 2.3.4.1, Pigeonhole 0.5.4)
- Issue with geo-replication and nfs auth
- Having problem getting Asterisk to work on CentOS 7
- Dovecot v2.3.5 released