Server – A Nightmare No More

My last post about the new server indicated the Gigabyte motherboard was returned and an ASUS motherboard ordered as a replacement. I also ordered the cheapest video card I could find as there is/was no on-board video with the basic AMD Ryzen CPU.

The parts arrived in the first week of March, and I promptly put everything together. This time I installed the cpu and head sink/fan on a sturdy table (with static protection), as well as the memory and M.2 SSD. The new motherboard is a bit longer than the first one. It nicely picks up some mounting standoffs on the end, leaving nothing unsupported.

The motherboard went into the case, and the power supply connected easily. There was an initial problem with the front panel connectors, but ASUS had a QR code linking to a very complete ‘motherboard connector and header’ manual that helped immeasurably.

With everything connected, I started the machine and was immediately rewarded by a good boot sequence and the video BIOS screen. After verifying the BIOS settings, I started to install the OS.

Here I had a problem. The 16gig data key was not recognized about 9 times out of 10. Finally I grabbed a different brand data key (same size), re-flashed Ubutntu 18.04 server and was able to install the OS in very short order.

Once I was sure all was well, I buttoned up the case and installed it in my server rack. It’s been running without issues since, having JupyterHub installed as the primary application. It’s also blazingly fast compared to all my other Ubuntu boxes.

Overall I am now quite happy with the 6-core AMD Ryzen chip, though I still wish it had come with at least minimal VGA graphics, as that’s really all a server requires.

Server Nightmare, continued

When last we left our tale of woe, the server was running but without video. Messages to AMD and Gigabyte were unanswered, and the internet was not much help other than to suggest a BIOS update was needed.

Since then much has happened. I did finally hear from both vendors; more on that later.

In the meantime, I decided to try one internet suggestion – adding a separate graphics card to flash the BIOS. The motherboard has three PCI slots, but I didn’t have a PCI video card. I called a local computer shop to inquire whether they might have something in a “junk bin”, and they did. I went to town (literally) and picked it up… FREE.

Back home I plugged it in, and it worked. I now had VGA video, which is all I really need for a server, and certainly sufficient to flash BIOS.

With video, I managed to flash the BIOS from the older version (F2), first to F3 and finally to F4 (the latest). There were a few issues along the way, but by now I had downloaded a full manual and used it as a guide. I did notice a few issues with the motherboard and USB data keys that bothered me at the time, such as booting with some keys locked up the USB keyboard, but set that aside for the time.

With the BIOS updated to “latest”, I removed the PCI graphics card, powered on, and… STILL no video. I was flummoxed.

However, help came from a surprising source. FINALLY I heard back from both vendors. Both said the same thing: the AMD Ryzen 5 2600 CPU does not have on-board graphics. This was a surprise to me as there was NOTHING on the manufacturer sites or manufacturer materials supplied to Amazon.ca to suggest this was the case when I chose these components. However, given what I was seeing, it made sense. As it turns out, AMD sells two “things”: a CPU with no on-board GPU, and a thing called an APU which has the GPU on-board. Who knew?

I decided I could live with this and sourced a cheap PCI low profile graphics card as the free one was full height and won’t fit in the 2U rack case.

I decided also to install my server OS – Ubuntu 18.04.01 (server) as the video card wouldn’t be an issue as I always use VGA on servers.

Here is where the USB issue finally bit me. More than half of the time, the install failed with a USB error. Sometimes it locked up the USB keyboard as well. Only once out of perhaps 12 attempts did it start to load the OS, and then it failed when I plugged in the network cable by scrambling the video (what???).

Ultimately I decided the USB was flakey and initiated a return from Amazon.ca for the Gigabyte motherboard (reason: defective… ‘flakey USB’). It’s already boxed and mailed back as I write this.

I decided to keep everything else, as I do like the other components and am willing to give the AMD Ryzen a chance. I would have kept the Gigabyte motherboard as well were it not defective. However, given the several reports of similar USB flakey-ness by other reviewers, I decided to buy an ASUS motherboard designed for this CPU.

One last annoying tidbit – the ASUS site actually states that the AMD chip does not have on-board graphics and you’ll need to buy a video card. I wish I’d gone with ASUS from the start – at least I would not have been surprised and wasted 3 days chasing phantom video problems.

Vendors who should know better (a server nightmare)

