JupyterHub – it’s been a long journey (and it’s not over yet…)

I started working with Jupyter Notebooks in late November (2018), and was rewarded fairly quickly with the ability to create notebooks for Java (SciJava), Chemistry (rdkit), Engineering (scipy), graphics (matplotlib) and Geography (Basemap).

However, the real sticking point was these were all pages executing Jupyter on a local user account, running on a VirtualBox Ubuntu Linux server (18.10) that I’d created.

The real goal was to create a Jupyter system that would work for multiple users, so that I could use it for my new revision of “Introduction to Computing – Java” for Athabasca University. This meant running JupyterHub.

Along the way I moved to Ubuntu 18.04LTS (a checkpoint version) and spent hours on google, youtube and the plethora of Jupyter (and JupyterHub) pages. There were many frustrations along the way, from a complete communications breakdown in forums trying to get a site certificate (letsencrypt), to documentation and tutorials written in 2015 and never updated when everything (and I do mean everything) changed in the time since.

By December 5, I was able to create a functioning JupyterHub on huntrods.com with the proper certificate. The only kernel running was Python3, but it featured either PAM (local user) authentication or OAuth (Github login) authentication, so I was pretty happy.

BUT… (and this is huge) I really needed SciJava, or writing a Java course would be a bust.

The breakthrough came this week – yesterday, in fact. After repeated ‘banging head against the wall’ attempts, I was able to install SciJava for all users. With that success, it was relatively simple to install the other libraries (noted above) so that all my single-user demonstration notebooks ran in the new JupyterHub.

I was off and running, and quickly wrote my first notebook for the Java course. It’s everything I wanted, and more. It’s really a new way of “doing programming”, a mix of documentation and program code that works almost seamlessly together. Instead of a book with dead code examples, the code is ‘alive’ – press run and it executes. Better still, the student can change the ‘book code’ and immediately see the change take effect. It’s brilliant!

Today I worked on getting the Hub automated with supervisor. My next project is to store the notebook pages in a Git repository, either GitHub or local to the server, and then refresh them whenever users log in to the Hub.

Eventually I’ll use Git for notebook version management for all users, but one step at a time.

Posting a Jupyter Notebook in WordPress


This is a new SciJava Notebook

What’s happening

  • The notebook is viewed and running from a browser on a completely different machine
  • Jupyter Lab is running on Ubuntu in the background as user anaconda
  • Jupyter Lab is accessible over the local network via https & secured with a password

this is really very cool

  • because it is
  • because I said so
  • did I mention it’s really cool?
