SOLVED New install Stuck, no Asterisk

Yahdie

Guru
Joined
Oct 16, 2009
Messages
199
Reaction score
7
http://pbxinaflash.com/community/threads/cannot-start-amportal-error-below.17443/
Code:
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exists. Attempting to create it with: 'mkdir -p '
mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.
Having the same issue, and the last part of the installation hangs.....
Asterisk was running as root, so I used the fix (#9)from Nerd Vittles Article below:
http://nerdvittles.com/?p=14656
Problem now is I can't complete the install and this system is going live in 24 hrs in another country and I don't have time to rebuild the system from scratch
Multiple dangling symlinks when trying to start Asterisk
I'm tearing my hair out....whats left of it....
PIAF Green with Asterisk w/Asterisk 10 (same issue with Asterisk 11)
 
Last edited:

Yahdie

Guru
Joined
Oct 16, 2009
Messages
199
Reaction score
7
There is something really wrong with this install process, 6 attempts same issue
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
I too am getting the same issues on CentOS 6.8 with the latest version of Asterisk. The build went over 30 minutes and I finally got to the "finished" screen which tells me about iptables and blah blah blah.

When I told my server to restart it hung at "restarting fail2ban" so I power cycled the server through the control panel. When the server came back up I did the usual updates and stuff and saw Asterisk was down along with Apache and several other things (does Apache even run on CentOS? I thought it was httpd)

so yeah the build is officially broken. I think Ward or someone should create a Travis test to build a server every so often to make sure we're getting clean and accurate install scripts.

EDIT: tried on Parallels with CentOS 6.8 freshly installed and the build worked. Trying again on DO because 2nd time is always the charm. If it doesn't work on DO then I'll post back here

EDIT: fail2ban hangs when trying to reboot on DO and the build took way longer than expected compared to my local VM

EDIT: Posted a "dump" of both builds. The private IP address is my Parallels build and my other IP address is my DO build

https://pastebin.com/MB4c6e86

Sorry about it being so long
 
Last edited:

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
@wardmundy I've been using those for quite a while. They all worked fine until yesterday (I posted a complete console dump of both my Parallels build which passed with flying colours and my DO build which failed for some reason and took longer than expected)
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
There is something really wrong with this install process, 6 attempts same issue

I bet if you tried it a seventh time it would have worked. o_O

Go through some methodical troubleshooting...

http://pbxinaflash.com/community/threads/cannot-start-amportal-error-below.17443/
Code:
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exists. Attempting to create it with: 'mkdir -p '
mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

astrundir is set in /etc/asterisk/asterisk.conf, so look there and see what it's set to. According to the error message it is set to nothing, so look through the script and see why it's not set. Or set it manually to the proper location (/var/run/asterisk) and then try to start Asterisk. If you make any progress then work through the next error message. Eventually you'll figure out where the script failed and be able to fix it for next time.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
It would be extremely helpful to know which tutorial you followed. It's difficult to diagnose problems when you have no idea which operating system platform is being deployed.
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
In my case I was using CentOS 6.8 in both cases (currently trying 7.2 to see if it would make a difference)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
In my case I was using CentOS 6.8 in both cases (currently trying 7.2 to see if it would make a difference)

Does it fail with CentOS 6.8 on D.O. or just on Parallels? On D.O., are you using a 512MB platform? Did you enable a 1GB swapfile as covered in the tutorial?
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
6.8 failed on DO - fail2ban hangs when stopping/restarting. I had to manually power cycle the server. When the server came back up practically all the services were down (don't remember what exactly) but it didn't look normal. I'll see if CentOS 7 builds on DO and get back to you
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
You didn't answer the other questions? Is it a 512MB platform? Did you enable a 1GB swap file before starting the install? Just as an FYI, power cycling any Linux server particularly after a lengthy period of disk writes is a very bad idea and usually results in file corruption even assuming everything else went swimmingly.
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
Yes and yes

$5 droplet (512mb) with 1GB swap. I've done the procedure half a dozen times so I haven't done anything different
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
I'll try a clean install in the morning and see what we see. Thanks.
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
In case you're wondering, my CentOS 7 build reboots and during the update script I get stuck at "
Redirecting to /bin/systemctl restart fail2ban.service" for a long time. On the Vultr build it took quite a bit too but eventually showed me the status screen. Just waiting on the DO build.

EDIT: just got passed fail2ban hanging and now its installing the rest. I'll give the server another reboot after

EDIT 2: It took the server quite a while to come up again but once the reboot finished everything shows screen. I'm confused why there are so many problems now vs before. The build felt like it was taking forever too
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
A million things can cause momentary (or longer) hiccups in the Land of Internet. Sounds like you've gotten everything squared away now. Correct?
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
Perhaps but I'd like to be absolutely certain. I'll run another CentOS 6.8 build on DO and see what comes of it.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Just created a CentOS 6.8, 64-bit D.O. droplet at 9:12 a.m., Sunday, as shown below:
Cq8uPq9WAAAZSva.jpg


I then ran through the install steps in this Nerd Vittles tutorial without any problems and then rebooted. Build time: 35 minutes

Logged in again, went through Automatic Update Utility. Typed amportal restart at command prompt.

We obviously haven't done extensive testing, but everything looks good to go...

Did find an issue with IP6tables setup, and that has been addressed.

Cq83-t1UMAA0hEW.jpg


Cq84HFkWEAAUPuP.jpg
 
Last edited:

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
Just tried the build again and noticed it took a LONG time to reboot the server. It was stuck on stopping fail2ban for a good minute. After the reboot I was able to run the updater and noticed that on the initial status screen that Asterisk and a lot of stuff was down:
down.png


Below is a picture of the "normal" behaviour of my production system. I setup both builds with no OAUTH since I wouldn't even be using GV anyways

normal.png


After a reboot or two of the first server (first screenshot) things turned back to the way they should. Maybe I was connecting too fast while things were still starting up? Who knows? But thats just my experience.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
D.O. is a shared platform. Usually, but not always, the performance is pretty good. But it's not instantaneous like a $5,000 standalone machine.
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top