Gigzbyte and AMD, I’M TALKING TO YOU!!!

I need a new server for JupyterHub, and since I do like building servers and such things, I decided to do some research and buy a decent lower-cost “server-as-parts”.

I found from many reviews that the Gigabyte B450M DS3G motherboard, paird with the AMD Ryzen 5 2600 CPU was a killer low-cost solution. I added appropriate speed (3000MHz) Corsair DDR4 memory (16GB to start) and a M.2 250GB SSD, all to go into a 2 rack-space case with an EVGA 500W power supply.

After all the bits came, I carefully assembled it and tried the first “smoke test”. It ran, but immediately gave a set of BIOS “error beeps”. Specifically “long-short-short” which means NO VIDEO for this BIOS.

Sure enough, plugging in either known good HDMI or DVI cables to a working monitor gave nothing.

Searching on the internet proved this to be a VERY common problem, known since at least Nov 2018. Essentially, the motherboard is shipped with the wrong BIOS version. It’s early and doesn’t know about the new CPU with on-board video.

The solution is to flash a new BIOS… but how? With no video, you can’t see what’s going on to flash a BIOS. Very expensive motherboards have “Qflash+” which lets you put the bios on a data key in a special USB slot and it “just flashes”. My motherboard, the less expensive one, doesn’t have that feature. It can update from USB key (Qflash) but not “the plus”.

AMD’s solution is to have you request “a boot kit”. They send you a lesser (older) CPU “on loan” to fire up the motherboard, flash the bios and then send back. However, it was instantly obvious they have zero intention of doing this – you must “prove” you own the chip by taking a photo of the CPU clearly showing the serial number and model. PROBLEM: these are now covered with opaque white thermal compound if you’ve installed the supplied CPU cooling fan as any intelligent builder would do. So AMD wants you to scrape off the thermal compound and take the photo, then use ??? (what???) when you finally put it all back together. Well, I’m not stupid so I’m not running a CPU “dry”. Which means I can’t take the obligatory photo, so I can’t have the “boot kit”. What a bunch of idiots. (and I told them so by reply email and in an on-line review).

Next idea: put in a PCIE graphics card into one of the PCIE slots and boot graphics that way. I was able to score a very old PCIE VGA/DVI card from a local computer company’s scrap bin, and sure enough, it WORKED!!!

It sits an inch higher than the case, so it’s not a permanent solution, but it worked and I had VGA to see the BIOS screen.

After reading the BIOS update procedures, I carefully updated the BIOS to the latest version. Everything works… EXCEPT STILL NO VIDEO!!!

I’ve got a second trouble ticket in with Gigabyte, but who knows when they’ll answer.

Since this is a server I could buy a $50 shorter PCI graphics card and just use it to install Ubuntu, as the server will actually never be connected to a video monitor unless there’s a problem.

BUT WHAT WERE THESE IDIOTS THINKING – SELLING STUFF THAT DOESN’T WORK AND THEN HAVING ABYSMAL CUSTOMER SUPPORT (and the latest BIOS still doesn’t work).

If this was ‘bleeding edge’ like a game machine, I could see this as a typical issue, but this isn’t bleeding edge stuff – or shouldn’t be.

WORST CASE, BOTH CHIP AND MOTHERBOARD GET RETURNED IN MARCH.

Well, this is unexpected (a server story)

As the title says, I’ve been having a most weird server experience, culminating in a rather fascinating and unexpected discovery.

As posted recently, I’ve been experimenting with Jupyter Notebooks using JupyterHub on Ubuntu 18.04 Server.

I started with a server built on Oracle’s VirtualBox 5.x running on my development machine, which is an Intel quad-core I7 with 16GB of memory and a couple of smaller SSDs. I gave the virtual Ubuntu 8GB of memory and 2 cores, plus 64GB of disk space. This is where I cut my teeth on installing Jupyter, first locally, then JupyterLabs then JupyterHub (again locally) before finally installing JH globally. On the way I learned quite a lot, and took these lessons to all other platforms via some detailed documents I wrote.

The first Ubuntu was desktop, complete with lots of X-type stuff. It was fast, it was good, but I wanted a more “dedicated” server.

