Need a new search?
If you didn't find what you were looking for, try a new search!
-
AuthorSearch Results
-
#6774 In reply to: AMI connection issue at startup |
You have a number of issues:
1. The following error in your event log indicates that HAAst is unable to successfully start Asterisk (and/or FreePBX services).
Fri Aug 10 06:47:42 2018, 00000721, E, System Command, Failed to start Asterisk (start) wrapper. Run result 3; exitcode 0
What have you set your ‘distribution’ key to in the [asterisk] stanza of your haast.conf file? Are you running the fully open source version of FreePBX or proprietary (FreePBX ‘distro’)? If open source, on what Linux distro and architecture?
This error indicates Asterisk is not being started (properly), and also explains why you aren’t getting an AMI connection error. (Error 0 means HAAst could not establish a connection to the AMI)2. The follow errors in your event log suggest your PeerLinkServer is listening on the same IP that you are using for the dynamic HAAst created interface:
Fri Aug 10 06:46:56 2018, 00001901, I, Peer Link Server, PeerLinkServer listening on 12.34.56.78:3002
Fri Aug 10 06:47:10 2018, 00010106, I, NIC, IP address ‘12.34.56.78’ added to physical NIC device ‘eth0’ as new virtual NIC device ‘eth0:haast’
Have you obfuscated the IP addresses in your posting? If not you will need to fix your IP addresses (which may also prevent Asterisk from Starting depending on the FreePBX settings).
3. The reason you see snoozing messages relates to the promotesnoozetime and demotesnoozetime keys in the [cluster] stanza of haast.conf. This has nothing to do with your problem – in fact I suggest you leave those settings at default until you understand HAAst a little better. As background, these settings prevent the cluster from flipping back and forth in the event that it takes Asterisk some time to stabilize. (See https://telium.io/topic/manual-failover-leads-to-brief-dual-active-contention/ for more info).
4. HAAst does not interact with firewalld or iptables, so that symptom isn’t directly related to HAAst. However, beware that Songoma calls fail2ban a ‘security system’ – when in fact it’s not. Actually Digium warns companies NOT to use fail2ban as a security system (see https://telium.io/topic/i-use-fail2ban-why-do-i-need-secast/ for more info). I suspect FreePBX is trying to start fail2ban and that is giving you the error messages. If you are anything but a small/SOHO business have a look at the SecAst pages on this site to understand the different between SecAst and fail2ban.
With more info we can provide more suggestions but hopefully that clarifies the meaning of the messages. I suspect all of the above relate to starting FreePBX.
-
This reply was modified 5 years, 2 months ago by
WebMaster.
#6541Topic: AMI connection issue at startup in forum Installation & Upgrade |I installed FreePBX 14 a few weeks ago and so far it is working great. I am now looking into the HA part of the setup and I picked HAAst.
I am having a problem at the system startup, where HAAst takes some time to switch on Asterisk and in the HAAst log I see the following:
Fri Aug 10 06:46:55 2018, 00001258, I, Asterisk Controller, Starting
Fri Aug 10 06:46:55 2018, 00010012, I, Cluster Controller, Setting initial state of local peer to standby due to local peer haast service start
Fri Aug 10 06:46:55 2018, 00000107, I, Cluster Controller, Local peer HAAst state changing to standby
Fri Aug 10 06:46:56 2018, 00010013, I, Cluster Controller, Initial state of local peer sucessfully set to standby
Fri Aug 10 06:46:56 2018, 00001901, I, Peer Link Server, PeerLinkServer listening on 12.34.56.78:3002
Fri Aug 10 06:46:56 2018, 00001800, E, Peer Link, Connection attempt to remote node failed with error 0. Attempting reconnection in 5 seconds
Fri Aug 10 06:46:56 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:00 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:05 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:10 2018, 00001805, W, Peer Link, Connection to remote node not established within 15 seconds of first attempt. Requesting local node promotion
Fri Aug 10 06:47:10 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:10 2018, 00010018, I, Cluster Controller, Promotion of local peer is beginning due to local peer PeerLink connection failure
Fri Aug 10 06:47:10 2018, 00000108, I, Cluster Controller, Local peer HAAst state changing to active
Fri Aug 10 06:47:10 2018, 00003327, I, Sensors, Resetting local peer sensor scores and state
Fri Aug 10 06:47:10 2018, 00010106, I, NIC, IP address ‘12.34.56.78’ added to physical NIC device ‘eth0’ as new virtual NIC device ‘eth0:haast’
Fri Aug 10 06:47:15 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:22 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:27 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:32 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:37 2018, 00001836, W, Peer Link, Connection to remote node failed. Not requesting local node promotion due to local node snoozing
Fri Aug 10 06:47:42 2018, 00000721, E, System Command, Failed to start Asterisk (start) wrapper. Run result 3; exitcode 0
Fri Aug 10 06:47:42 2018, 00010019, I, Cluster Controller, Promotion of local peer is complete
Fri Aug 10 06:47:42 2018, 00001256, W, Asterisk Controller, Connection attempt to AMI failed with error 0. Requesting local peer demotion
Fri Aug 10 06:47:42 2018, 00010012, I, Cluster Controller, Demotion of local peer is beginning due to local peer lost/failed AMI connectionSo I am sure that the password for AMI is correct, I cannot understand why there is such error and I cannot find any reference in the guide about the “error 0” at the same time I don;t get why the system is “snoozing” for so long.
Another thing I did is to add some delay to firewalld at the startup as sometimes I saw a “firewall rules corrupted” but in the log the only thing wrong I saw was that asterisk was not running.
About the peer link error, I didn’t setup the backup server yet, I am going to do it after I figure this AMI error#6773 In reply to: Update DNS record to point to active PBX |First you must enable insecure updates on your Windows DNS server as follows:
- Click Start, point to Administrative Tools, and then click DNS.
- Under DNS, double-click the applicable DNS server, double-click Forward Lookup Zones
- Right-click the applicable zone.
- Click Properties.
- In the Dynamic updates box, click to allow insecure updates
- Repeat the above for the associated reverse lookup zone
- Click OK.
Next, you need to add some code to your Asterisk pre-start event handler to update the DNS entries:
#!/bin/bash
# Update DNS server with this IP 192.x.x.x address
HOST=pbx.mydomain.local
IP=$(ip addr | grep 192 | awk ‘{print $2}’ | cut -f 1 -d/)
TTL=600
SERVER1=192.168.0.2
SERVER2=192.168.1.2
#—————————————————————————-
NSU=/tmp/nsupdate.data
echo “server ${SERVER1}” > ${NSU}
echo “update delete $HOST A” >> ${NSU}
echo “update add $HOST ${TTL} A ${IP}” >> ${NSU}
echo “update delete $HOST PTR” >> ${NSU}
echo “update add $HOST ${TTL} PTR ${IP}” >> ${NSU}
echo “send” >> ${NSU}
logger “asterisk.start.pre updating DNS for host ${HOST} to IP ${IP} on server ${SERVER1}”
nsupdate -v ${NSU}
echo “server ${SERVER2}” > ${NSU}
echo “update delete $HOST A” >> ${NSU}
echo “update add $HOST ${TTL} A ${IP}” >> ${NSU}
echo “update delete $HOST PTR” >> ${NSU}
echo “update add $HOST ${TTL} PTR ${IP}” >> ${NSU}
echo “send” >> ${NSU}
logger “asterisk.start.pre updating DNS for host ${HOST} to IP ${IP} on server ${SERVER2}”
nsupdate -v ${NSU}
rm -f ${NSU}
#6772 In reply to: Error on sync FreePBX MySQL table |Some versions of FreePBX may contain tables with invalid/problematic schemas (possibly not even valid SQL but MySQL allows it).
HAAst is complaining that it can’t sync a table without a unique index. (Although this is likely an unimportant table as Sangoma may be cleaning up their tables slowly). The best solution is to wait for an update to FreePBX which fixes the table.
If you need an immediate fix please contact Telium technical support for further assistance and workarounds. When Telium performs the installation for the customer, we might modify the MySQL table, modify PHP code, or modify MySQL tools for synchronization. Customers who perform their own installation need to thoroughly test synchronization for moving to production.
Before you perform any changes to resolve this problem ensure you have a bare metal backup, and perform testing on a staging system.
#6538Topic: Error on sync FreePBX MySQL table in forum Configuration & Optimization |My cluster seems to be synchronizing the FreePBX MySql database, but I see this error in the haast log:
System Command, Warning during interface with database sync for id ‘freepbx-mysql’. Result code ‘0’; Error code ‘5’; Exit code ‘3’. Check debug log for further detailsWhat’s going wrong?
I’m running FreePBX on a couple of old servers for testing. I installed HAAst and although everything seems to work, I sometimes see this error after failing over the cluster:
Quote:
Sat Jun 23 23:02:23 2018, 00000721, E, System Command, Failed to start Asterisk (start) wrapper. Run result 3; exitcode 0What is wrong?
#6516Topic: Killed / Not an executable error on start in forum Installation & Upgrade |When I start SecAst it dies right away with the warning “Killed”
$ ./secast -f
KilledSo I checked the executable using the loader and it says SecAst is not an executable
$ ldd ./secast
not a dynamic executableWhat is wrong? The exact same executable (I copied it using scp) runs great on my first virtual machine, but won’t run on the second. They are both VM’s, they both run CentOS 6.
(Although not related, several other programs give the same error – so I’m not sure that SecAst is the root cause)
#6751 In reply to: Moving PBX between VM hosts in a data center |HAAst fully supports what you are trying to do, and there are many ways to accomplish this. We have many customers that have split their cluster(s) between on-premise and in-cloud.
On the AWS side it’s easy. AWS is certified compatible with Telium’s products, so nothing has to be done to allow the instance to move between hosts, regions, etc. You can use ‘hardware fingerprint’ activation and that will tie into your AWS instance identification.
On the data center side you have several options (see http://www.telium.io/activation). The easiest option is to use the cloud license option and you’re set. We understand that some users don’t want to use the cloud for activation or any external service, so then you could use the USB dongle with USB over ethernet software (see https://telium.io/topic/usb-license-on-hyper-v-guest/ for examples) and the dongle is always accessible to all of your VM hosts. You could also use our VLS product but that’s overkill for just 3 PBX’s.
-
This reply was modified 5 years, 2 months ago by
WebMaster.
#6527Topic: HAAst can’t connect to Asterisk / AMI in forum Configuration & Optimization |My new HAAst installation keeps promoting and demoting because it doesn’t think that Asterisk is running. I confirmed the Asterisk AMI is running:
[root@pbx1texas:~] $ netstat -anp | grep 5038
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 31671/asterisk
and I confirmed that the haast.conf file, in the [asterisk] section, is trying to connect to itself at the management IP address:
[asterisk] ;=================================================================
hostname = 192.168.1.44
and I confirmed that is the local IP address:
[root@pbx1texas:~] $ ifconfig
eth0: flags=4163 mtu 1500
inet 192.168.1.44 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:21:43:f2:28:ac txqueuelen 1000 (Ethernet)
RX packets 32396345 bytes 4993774309 (4.6 GiB)
RX errors 0 dropped 24948 overruns 0 frame 0
TX packets 37744901 bytes 21043799055 (19.5 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xd0020000-d0040000
Why can HAAst not find or talk to Asterisk?
#6769 In reply to: Changing routes & opening ports on node promotion/demotion |HAAst performs all NIC control using the Linux system API; it does not use network configuration scripts (such as ifcfg-ethX, ifup, ifdown, etc). These scripts you are referring to are Linux distribution specific, and are ignored by HAAst. All configuration of a shared VoIP NIC is accomplished in the [voipnic] stanza of the haast.conf file.
In order to perform other actions on the PBX at the time of promotion/demotion (i.e. becoming the active or becoming the standby node), you need to use the HAAst event handler system. For example, if you wanted to change the default route of the PBX when it is promoted, you could create a file called /usr/local/haast/events/asterisk.start.pre which contains:
#!/bin/bash
# Delete old default route
ip route del default via 172.31.254.1 2>&1
# Add new default route
ip route add default via 172.31.253.1 2>&1
And if you wanted to switch the default route back when the PBX is demoted, you could create a file called /usr/local/haast/events/asterisk.stop.post which reverses these statements. You can place any code you like in the event handler, but it should complete quickly (ideally < 5 seconds), so if you need to start long-running executables from the event handler be sure to fork them in the event handler code. For example, if you wanted to deleted all temporary files (which can run for several minutes) when the node becomes standby, your event handler file would contain (notice the ampersand which forks the command):
#!/bin/bash
rm -rf /tmp &
If you want to open/close ports in a firewall, control virtual machine functions, etc. then the event handler system is the right way to accomplish this. Just be sure to fork each command, or fork a single bash script which serializes those commands if any of these commands can run for an extended period of time.
Please note that event handlers are only available in the Commercial Unlimited edition of HAAst. See the EDITIONS tab of the HAAst web page to see what functionality is available in each HAAst edition.
#6766 In reply to: Asterisk beta compatibility |We can definitely help.
Although we don’t list Asterisk beta’s as officially certified, our engineering group is regularly testing and certifying newer Asterisk versions. (Probably not Beta’s however)
If you can provide SSH access to your system our engineering group will ensure HAAst is working with your specific code. Since you are already running commercial editions of HAAst, we will ensure HAAst works with your Beta at no charge.
The root cause of your problem is a regression (bug) in your Linux distro. There have been similar Linux regressions noted by Digium in the past (eg: https://issues.asterisk.org/jira/browse/ASTERISK-15603)
The solution is to use the HAAst event handler to create the missing directory for Asterisk, before Asterisk even starts.
Create the file /usr/local/haast/events/asterisk.start.pre with the following contents:
#!/bin/bash
If [ ! -d /var/run/asterisk ] ; then
mkdir /var/run/asterisk
chown asterisk:asterisk /var/run/asterisk
fi
and set the permissions on /usr/local/haast/events/asterisk.start.pre to 550:
chmod 550 /usr/local/haast/events/asterisk.start.preNote: The event handler system (including use of the asterisk.start.pre file) is restricted to the Commercial Unlimited edition of HAAst only.
#6758 In reply to: License file rejected |Please note that in mid-2018 Telium is launching an updated license option, which no longer requires activation or ties your installation to your hardware. You will have several license options available at the time of generating your license request.
See http://telium.io/activation for activation options.
#6764 In reply to: All HA for PBX based on open source? |I should also point out that during the past 10 years three other companies have released HA products for Asterisk. The products didn’t work well, and once their customers realized all of the conditions / use cases which their HA software could not handle (and the resulting outages) they switched to HAAst. All three of those companies are now out of business / disappeared, or their HA products have been discontinued.
You’ll see new HA products pop up on occasion, because you can add ‘HA’ type open source packages in just a matter of hours. But there are no open source packages for application level HA (that’s up to the application developer). Adding HA level code at the application level (or trying to add it to file level HA packages) is a massive undertaking (measured in person-years of development, not hours).
HAAst has been on the market since 2005 and has been growing in capabilities ever since!
#6762 In reply to: No option to configure gateway for VoIP NIC |Some Linux distributions allow you to configure routing information along with the NIC (in the same NIC configuration file); however, this is misleading – in fact, newer Linux distros no longer allow this practice. Routing information has nothing to do with the NIC. Routing information (eg: default gateway / subnet gateway) is added to the routing table not the NIC.
If you would like to add a route to the routing table from a terminal window then enter a command like:
route add -net 10.10.0.0 netmask 255.255.255.0 gw 10.10.0.1
If you would like this route to persist between reboots you would have to enter this information into a config file/script. If you are using the Commercial Unlimited edition of HAAst then you can add the above line to the pre-start event handler /usr/local/haast/events/asterisk.start.pre This event handler will run before the vNIC is brought up so the route will be present when needed. If you like you can also delete this route by adding a line to the the post-stop event handler /usr/local/haast/events/asterisk.stop.post
If you are not using the Commercial Unlimited Edition of HAAst, then you will need to find the most suitable place for these routing rules (which varies considerably between Linux distributions). In your case I suspect you are using a RedHat flavour of Linux, so you could create a file called /etc/sysconfig/network-scripts/route-eth0 with:
default 192.168.0.1 dev eth0
10.10.0.0/24 via 10.10.0.1 dev eth0
172.16.1.0/24 via 192.168.0.1 dev eth0
but you should check the guides for your Linux distro to confirm the best place to place ‘persistent routes’. If you are looking for routes to be added/deleted based on HAAst events then you should use the HAAst event handler instead.
-
This reply was modified 5 years, 2 months ago by
-
AuthorSearch Results