Wainlux K6: Windows Driver and Application Download

First, let me start by saying just how much I dislike the software and website behind this machine; not only is finding the driver and software hard but the drivers fail to enable the USB to UART bridge and the company fails to redirect to working drivers. With that said here is what you need to make the device work on Windows 10.

  1. You’ll want the Silicon Labs USB to UART bridge driver.
    https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
  2. The jar file for their application and a copy of java which is bundled (!?): http://www.wainlux.com/download/K6Windows.rar

In order to run the application run cmd as administrator. I use Windows+R, then type cmd, and to run as administrator press Ctrl+Shift+Enter. Switch directory using cd C:\diao\bin\ and run the command java -jar diao.jar.

The application will start at this point and you should be able to work with the device properly. Good luck.

Libvirtd Unable to Connect when Using RBD Storage Pools

I ran across a problem recently where attempting to list virtual machines was taking ~45 minutes through virsh and virt-manager; it turns out that the problem was actually due to this patch in libvirt for using RBD fast-diff. In my case the ‘default’ storage pool is actually a link to my RBD storage pool. and that patch checks for the enabled feature but does not check the flags to see if the object-map and fast-diff are invalid

Good News Everyone!

There has been a recent patch that solves this. Unfortunately some distributions have not caught up with it yet (looking at you Ubuntu Bionic). Anyhow, this will hopefully make its way down the various streams that package libvirtd and the problem will be sorted.

FreeIPA Certificates Displays CertificateOperationError

Working with a fresh install of FreeIPA using the Ubuntu Bionic package is displaying an error on the ‘Certificates’ page which reads:

IPA Error 4301: CertificateOperationError
Certificate operation cannot be completed: Unable to communicate with CMS (Start tag expected, '<' not found, line 1, column 1)

After doing some research on the problem it seems to have already been resolved upstream, and in the Ubuntu Cosmic distribution, however the backport has not yet hit Ubuntu Bionic. I’ve been able to safely apply this commit to the dogtag.py file at /usr/lib/python2.7/dist-packages/ipapython, then restarted FreeIPA and all was well.

root@ipa:~# ipactl restart
Stopping pki-tomcatd Service
Restarting Directory Service
Restarting krb5kdc Service
Restarting kadmin Service
Restarting named Service
Restarting httpd Service
Restarting ipa-custodia Service
Restarting pki-tomcatd Service
Restarting ipa-otpd Service
Restarting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful

Ubuntu Bionic (actually cloud-init) Reverting Hostname on Reboot

If you’ve changed the hostname on an Ubuntu Bionic install, restarted the node, then found that the hostname has reverted you may be wondering why this has happened. The problem actually stems from the cloud-init scripts and the ‘preserve_hostname’ option.

root@ipa:~# grep -H -n preserve /etc/cloud/cloud.cfg
/etc/cloud/cloud.cfg:15:preserve_hostname: false

Go change the variable to true and the next time you change the hostname and reboot it will be left intact.

FreeIPA WebUI Login Fails with “Login failed due to an unknown reason.”

I’ve been working with setting up a fresh install of my homelab and have been trying to get FreeIPA to work on Ubuntu Bionic. If you happen to see the “Login failed due to an unknown reason.” error while trying to login through the web UI, try adding execute permissions for all users to the “/var/lib/krb5kdc/” directory.

root@ipa:~# chmod a+x /var/lib/krb5kdc

Try to login after that and, if the problem was the same as my own, you’ll find it working now.

Libvirtd: Using RBD for a CDROM Device

Mostly a note to self but others may find this snippet useful.
I use the following to install from a disk image stored in RBD. Make sure to fill in your own client username, secret UUID, and monitor addresses.

    <disk type='network' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <auth username='libvirt'>
        <secret type='ceph' uuid='a487c228-159b-4197-8be9-8e0e0d2b8bd4'/>
      </auth>
      <source protocol='rbd' name='rados-pool/diskimage.iso'>
        <host name='monitor-1.address' port='6789'/>
        <host name='monitor-2.address' port='6789'/>
        <host name='monitor-3.address' port='6789'/>
      </source>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Unable to Access WordPress Dashboard after Upgrades

I use DreamHost’s DreamPress product for this website, as part of that product there are caching plugins installed. Normally this would be perfectly fine but after an upgrade that caching was preventing me from accessing the dashboard. This post explains how I got past it.

Step 1:
Make sure you are logged in and can see the admin bar at the top of your site. From that bar purge the page and database cache.

Step 2:
From the DreamPress dashboard go identify your SSH credentials and use them to login using SSH.

Step 3:

Once you are logged in using SSH use ‘cd yourdomain.tld’ to access your website directory and execute ‘wp cache flush’ to clear out any remaining issues.

That’s it, go ahead and try to access your dashboard again.

Use GitLab Personal Access Token as Password

I’m finally writing some more code so I’ve started to make use of my gitlab instance, one of the first things I turned on was 2FA but that also means that checking out through https:// could no longer authenticate. The solution is to visit your profile page, click on the “Access Tokens” tab, and generate a token which can be used as a password.