My second server was Ubuntu server running on my Windows Server 2008 R2 file server. It’s a backup file server, so it wasn’t doing much. I installed Oracle VirtualBox, this time V6.0 and Ubuntu 18.04 server as I don’t need the x-stuff and wanted a lean, faster server rather than a desktop. (the iso install images are quite dramatically different in size). This machine is a quad-core Xeon of recent vintage.

he server only had 8GB physical memory, so I could only give the virtual server 4GB. As a result, it was very slow.

About that time I resurrected a ‘pizza box’ 1U quad-core Xeon server that also had 8GB of memory (it was the max for that vintage machine). As this was a dedicated box, I could install Ubuntu 18.04 server as the native OS and give it all the memory. After installing JupyterHub, it seemed… VERY sluggish. Opening notebooks took a very long time (minutes) and sometimes they would not open at all. I experienced problems connecting to the kernel, and it was just very frustrating.

I’d deleted both virtual machines, so decided to try another on the development I7 box. Giving it 8GB, 2 cores and 64GB disk as before, I installed JupyterHub.

At this point, I have two almost identical servers, with the same memory. The quad-Xeon has 4 cores, the virtual I7 has only 2, but otherwise things are very close.

And here came the unexpected surprise. The I7 virtualmachine is easily 10x faster to my perception than the Xeon. It’s truly a night and day difference. Where the Xeon is sluggish to open notebooks and connect the kernel (if it even succeeds), the I7-virtual is quick and responsive. Editing notebooks is a joy, instead of a grind. Things are quick, kernels don’t die and it’s just a totally different environment.

Yet aside from hardware, everything about the installs is identical. Even the notebooks come from the same github repo, so are identical.

Today I ran some benchmark tests on both machines, and every test shows the I7-virtual machine (with 2 cores) is double the speed of the quad-core xeon with 4 cores. It’s astounding.

Rebuttal: Why I DO Like the Linux Model

OK, this does seem like a bit of a back-pedal, doesn’t it?

Well, that’s the thing about the “Linux Model” – the very things that are so irritating can also be the reason it works.

Let me explain by returning to one example I mentioned in my prior post, using C++ in Jupyter Hub.

To recap: C++ used to work in Jupyter Hub, then suddenly stopped after an update of some packages in Conda. Conda is the environment that manages Jupyter Hub, and works a lot like apt-get for Linux. After one update, all things C++ failed to the point the kernel would not load at all. An examination of logs revealed <features.h> was missing as well as many other library errors.

Simple google search revealed many with similar (but NOT the same) problems, and many complicated workarounds.

This is one of the problems with the Linux Model. The many “solutions” can often make the problem infinitely worse. Worse to the point you throw up your hands and just rebuild from scratch, which most certainly did NOT want to do. Part of the problem is that “solutions” can come from anyone in the community: seasoned pros, or first-time amateurs. Most don’t document what they are doing very well, and so you make assumptions… and get in worse trouble.

The Linux Model solution is to try and find an authoritative source. Usually this means contacting the team that developed the “thing” that’s broken. Often (and again a failing of the open Linux Model) the team has moved on to other things and really doesn’t care or maintain the broken thing. In such cases, you are pretty much hooped unless you can get the code and love delving into ancient artifacts.

It also requires a LOT of digging in many cases to find the team, or else… EXPERIENCE knowing where to look.

Fortunately, I was beginning to obtain that experience. (and NO, it’s most definiely NOT the group of Stack Overflow websites, but that opinion is for another day). After starting with Jupyter Hub, I began noticing that a lot of the projects were hosted on github.com. I’ve used github before, but only to download/install things. With Jupyter, I began noticing a lot of activity happening on the “Issues” tab. Here I discovered the magic: if the project was active, the developers READ the issues and would comment/reply.

Knowing this, I returned to my C++ problem. I found the package on github, and used issues to contact the team with my problem…. “it’s busted” but stated more “unix like” 😀

Within an hour one of the developers contacted me to say they’d changed the way they distributed the package for the very reason I mentioned (C++ library problems). They rewrote the distribution and moved the code from a custom source to the Conda standard source “conda-forge”. However, the old code was still “out there”. I was told to grab the new code and it shoudl work.

I did this, and it didn’t work. However, having chatted with a developer, I simply updated my “Issue”. The next day I received a reply: remove EVERYTHING from the old distro source. Using “conda list” I could clearly see MANY packages (not just the base C++ package) came from the “now bad source”. After removing all of them and reinstalling the main package from the proper source (conda-forge), I tried my C++ example and it worked perfectly.