In [1]:
for(int i = 0; i < 100; i++) {
    System.out.print(i + " ");
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 Done.

And now… The Sieve of Eratosthenes…

  • the code was on my local pc
  • the code was just cut and pasted into this notebook
  • the code ran first time (well, it did on the PC as well)…
In [2]:
public class Seive {

static int MAX = 1000;

    public static void main(String[] args) {
        int[] stones = new int[MAX+1];

        // initialize
        for(int i = 2; i <= MAX; i++) {
            stones[i] = i;

        // remove non-primes
        for(int i = 2; i <= MAX/2; i++) {
            for(int j = i+i; j <= MAX; j += i) {
                stones[j] = 0;

        // display the primes
        for(int i = 2; i <= MAX; i++) {
            if(stones[i] > 0) System.out.print(stones[i] + " ");
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 

a web link using regular old html…
Huntrods Zone

In [ ]:

Camera Fun… (not really)

I have a Canon 7D Mk 1. Two actually. I bought one with an underwater housing, and it’s awesome. I bought another locally to use as a spare in case there’s a problem with the UW camera. Housings cost a lot more than cameras for most models, so it’s good insurance to have a spare camera.

Anyway, some time ago the 7D (land) model started to fail. I got “Err 20” errors when I’d try and take a photo. At first it seemed to correlate to using the pop-up flash, but later it simply happened any time, and eventually all the time.

I sent the camera to a Victoria camera shop that could fix Canons, as it was a lot cheaper than sending it back to Ontario – the only Authorized Canon Center in Canada.

It was diagnosed with the problem “stutter failure”. The quoted repair price was good, so I had them proceed. After just over a month, it came back “good as new”. Except, after a couple of weeks, the “Err 20” returned.

I sent it back under repair warranty, and the tech said “I don’t know”. So they sent it back to Canon Canada (in Ontario) to have it diagnosed. It turned out to be the mirror box, which was replaced. Fortunately, it was under repair warranty so I didn’t have to pay anything.

As it turns out, there is a very rare case where both the shutter and mirror box fail, but you can’t diagnose the mirror box until you clear (i.e. fix) the shutter problem. That was the case for my camera.

At any rate, it’s back now and working perfectly. I’ve been using it to take my renovation photos since it came back.

Glassblowing update – August 2018

Nothing to report. Literally. I’ve been working on the main bathroom renovation since late June, and then in July Linda broke her ankle. Between the two, I’ve had no time at all to even enter the glass shop.

Maybe in September I can check the wiring connection and put things back together, but not right now.


The past few months I’ve been working on a major home renovation in my spare time… replacing the shower and tub in our main bathroom. It’s been a lot of work, and a lot of ‘my brain hurts’ design work and design decisions.

At this point I have multiple spreadsheets running with design choices, templates, calculations and patterns. Very complex but also a lot of fun.


Email Oops

I woke up one morning, and checked my email as usual. All was good. A little later, I wanted to send a reply to one message.

It would not send. I kept getting “timeout on mail server” errors. I tried several things, and nothing worked. Finally, I called my email provider to as if the mail server was in some way affected.

Nope. But then I got asked a series of questions about my config. Apparently “everything” was wrong with it. I made the changes they recommended, but hate them as the password is sent in plain text. Yuk. But… at least I could send email again.

Later in the day I was doing some other work, and had reason to open the taskbar box (win 7). I noticed something odd. The Pulse Connect icon showed it was active. I have to use Pulse to create a secure tunnel to AU in order to view exams that I mark. Usually I activate the tunnel, mark the exam and then disconnect. However, this day I saw that I was still connected.

Acting on a hunch, I disconnected the Pulse tunnel. Then I opened my email and reset the configurations to what I had before the morning phone call. Lo and behold, I could send email again with a secure password.

SO – the tunnel to AU was interfering with access to my email provider’s SNMP (send) server. Interesting. Something to note in case I do that again.

OpenBSD Weirdness… and NO permanent solution

A couple of weeks ago I accidentally turned off one of my UPSes. Every morning it starts beeping a warning about the battery complete with yellow warning light. So I was inspecting it and wanted to silence the alarm. Well, hitting the big button is NOT the way to silence the alarm. Yes, it does silence the alarm, but it does so by turning OFF the UPS.

Oops. Killed three servers; my OpenBSD web server and firewall, my Solaris Tomcat box and my backup file server. I restored power, then did a ‘hot swap’ for new batteries, which sadly did not solve the beeping problem. I suspect it’s just old age on that UPS and it’s now cranky. Oh well.

Meantime, all three servers came back up without apparent incident. Except… my home info server running under Tomcat on the Solaris box was unavailable. I checked a local port, and it was working fine, but  not via the firewall server.

After much checking, a couple of reboots and some web reading, it became apparent that the OpenBSD firewall did NOT load the packet filter rules when it booted. As soon as I manually loaded them the Tomcat server was again available.

I searched and searched, but there is absolutely no reason I can find as to why a working OpenBSD server would fail to load the PF rules on boot. The rules are good; there were no error messages at all in the boot logs, and it’s always worked in the past.

For now I just made a note to check date and pf rules whenever that server gets rebooted, which fortunately is about once every several years. I also need to keep my fingers off the big UPS button!

Glassblowing update – April & May 2018

On April 4 I started to blow glass, but the furnace was acting up. Ramping from 1900 to 2100, it went to 2000 and then really didn’t get any hotter. The temp readings were acting up and not settling down, so I set it back to 1900. April 5 I tried again. This time I was watching and saw the temperature reading go past 2000 no problem, but at about 2050 it started to “go unstable”. Eventually it read UUUU which means “no reading, upper limit”.

The only reasonable causes were; broken thermocouple, faulty wiring or connections, or controller failure. The sane response was to shut the furnace off and do a complete check of all components.

After turning the furnace off, I noted the crucible was welded to the maintenance lid by spilled glass. It would not budge, even hot. In an effort to free the crucible from the lid, I blocked the maintenance lid up a bit (about 1/2inch) and left it.

Sure enough, when I returned 12 hours later the crucible was free.

Once the furnace was completely cold I removed the crucible, lids and alumina board to have a look. The crucible is in excellent shape, though full of glass. The kanthal heater wires also look in perfect shape, which is amazing for the age of the furnace. The lids were all good, but there was glass on the top lip of the crucible and on the bottom of the rammable gathering ring. This was what welded the crucible to the ring and thus the lid.

I’ll have to remove the glass carefully so the crucible doesn’t weld next time I run hot.

The next steps are to inspect all the wiring and connections, and then to make sure all connections are tight. The most likely cause of the temperature readout issue is a loose thermocouple connection as these are usually pretty robust if not touched. Only if the connections are all tight will I start further tear down.

My action plan for the late spring (May-June) is to first check the wiring connections. Second is to remove the grog in the base of the hot box and sieve it so it’s clean, then reinstall the two lids and take the furnace up to 2100F to check the wiring and controller. With the crucible out of the furnace, this can be done much quicker as the crucible is the limiting factor on temperature rise.

While  this is going on, I’ll also clean up the gathering port ring and crucible lip. If the heating test is good, I’ll install the ring and crucible to the again cold furnace and start it up.

Network weirdness gets… weird

On Feb 1, all network traffic became … weird. The symptom could best be described as DNS requests being slowed by more than 2x… just enough so that attempts to connect to web servers, mail servers, web pages etc. would randomly fail on the first attempt, then work on subsequent attempts.

It was so bad that everything I did on the web, including email, had to be done twice. Once to fail, then again to connect. I noticed the problem on all devices, not just windows PCs but the iPad and iPhone as well, so I was pretty sure it was more than a device specific issue.

I waited a day or so, hoping it would clear, but after it became apparent it wasn’t getting better, I called Telus. They checked my modem and connection and pronounced all good. They also stated there were no DNS server issues.

So I was stumped.

Finally this week I decided to try the universal computer fix-all: I rebooted the Telus high speed ADSL modem. As soon as the reboot was done, it was clear that the problems were also gone.

I am used to certain types of hardware running for ages without needing a reboot, so was a little surprised that the modem needed the reboot to clear it’s buffers or whatever got mangled.

For now I’m just going to monitor and see how frequently this occurs, but it sure was weird.


Notes from all over for Dec 22

Just some notes on stuff that’s happening as of Dec 22.

Linda’s Windows 10 computer, after a few configuration teething pains, is running quite well. Getting rid of the lock screen took 3 attempts as Microsoft is determined to foist this crap on users, even to the tune of disabling workarounds with each new update. It remains to be seen if my efforts will work for the longer term as MS is so very determined.

We did blow ‘edge’ away. It’s easily the worst browser I’ve ever seen. Basically, it has almost zero configuration options, and the few it does have it ignores. Gone forever and gladly back to Firefox. Likewise the default ‘mail’ app is gone and Thunderbird again rules the emails. Like edge, ‘mail’ is another MS app that can’t even play nice – not even with other MS things like Outlook. What a damaged, untested, unprofessional piece of crap.

I did install Office 2016 this week thanks to a “Home User Program” deal from MS. Because Athabasca U bought into the whole MS lock-in, we get to buy home versions for really cheap (like $13 for Office 2016 pro!). It’s OK. I personally prefer Office 2013 because that was the last version without “THE RIBBON”. Yet another unwanted MS user interface “update”.

As for my AU work, I can’t hear people on the phone very well, and certainly not upset persons who make talk fast and in a higher register. After consultation with other AU academics, I bought “MagicJack” from the main website as it was on sale. It does come from the USA and took a while to arrive, and the free phone number is only USA, but it does indeed do what it claims. I paid the extra $10 to get a CDN number (Edmonton exchange) and then had AU tie it to my academic 1-888 number. By yesterday it was all working tickety-boo. Better yet – any voicemail message gets emailed to me as an audio file so I can keep track. I can use a headset when calling anywhere in North America (free) so it’s awesome. Eventually I plan to see if it would work to replace most of the land line features, but not yet. First to see it in action.

I bought a leak detector for my underwater camera, and it came after almost a month in the postal system. Still, not bad coming from Slovenia. It’s really well built and should provide extra protection against flooding for the big underwater camera system.

Speaking of which, the replacement Kraken ring light/strobe came a few weeks ago, and worked correctly from the box. Nice to know it wasn’t simply user error but rather some issue with the optical strobe sensor.

That’s all for now. Time for a Christmas break.

Merry Christmas to all, and a very Happy New Year!