Pro Tip: Keep Asterisk Configuration Files in Version Control

by Scott Hebert

Asterisk logo -rightAn Asterisk server has a very involved configuration system. One instance I manage has over 100 configuration files. As these configurations grow, it can be helpful to have a separate server running for testing and debugging problems. If you are planning a major change, it's often helpful to get ...


TACACS Detected 'Invalid Argument'

by Scott Hebert

As always, I've changed pertinent details for reasons.

I was working on an ASR the other day and received the follow error:

RP/0/RSP0/CPU0:ASR9K(config-tacacs-host)# commit
Fri Jul 29 12:55:46.243 PDT

% Failed to commit one or more configuration items during a pseudo-atomic
operation ...

Two Column for Loop in bash

by Scott Hebert

I had this interesting question the other day. Someone had a file with two columns of data in it. They wanted to assign each column to a different variable and then take action using those two variables. Here's the example I wrote for them:

IFS=$'\n';
for LINE in ...

OpenSSH: Using a Bastion Host

by Scott Hebert

Quick and dirty OpenSSH configlet here. If you have a set of hosts or devices that require you to first jump through a bastion host, the following will allow you to run a single ssh command:

Host *
    ProxyCommand ssh -A <bastion_host> nc %h %p

Change the Host * line to best ...



Socket Timeouts in urllib2

by Scott Hebert

Python logo -rightOne of my scripts that makes an API call has been failing silently lately. It appears that the connection is timing out, but I am not catching that particular error. So, I fixed that.

@@ -8,6 +8,7 @@
 import os
 import random
 import shelve
+import socket
 import sys
 import time ...

Cache has broken packages, exiting

by Scott Hebert

I've been getting the following error from cron.daily in my inbox lately:

/etc/cron.daily/apt:
Cache has broken packages, exiting

That's an annoying email to get everyday. I decided I would apt-get clean and that would probably fix the problem:

This is an older Ubuntu server ...


MySQL OOM'ed, But Pelican Lives

by Scott Hebert

Pelican logo -left I use Pingdom's free service to monitor slaptijack.com. Apparently, late Friday night, oom-killer decided that the server needed more memory and took out the MySQL server. To make matters worse, I missed the alarm from Pingdom, and slaptijack.com was down for pretty much all of Saturday. The ...


Removing a Single Line from known_hosts With sed

by Scott Hebert

OpenSSH logo -left Ever so often, something changes on the network, and you find that your .ssh/known_hosts file has gotten out of date. Usually this happens after an upgrade or device change. You'll get the rather ominous warning that REMOTE HOST IDENTIFICATION HAS CHANGED!

If you are confident that someone isn ...


Page 1 / 4 »