So the Linux Model does work, but you have to do a lot more homework and find the place where the developers’ hang out with the current code.

For Tomcat, that’s the Tomcat-users or Tomcat-devel list group. For my 8-bit computer replicas, that place is some specific google groups. For most things involving Jupyter Hub, that place is the appropriate github.com repo (and the Issues tab).

My final thought for now on the Linux Model is that it does work for almost anything current. The big bonus is there is often a HUGE community of active developers who really want their work to be appreciated and used. Find them, and ask properly worded respectful questions, and you can see the Model work beautifully.

It’s Nice When Things Work

This is about LetsEncrypt, JupyterHub and Tomcat.

I built my JupyterHub server on a quad-core xeon 1U ‘pizza box’ server I had spare. It’s short on memory because this generation HP Proliant server maxed out at 8gig, so that’s all I can put in it. Still, it works and is a good demo platform for JupyterHub and my Java course revision project.

JupyterHub really wants to be running as secure HTTP (HTTPS) with a proper certificate. I put the server on a different port (not 443) but can still reach it from my domain, using packet-filter redirection in my firewall.

But – it wants that proper certificate. Typically one would just create a ‘self-signed’ cert using Java’s keytool and use that for Tomcat, but Jupyter wanted something else.

Fortunately I found enough documentation and tutorials to enable me to install and generate a LetsEncrypt (free) certificate that worked perfectly with JupyterHub. There were issues, mostly involving the need to create the certificate manually, but once these were resolved it worked perfectly.

This past week I wondered “could I use the LetsEncrypt certificate with my Tomcat application?”. I searched the web, and found several rather conflicting accounts of how to do it. I tried a few, and all failed.

Eventually I found one that started with “forget all the difficult stuff you’ve read. Installing a LetsEncrypt ‘pem’ file into a Tomcat keyfile is easy. Here’s how…”. I followed that two-command process, and was immediately rewarded with full certificate security for my Tomcat application, WITHOUT having to create a browser exception for the certificate.

It is so very nice when something “just works” the way it’s supposed to work. It’s even nicer when you find simple, unambiguous instructions as a guide. Thanks to Maximilian Böhm and his guide here: https://maximilian-boehm.com/en-gb/blog/create-a-java-keystore-jks-from-lets-encrypt-certificates-1884000/

Why I don’t like the ‘Linux model’

There’s a thing I’m going to call the ‘Linux model’. Not because it pertains ONLY to Linux, but because most of what’s wrong with this model often starts with Linux and stuff that runs (best) on Linux.

In a way, this is really a story about all the stuff that’s broken in JupyterHub, but it goes beyond that… it’s the general model that’s broken, and the model really owes it’s roots to Linux.

Basically, when you install something on a Linux box, and even the OS for the Linux box itself, it’s probably broken. That is, *something* won’t work after installing it, and there is no way short of digging into some code somewhere of ever fixing it.

Worse, the breaking of such stuff is often super complex and intricate – somewhere buried in a log somewhere is a message regarding “package X failed due to expecting library Y to be x.x.x but was z.z.z”. Or similar obscure “thing” that takes days to figure out, if ever.

You can post the error on google and what you get most of the time is a dozen hits – all questions on StackOverflow asking the same thing and getting precious little of value in response.

Worse, you are expected to manually update packages on an almost continuous basis, and (of course) such updates often break things that were working fine before the update. Yet if you don’t update, something ELSE will break.

The entire model is broken.

What triggered this particular rant today is that I spent ages figuring out how to (finally) install C++ into JupyterHub so I could run C++ notebooks. Yesterday, I found it broken. The log complains about a library *supplied by the supporter of this C++ package* being the wrong date compared to what’s expected. It doesn’t matter. C++ in JupyterHub is now broken, and good luck finding anyone to respond with anything useful. Even less likely is that the C++ supplier will fix it anytime soon.

That’s the other problem with the Linux model. Everything is well documented and often supplied with tutorials. BUT… THEY ARE ALL YEARS OUT OF DATE. Worse, the stuff they describe has changed so much in the years since that you cannot follow the tutorial without being worse off then if you’d just thrown mud at a wall.

