Penguin, small TECH.BARWICK.DE

Recent posts





Powered By


2017-01-10 04:25:00  2017-01-10 04:25:00

TLS key negotiation failed to occur within 60 seconds

Spent a lot of time working out why openvpn wouldn't connect from a Vagrant virtual machine (running Ubuntu 14.04 LTS):

Tue Jan 10 02:51:25 2017 Control Channel Authentication: tls-auth using INLINE static key file
Tue Jan 10 02:51:25 2017 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jan 10 02:51:25 2017 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jan 10 02:51:25 2017 Socket Buffers: R=[212992->200000] S=[212992->200000]
Tue Jan 10 02:51:25 2017 UDPv4 link local: [undef]
Tue Jan 10 02:51:25 2017 UDPv4 link remote: [AF_INET]
Tue Jan 10 02:51:25 2017 TLS: Initial packet from [AF_INET], sid=92749f62 ced33a12
Tue Jan 10 02:52:25 2017 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Jan 10 02:52:25 2017 TLS Error: TLS handshake failed
Tue Jan 10 02:52:25 2017 SIGUSR1[soft,tls-error] received, process restarting
Tue Jan 10 02:52:25 2017 Restart pause, 2 second(s)

Turns out the openvpn version (2.3.2) is outdated; 2.3.4 or later is needed.

Posted in Solutions | add a comment

2016-05-30 23:54:00  2016-05-30 23:54:00

Forcing GPG passphrase input in the terminal

One annoyance when entering GPG passphrases in terminal applications on many systems is that a seperate GUI window pops up. To enable passphrase entry in the comfort of your own terminal, set the following line in .gnupg/gpg-agent.conf

pinentry-program /usr/bin/pinentry-curses

Posted in Linux | add a comment

2015-10-19 02:17:00  2015-10-19 02:17:00

Improving top output

The OS X "top" command default output is somewhat hard to decipher (and modify interactively) compared to Linux. A simple workaround is to launch it with:

top -o cpu

(or another field) which sorts on cpu activity rather than the PID (default).

htop is also available via MacPorts.

Posted in Mac OS X | add a comment

2015-02-22 06:44:00  2015-02-22 06:44:00

openSUSE 13.2 - Notes

Posted in Linux | add a comment

I was setting up a cronjob and it kept failing with the very unhelpful util.c: No such file or directory. After much headscratching it turns out this is a gnuplot error message, meaning it is unable to read from or write to a file (in this case the latter). The file in question is not of course util.c.

Posted in Devel | add a comment

2014-09-27 03:42:00  2014-09-27 03:42:00

Ansible and "powershell: not found" error

I was bemused by the below error when attempting to run an Ansible playbook on a new (Linux) server for the first time:

PLAY [someserver] ***************************************************************** 

GATHERING FACTS *************************************************************** 
failed: [someserver] => {"failed": true, "parsed": false}

/bin/sh: 1: powershell: not found

This happened with gather_facts set to true. Setting it to false worked around the issue, however I'm pretty sure powershell hasn't been ported to Debian... Ansible version:

$ ansible-playbook --version
ansible-playbook 1.8 (devel ffee9a8fe0) last updated 2014/09/27 14:24:58 (GMT +900)

The actual cause was the absence of python on the target server; this will need to be manually installed before Ansible can be of much use.

Posted in Devel | add a comment

2014-02-16 09:39:00  2014-02-16 09:39:00

OpenSUSE / Samba: "Invalid key 0 given to dptr_close" error

After upgrading to openSUSE 13.1, the Samba configuration - which I use mainly to share a directory on my workstation-cum-fileserver to a media player on the local network - mysteriously failed to work as expected. The client could mount, but not see, any directories or files. The only vaguely relevant clue appeared to be this entry in /var/log/samba/log.smbd:

Invalid key 0 given to dptr_close

After much head-scratching, it turns outAppArmor isenabled by default on openSUSE 13.1 and was the source of the error. Resolving the issue with AppArmor brought Samba back to life.

Posted in Linux | add a comment

2014-02-11 02:53:00  2014-02-11 02:53:00

VirtualBox on openSUSE 13.1

I made the mistake of installing VirtualBox from the openSUSE repository, and after much pain trying to troubleshoot the error "This usually means that the vboxdrv module is not loaded. Try again after loading the module" (which pops up every time a virtual machine is launched), I remember the least painful way to install VirtualBox on openSUSE is to follow these instructions, adjusting the version numbers (both for openSUSE and for VirtualBox) accordingly.

As of the time of writing, doesn't provide packages for openSUSE 13.1, however the packages for 12.3 installed just fine and seems to work so far using some pre-existing images, including different Windows versions.

Note: this issue appears to have gone away in OpenSUSE 13.2.

Posted in Linux | add a comment

2013-04-12 19:34:00  2013-04-12 19:34:00

Wrapper script for find

I find (hah) myself using find a lot to locate file system objects in the current directory, however find recurses into subdirectories by default. Using the parameters -mindepth 1 -maxdepth 1 restrict find to the current directory, are however a pain to type each time.

To make my own personal life easier I created this wrapper script (named find1):


if [ ($# < 1) ]; then

find $FINDPATH -mindepth 1 -maxdepth 1 $@

which automatically prepends the -mindepth and -maxdepth to find (they need to be first in the argument list).

Posted in Shell | add a comment