• Bike Trip 2021 – Day 2

    The day dawned drizzly. Heavy drizzly. Ok, rainy! The river had swelled and was now a muddy brown pouring down the valley. I had some left-over bread for breakfast, settled with the owner, and put on my wet weather gear.

    I had initially thought to just head towards Matsumoto which was predicted to be sunny as quickly as possible, but ended up heading up into the mountains for a loop of the upstream reservoir instead. Glad I did as there were some pretty impressive bridges, and views from them, leading up to it. Just for a change the “loop road” was not closed so I could do the loop, although the minor road was quite minor…

    Heading out of the mountains the rain soon stopped and I rejoined the 299 to continue on to Matsumoto. The 299 now had a very varied character, from absolutely stunning road with fast sweeping bends and great asphalt to just a small country road.  At one point I saw a sign to a cave and, a quick u-turn later, headed up a very steep little access road to it.

    Fujido Cave turned out to be a mixed bag. The Japanese fondness of concrete and infrastructure took a lot of the character out of the cave, but I guess they have to make it accessible. Still, it’s worth a quick visit if you’re passing by with some neat rock formations. There’s also an impressive suspension bridge nearby, not recommended if you get vertigo!

    Continuing on, the 299 eventually became very small and then stopped – it was blocked off as so many other roads were. A couple of people in a small pickup truck gave me directions on how to continue on to Matsumoto, which turned out to be along the 45 until I could continue westwards on the 254. This road was also pretty nice in places. Along the way I stopped at a rest stop for some lunch and ended up buying some deer obento from a guy selling it out of the back of a “Ente”, a Citroen 2CV.

    Some great riding later I finally reached Mastumoto, detoured past the castle for a quick first look, and checked into the Backpackers run by a very friendly chap from Ireland. Time to do some shopping for some essentials (soap, shaver, towel), a quick freshen-up, and then I wandered in search of dinner. I ate some yakitori as it had outdoor seating and enjoyed my first beers with dinner in a long time – unlike Tokyo, Matsumoto still allows alcohol! Then I took some great night-time pictures of Mastumoto castle before turning in for the night.


  • Bike Trip 2021 – Day 1

    So feeling a bit down due to the incoming weather forecasts, I waved bye to my friend Edith, who was off to Okinawa for the week and had kindly offered to lend me her bike, a KTM750. I decided to at the very least do a quick loop on the bike around Tokyo before going home. Finding a park near Kanagawa River as my destination, I set off. Despite city-riding and traffic, HUGE SMILE!

    Enroute I found a small shrine and looped back to take a picture of the bike in front of it, then asked for safe riding from the local deity. Just before reaching the park, the heavens opened up and my jeans were soaked through to the balls in no time. So I guess the prayer backfired? I still stopped at the park and sheltered under a tree until the rain slowed and then stopped shortly afterwards.

    Riding back I stopped at a couple of spots to take some pictures and by the time I got back to Edith’s I went “stuff it”, packed a couple of tshirts and a toothbrush, found a cheap hotel somewhere in the mountains, and headed off.

    Best decision ever! Weather stayed dry and even though most of the trip was along city roads, which did eventually get wearisome, I was still very happy to be on the road on a bike again. Just bliss not having to think, just ride. At one stage I went over some hills with giant TV antennae which seemed to be a bit of a built-up version of Mt Cootha back in Brisbane. Unfortunately I was past it before I could think to find a spot to stop to take a pic.

    Eventually though the city roads petered out and things got awesome as I slowly climbed into the mountains. Especially the 299 is a really nice road once you get past any traffic – a bit tricky since it’s all yellow-lines, but there are a few traffic lights.

    With only 20 minutes to go to my destination, and my clutch-hand feeling decidedly sore after all the earlier city riding, I saw a big dam and shortly afterwards a road leading up to it, so off I went. Pretty spectacular! I was going to do a complete loop of the reservoir, but it turned out that the road on one side of it is blocked off for some reason. Still an awesomely scenic spot.

    I kept going and found my hotel – a very traditional-looking japanese inn nestled high above the road. Upon entering the first thing is a common room with a wood-fired stove, rather rustic looking. The owner is a youngish-chap though (I was expecting a fossil to be honest) with two young girls and made me welcome. We managed to communicate and I got shown to my room. After that I sat down for a bit to relax, then hiked down to the river and had a swim. Great, now not only are my jeans still damp, but my only pair of shorts is wet as well… but it was worth it!

    By the evening other guests had arrived and we enjoyed a small fire outside while chatting and eating dinner – home-cooked chicken which was very delicious. When the rain came back we all went into the common room where one guy kindly shared some sake and, later on, some food. Despite my lack of japanese it was an enjoyable evening.

    Time for bed, going to try to go to Matsumoto tomorrow to have a look at the famous black castle!


  • Upgrading Nextcloud 15 to 19 on Debian …

    So my Debian 9 server was still running Nextcloud 15. Meanwhile Nextcloud 20 is out.

    When I looked at performing the (manual) update I actually found a Nextcloud 16 download already in place but it seems I never completed that. Not long afterwards I discovered why – Nextcloud 16 requires PHP 7.3, but Debian 9 only has PHP 7.0 available.

    Long story short, instead of chimera’ing my Debian install I bit the bullet and decided to finally upgrade the server to Debian 10

    Some time later…

    After the server upgrade completed I was able to use the Nextcloud web interface to upgrade to Nextcloud 16.. and 17… and 18… and 19… and 20!

    That’s were the fun stopped, many things were broken in NC20 (apps just showing blank pages), so, having taken a backup between every upgrade, I rolled back to NC19 (incidentally validating that my backups worked).

    Most things worked out of the box. Critically for me, Grauphel did not.

    Long story short, it turns out that on Debian 10, the version of the PHP OAuth package is actually not compatible with the installed version of PHP 7.3! Installing a binary-compatible package from the Debian package snapshots site fixed this.

    Amongst other things I did during the upgrade cycles was:

    • changed the database to 4-byte suppport allowing for more characters in paths and comments.
    • fixed several other minor PHP configuration issues which Nextcloud was warning about.
    • fixed support for Maps (Nextcloud bug in the upgrade scripts left some database columns misconfigured:
      • Column name "oc_maps_address_geo"."object_uri" is NotNull, but has empty string or null as default.
      • The fix was to manually edit the scripts.
    • wrote backup scripts backing up the Nextcloud directory, the database, and, optionally, the data directory.


  • Upgrading Debian 9 to Debian 10

    Triggered by needing to upgrade Nextcloud, I finally bit the bullet and decided to upgrade my virtually-hosted Debian server from Debian 9 “stretch” to Debian 10 “buster”.

    The upgrade, as usual, was fairly trivial:

    apt-get update
    apt-get upgrade
    <edit /etc/apt/sources.conf to point to the new version>
    apt-get update
    apt-get upgrade
    apt-get full-upgrade
    reboot

    There were various configuration files which needed tweaking during and after the upgrade. vimdiff was very useful. I also learned a new screen feature – split-screen! (Ctrl-a – |). Finally a shoutout to etckeeper for maintaining a full history of all edits made in /etc.

    Post-upgrade Issues and Gotchas

    dovecot (imap server)

    A huge issue was that I could no longer access my emails from anywhere.

    Turns out that dovecot was no longer letting me log in. The mail log file had numerous “Can’t load DH parameters” error entries. I had not merged in a required change to the ssl certificate configuration.

    exim4 (mail server)

    The second huge issue was that exim was no longer processing incoming mail. Turns out that spamd wasn’t started after the reboot. Fixed by:

    systemctl start spamassassin.service
    systemctl enable spamassassin.service

    shorewall (firewall)

    Another major gotcha: the shorewall firewalls were not automatically re-enabled, and it took me three days to notice. Yikes! I had left the server on sys-v init instead of systemctl and the upgrade had silently switched over. After restarting the firewall, use systemctl enable to configure it to start on bootup.

    systemctl start shorewall.service
    systemctl enable shorewall.service
    systemctl start shorewall6.service
    systemctl enable shorewall6.service

    bind9 (name server)

    Another item was that bind was no longer starting up – it needed a tweak to the apparmor configuration. Appears that on my server the log files are written to a legacy directory and the new default configuration prevented bind from writing into it and hence failing to start up.

    Miscellaneous

    • I finally removed dovecot spam from syslog by giving it its own logfiles (tweaking fail2ban accordingly).
    • Various PHP options needed tweaking and several new modules needed installing to support Nextcloud (manually installed so no dependency tracking).

    Later Updates

    • Discovered that phpldapadmin was broken. Manually downloaded and installed an updated version from “testing”.

  • New Scuba Toy – Shearwater Peregrine

    Just bought a Shearwater Peregrine as a backup for my Shearwater Perdix AI (budget didn’t quite stretch to a second Perdix..)

    Haven’t dived it yet, but following are my immediate unboxing impressions (pictures (via Google image search)).

    The good:

    • Familiar layout and the same great screen as the Perdix.
    • Smaller and lighter form factor than the Perdix.
    • Mostly full-featured recreational dive computer with some intro-to-tec features.
      • No AI/compass
      • Up to 100% O2 and 3 gases
      • Lots of “tec” displays
    • Built-in battery charging is via the Qi wireless standard, so absolutely no exposed contacts.
      • But due to wrist-straps/bungees it may be difficult to use generic Qi charging pads.
    • Dive download via Bluetooth (hopefully works better than the Perdix!)

    The bad:

    • Buttons are physical rather than the piezo-electric ones from the Perdix (subjective).
    • Battery is a built-in rechargeable battery (subjective).
    • Limited display customisation (as compared to the Perdix).
    • Screen protector is a standard thin protector rather than the thick gel-like one of the Perdix.

    The ugly:

    • The charging pad uses a micro-USB cable rather than USB-C (for a brand-new product, I would expect it to use the latest standards)
    • Still fairly large (although required to support the screen, the bezel _could_ be a bit smaller given the target market)
    • No compass or Air Integration (for the price-point, many competing products offer these features)

  • Gotcha when testing Unity Objects for null in C#

    Unity has overloaded the ‘==’ operator, specifically, checking objects against “null” might not always do what you expect. More information can be found in this blog post from Unity.

    Specifically, if a Unity Object (as opposed to a C# object) gets destroyed, it will be set to a “fake null” object.  In this case, the following statements are true:

    1
    2
    3
    4
    
        obj == null          // true    obj is null          // false
        (object)obj == null  // false
        obj ?? value         // obj

    Note the different results between lines 1 and  2 & 3.

    If obj truly is null, then the results are as expected:

    1
    2
    3
    4
    
        obj == null          // true
        obj is null          // true
        (object)obj == null  // true
        obj ?? value         // value

    It may be more readable to provide an Extension Method to UnityObject:

        /// <summary>
        /// Extension Method on Unity Objects returning whether the object really is null.
        /// </summary>
        /// Unity overloads the '==' operator so that it returns true on both null references
        /// as well as references to destroyed objects. This function only returns true if
        /// the reference truly is null, and returns false for "fake null" objects.
        public static bool IsTrueNull(this UnityEngine.Object ob)
        {
            return (object)ob == null;
        }