The biggest problem with the Linux model is that noone really cares. “I did this really cool thing in 2012 but now I’m bored and … who cares”, seems the mantra of every developer. Nothing is maintained for long. It’s becoming obvious that nothing is really being used either. Otherwise the failures would be noted and (hopefully) fixed.

Overall, it’s a really depressing time to be trying to actually do anything on a Linux box.

Reflections on Computer Horsepower

I’m rapidly on my way to becoming an old codger. This Christmas Break I soldered together a couple of hardware kits that emulate some old and older computers. One was an Altair 8800 copy, which in it’s day was one of the very first “personal computers” ever sold. The other kit was a PDP11/70 replica, which was some of the first “big iron” I ever programmed on.

Now as testiment to my codgerhood, my first computer experience was at the UofC on a CDC Cyber 170, followed by the Honeywell Multics system that replaced the CDC at the UofC a few years later.

My first job post-graduation was at a company using two IBM 3033 mainframes, each of which filled a large room. The laser printer filled an equally large room, but that’ another story (it was VERY fast).

From there I worked with various other systems, including the above (actual) PDP 11/70’s and even at one point some time on a Cray YMP.

But this isn’t about “bit iron”, it’s about the personal computer. My first was a TRS-80 Model I. I bought a silk-screen expansion board, sourced and soldered it together as I could not afford the “offical” one. Later I bought a TRS80 Model III, then the 4 and finally a Model 4P, which I still have complete with all manuals and software.

But in amongst that time came the IBM PC. It changed the world simply because it was IBM and it seemed *everyone* (or every company) bought one.

I never owned an IBM PC, nor a clone PC. My first forray into “modern” (i.e. post-IBM) PC ownership came when Tandy brought out the Model 2000. This was based on the 80186 chip, which was a “hybrid” – not an 8086 and not an 80286, but something in between. It was a great machine, and much more affordable (for the time) than a “286”.

As I struck out on my own consulting, I bought one of the newest “386” machines, and it cost me $6000. But for the time it was the greatest, fastest machine you could buy.

I lived, worked, and owned PCs through the 486 era, and into the “Pentium” machines. By then the operating systems were firmly Windows based. I skipped Windows 1 through 3, but at Windows 3.1 it finally came into it’s own. Windows for Workgroups (WFW 4) was a really nice system at the time, and I did quite a bit of work on it.

Then came Windows 95, which “changed the world”. Certainly it brought the internet to the common computer owner, as well as a pretty decent OS. Buggy, but decent. Then came Windows 98 and Windows ME (pronounced “meh” – as in “what the hell is this piece of crap???”). By then I’d gravitated to Windows NT, which had one great feature – it worked and worked well.

Through this we had Pentiums. They got faster, but they were Pentiums.

Eventually sometime after 2000 Intel started putting out the I series – I3, I5, I7. Each one had more cores and was faster than the predecessor. AMD also had multi-core chips, and there was, for a time, a nice “arms race” of computing horsepower.

At the end of April, 2012, I built my current PC system. It uses an Intel Quad Core i7 3770K, Asus Sabertooth Z77 ATX motherboard, 16GB of RAM, a couple of fancy graphics cards, a fancy case with water cooling, 2 x SSD hard drives and a Blue Ray writer. All state-of-the-art for early 2012. I bought the components and assembled it myself, and it was (and is) a very nice system.

It was also considered very fast and high performance. That particular Intel I7 (3770K) was quad core, and fast.

But what I’ve noticed since then is… nothing. I *think* you can buy processors with more cores, and probably faster ones, but today I realized that although I still get tech-type feeds, I haven’t actually heard much in the past few years about “newer, faster, better” processors.

It’s as if we’ve exhausted that particular line of “faster, better” in personal computing. I suspect that for 99% of the market, ANYTHING you buy today is plenty fast enough. The other 1% is gamers, and perhaps if I got gaming feeds or magazines I would hear more about “faster gaming machines”, but I do wonder.

Have we really reached the end end of the “faster, better” in computing hardware?

I also wondered; if I wanted to find out what the FASTEST computer you could use today, how would I even go about finding it? Yea, there’s “the google”, but I’ve also started noticing that between all the “targeted results” based on what you like, it’s getting harder and harder to find any REAL information on the internet these days.

<sigh> I guess I really am becoming an old codger.

