Posts

(24)Too many open files: AH02611: create: apr_shm_create on MacOS

If Apache reports this mod_slotmem_shm.c error at startup: [Mon Jan 09 13:58:37.529803 2023] [slotmem_shm:error] [pid 36749:tid 140704338810048] (24)Too many open files: AH02611: create: apr_shm_create(/Users/covener/SRC/httpd-framework-2.4.x/t/logs/slotmem-shm-mod_heartmonitor_0.shm) failed The short-term fix is: sudo sysctl -w kern.sysv.shmseg=64

RTC java.lang.classnotfoundexception: org.eclipse.core.runtime.adaptor.eclipsestarter

If your Rational Team Concert (RTC) installation suddenly starts reporting java.lang.classnotfoundexception: org.eclipse.core.runtime.adaptor.eclipsestarter it's likely you: - made the mistake of using IBM Installation Manager (IIM) to install RTC - cleared your IIM "shared" directory (which is outside of your RTC installation root) At least RTC 5.0.2 when installed via IIM loads eclipse jars from the IIM Shared directory and it's not trivial to recover from. Just scrap and download the "zip" installs which are not IIM repository archives but an actual unzip-to-install RTC client including eclipse.

Finding handshake delays in wireshark

A simple trick to find the gap between SSL Client Hello and Server Hello. The trick is grabbing only the frames of a TCP conversation you want, then asking for the full TCP conversation stats: tshark -r original.cap -q -z conv,tcp,"ssl.handshake.type == 1 || ssl.handshake.type == 2" | awk '/https/{print $11 " " $1}'|sort -n

openssl and atexit

TIL: - linux calls atexit() callbacks when a library is unloaded, not just at process exit - AIX doesn't - openssl 1.1 adds an atexit handler - openssl 1.1 has some code to try to prevent the library from really being unloaded by inflating the dlopen reference count so its atexit will really be available at exit. - https://github.com/openssl/openssl/pull/1693 - apparently this isn't working on AIX - openssl 1.1 doesn't seem to be provided by IBM or third parties on AIX as of early 2018.

Media buttons on 17.10 thinkpad

I just spent what felt like an eternity restoring a working Ubuntu on my w530. One of the things that took the longest was getting the media (VOLUP/VOLDOWN/MUTE) buttons working. In the end, clearing my migrated ~/.config/pulse, installing swh-plugins, and rebooting did the trick.

Stripping arguments from a bash script

I've always avoided bash-isms like arrays or slices, but I found this non-portable script interesting. I needed to strip a option and it's value because the caller couldn't be modified. #!/bin/bash # This script filters out "-expire X" from gskcmd and passes it down # to "gskcmd.real" # Get absolute install root the hokey portable way dir=`dirname $0` CUR_DIR=`pwd` IHS_DIR=`dirname ${0}` cd ${IHS_DIR} SR=`pwd` cd ${CUR_DIR} if echo "$@" | grep -- -expire > /dev/null; then COUNTER=1 while [ $COUNTER -lt $# ]; do eval VAL=\$$COUNTER if [ "$VAL" = "-expire" ]; then set -- "${@:1:COUNTER-1}" "${@:COUNTER+2}" break fi let COUNTER=COUNTER+1 done fi exec $IHS_DIR/gskcmd.real "$@"

Recovering from SQL1072C for (db2) dummies

After an OS upgrade, my IBM Directory Server was hanging waiting for its underlying database to come up. db2start was returning the error above, which implied some other manager process should be started -- which is a red herring. A one-time db2ftok made db2start magically work. Maybe there was a usable error message somewhere? Maybe not.