You know the drill: site that limits incoming traffic and has painful VPN. Luckily this time outgoing ssh traffic on port 22 was allowed (because they do SFTP which is SSH File Transfer).
That didn’t work: a remote machine could not RDP to port 3389, but a local telnet localhost 3389 would. The reason is that by default sshd binds a remote port to the local address only and not the wildcard addres.
So you have to open up the remote config a bit: at least /etc/sshd_config and most likely also your firewall.
I was not too happy that this just happened after updating one of the DNS secondaries:
May 24 21:29:48 laurel systemd[1]: Starting LSB: Domain Name System (DNS) server, named...
-- Subject: Unit named.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has begun starting up.
May 24 21:29:49 laurel named[3173]: Starting name server BIND cp: cannot stat '/lib/engines': No such file or directory
May 24 21:29:51 laurel named[3235]: starting BIND 9.10.4-P5 -t /var/lib/named -u named
May 24 21:29:51 laurel named[3235]: running on Linux armv6l 4.3.3-6-raspberrypi #1 Wed Dec 16 08:03:35 UTC 2015 (db72752)
May 24 21:29:51 laurel named[3235]: built with '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=/usr/lib' '--enable-exportlib' '--with-export-libdir=/usr/lib' '--with-export-includedir=/usr/i
May 24 21:29:51 laurel named[3235]: ----------------------------------------------------
May 24 21:29:51 laurel named[3235]: BIND 9 is maintained by Internet Systems Consortium,
May 24 21:29:51 laurel named[3235]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
May 24 21:29:51 laurel named[3235]: corporation. Support and training for BIND 9 are
May 24 21:29:51 laurel named[3235]: available at https://www.isc.org/support
May 24 21:29:51 laurel named[3235]: ----------------------------------------------------
May 24 21:29:51 laurel named[3235]: adjusted limit on open files from 4096 to 1048576
May 24 21:29:51 laurel named[3235]: found 1 CPU, using 1 worker thread
May 24 21:29:51 laurel named[3235]: using 1 UDP listener per interface
May 24 21:29:51 laurel named[3235]: using up to 4096 sockets
May 24 21:29:51 laurel named[3235]: ENGINE_by_id failed (crypto failure)
May 24 21:29:51 laurel named[3235]: error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:233:
May 24 21:29:51 laurel named[3235]: error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:467:
May 24 21:29:51 laurel named[3235]: error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:390:id=gost
May 24 21:29:51 laurel named[3235]: initializing DST: crypto failure
May 24 21:29:51 laurel named[3235]: exiting (due to fatal error)
May 24 21:29:51 laurel named[3173]: ..failed
May 24 21:29:51 laurel systemd[1]: named.service: Control process exited, code=exited status=1
May 24 21:29:51 laurel systemd[1]: Failed to start LSB: Domain Name System (DNS) server, named.
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
May 24 21:29:51 laurel systemd[1]: named.service: Unit entered failed state.
May 24 21:29:51 laurel systemd[1]: named.service: Failed with result 'exit-code'.
However, that fix never made it to Raspberry Pi B (the original Rasberry Pi 1B) because that is armv6l and the bind build for that has failed early April 2017.
The same holds for more recent OpenSuSE systems, but ESXi would never tell what was going on.
Recently I installed an OpenSuSE Tumbleweed system under VMware Fusion (running on Mac OS X) which indicated “The CPU has been disabled by the guest operating system.”
Log indicates a “Shutdown” which in fact is a CPU not powered down.
That also explains that halt without a powerdown can be useful: it for instance gives the end-user the opportunity to click the reset button instead of the power button after a halt.
diaspore:/etc # aha --version
Ansi Html Adapter Version 0.4.9.0
diaspore:/etc # aha --version | grep aha
diaspore:/etc # aha --version | aha
Ansi Html Adapter Version 0.4.9.0
And the aha --help output on Mac OS X:
Ansi Html Adapter Version 0.4.8.0
aha takes SGR-colored Input and prints W3C conform HTML-Code
use: aha <options> [-f file]
aha (--help|-h|-?)
aha reads the Input from a file or stdin and writes HTML-Code to stdout
options: --black, -b: Black Background and White "standard color"
--pink, -p: Pink Background
--stylesheet, -s: Use a stylesheet instead of inline styles
--iso X, -i X: Uses ISO 8859-X instead of utf-8. X must be 1..16
--title X, -t X: Gives the html output the title "X" instead of
"stdin" or the filename
--line-fix, -l: Uses a fix for inputs using control sequences to
change the cursor position like htop. It's a hot fix,
it may not work with any program like htop. Example:
echo q | htop | aha -l > htop.htm
--word-wrap, -w: Wrap long lines in the html file. This works with
CSS3 supporting browsers as well as many older ones.
--no-header, -n: Don't include header into generated HTML,
useful for inclusion in full HTML files.
Example: aha --help | aha --black > aha-help.htm
Writes this help text to the file aha-help.htm
Copyleft Alexander Matthes aka Ziz 2015
zizsdl@googlemail.comhttp://ziz.delphigl.com/tool_aha.php
This application is subject to the MPL or LGPL.
–jeroen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Reason? Want to show the output of this as the last boot sequence line:
hostname ip route
echo
ip address | grep -w 'UP\|flags\|inet\|inet6'
echo more detailed info through "ip address" and "ip route"
cat /etc/resolv.conf | grep nameserver
Note this works only when the VMs have VMware Tools installed (more on that below):
VMWare provides, not surprisingly, a built in tool for this, vmrun. It’s under /Applications/VMware Fusion.app/Contents/Library/vmrun although it has moved around in other Fusion releases a bit.
🍺 vmrun list Total running VMs: 1 .docker/machine/machines/myvm.vmx
🍺 vmrun getGuestIPAddress ~/.docker/machine/machines/myvm.vmx 172.16.213.128
Based on the above path, I added this to my ~/.bash_profile file:
alias vmrun='/Applications/VMware\ Fusion.app/Contents/Library/vmrun'
alias vmrun-list-running-VMs='vmrun list | grep vmx'
vmrun-list-ipv4-of-running-VMs()
{
vmrun-list-running-VMs | while read line ; do echo $line && vmrun getGuestIPAddress $line; done
}
Now I can do this:
$ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.142
These are the messages I observed:
Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address 172.16.172.135
Hosting Grumpydev Imageflair locally ended with two issues left: an empty image and my wish to include more complete StackExchange bits like the current StackExchange flair does.
I thought fixing the empty image would take a rainy day. It actually took a few rainy hours.
The drawback of having fetchmsttfonts is that the original Microsoft versions of these fonts are downloaded from corefonts.sourceforge.net each time the fetchmsttfonts package is updated, potentially overwriting newer versions of the fonts in that directory. If you don’t want that, use the trick at (not yet archived at the WayBack machine) font handling – install fetchmsttfonts, copy fonts, rpm -e fethmsttfonts, copy fonts back.
Having the fonts installed, I thought the only thing I needed to fix were the multiple references in config.php from that pointed to Arial.TTF. I took the poor man’s approach and just did this being in the directory of config.php:
cp /usr/share/fonts/truetype/arial.ttf Arial.TTF
Filled Imageflair
That didn’t work either: still no text showed.
So I decided to run imageFlair.php from the command line after setting $imageflair_debug = true; in config.php which then resulted in all sorts of warnings like
PHP Warning: imagettftext(): Could not find/open font
After reading I decided to build a small php-gd.tester.php script containing phpinfo(); and gd_info showing these portions for PHP GD (non-relevant bits stripped):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Basically a Raspberry Pi has GPIO pins that can drive electromechanic (like mechanical relay) or electronic (like transistor+resistors or SSR solid-state relay). Examples:
Most solid state relays work with 3V-30V input signals, so these work:
The IP address 127.0.1.1 in the second line of this example may not be found on some other Unix-like systems. The Debian Installer creates this entry for a system without a permanent IP address as a workaround for some software (e.g., GNOME) as documented in the bug #719621.
The <host_name> matches the hostname defined in the “/etc/hostname“.
For a system with a permanent IP address, that permanent IP address should be used here instead of 127.0.1.1.