2018 Christmas Break Soldering

I bought a couple of Vintage Computer replica kits in the summer, but did not have time to work on them due to home renovations. One kit was a replica PDP11/70, the other a replica Altair 8800.

I decided that they would be perfect “Christmas Break” projects and so kept them until then.

Over the Christmas Break, I got them out and started building them. I started first with the PDP11/70 kit, or PiDP11 as it’s called. It features a manufactured plastic case and switches that create the complete look of a vintage PDP11/70. There is also a front panel and professional grade circuit board and all the components (switches, resisters, LEDs, diodes, etc.). The kit uses a Raspberry Pi (Model 3B recommended) running software called simh to drive the replica. Basically you run the Pi’s Linux and simh runs as a process on top of that – reading the switches and driving the LEDs.

The kit was straightforward to solder together, and ended up taking most of one afternoon and evening to build. When complete, it looks and works very much like the PDP11/70’s I have used in the past, minus the loud whirring noise of the giant disk packs and fans.

The second kit was the Altair 8800 replica, which again featured a case (bamboo this time), front panel, circuit board and the bags of components. The Altair 8800 emulates the 8080 of the early computer days using an Arduino Due, rather than a Raspberry Pi. This kit was more complex, and took an entire day to solder together and assemble.

I had a few initial issues with the Altair kit, as it features a bluetooth serial port as well as an SD card reader to hold various “disk pack” images. At first I could not get either the bluetooth nor the SD reader working. Some email discussion with the kit designer indicated the bluetooth card, though powered, was not initialized unless you manually configured it in the software setup. Once done, the bluetooth works perfectly and has become my preferred communication channel with the replica. The SD reader was more interesting, in that the metal ‘can’ protecting the pins was bent, preventing full insertion of the SD card. Once that was fixed the SD reader worked perfectly, as did the replica.

It’s been fun keying in a few simple programs into both replicas using the front panel switches, but the real power comes from all the operating systems both replicas support.

The Altair 8800 replica, or “AltairDuino” offers CPM, Altair DOS, many games and other amusements. The PiDP11 offers RTS11, BSD 2.11, 3 flavors of Unix and a real-time OS once used in SCADA industrial control.

I really enjoy playing with these old machines. Given the current state of obsolescence and the love of many to consign everything unwanted to dumpsters, I’ll likely never own full-size originals, but these are a lot of fun.

JupyterHub Chronicles

I’ve continued to work with JupyterHub since my last post, and have made significant progress towards my overall goal of creating a real system for developing a programming course.

The first development was to recreate my work to date on a new server: Ubuntu 18.04 Server, as opposed to Desktop, which I had been using. I also moved this server to VirtualBox (now V6) on a different machine. The new machine acts as a file server and has capacity to spare, plus stays on “as a server” all the time.

Installing Ubuntu 18.04 Server on the machine was not difficult, and following my scripts I was able to create JupyterHub on the new server, with full encryption and networked through “huntrods.com”. I also recreated the various demo logins to allow me to share this work with other colleagues.

I finished developing “Unit 0” for my Java programming course, as well as exploring other resources such as using it for my Network Java Programming course. There were some issues, but most of the programs work.

I also found some significant shortcomings in SciJava, which I contacted the developers for more documentation. Their response was “move to BeakerX, as it has a full Java implmentation”. They also informed me that SciJava might be End-Of-Life soon, which would be unfortunate.

However, I installed BeakerX according to guidelines from a developer on my single-user Ubuntu Desktop. It worked, so I then tried installing it on the Ubuntu Server. After one set of instructions failed, I reverted to the method that worked for many of the packages, and it worked.

I now have a full-featured Java running on JupyterHub under BeakerX. There is one outstanding issue that affects both BeakerX-Java as well as SciJava: neither will accept user input from the keyboard.

Another limit on BeakerX-Java is that it won’t run fragments of code that aren’t real Java. Example: SciJava will evaluate “10+23” and output “33”. BeakerX-Java gives an error as would happen with “real” Java (which is what BeakerX has).

It turns out (from the developer) that SciJava is really a Java+Groovy hybrid, which is great for what I’d been doing, but isn’t really “real” Java.

Either I modify my Unit 0, or go with the SciJava in some notebooks and BeakerX-Java in others.

However, it’s great to have full-blown Java available in my notebooks.