PiDP11 Issues

The PiDP11 is a scale model of the PDP11 front panel, complete with working lights and switches, all driven by the SIMH software running on a Raspberry Pi.

It was designed by Oscar Vermeulen, who sells it as a kit for the hobbyist to build and enjoy. I bought my kit last summer, but due to the home renovations did not build it until Christmas.

Oscar and others have developed software for it that customizes SIMH and drives the lights and reads the switches. There is also a marvelous manual describing how to build and operate the kit in great detail.

There’s been one problem: the front panel occasionally locks up. There was a lot of discussion on the PiDP11 discussion forum, and several causes and solutions were offered and discussed.

Eventually the source of the lock-up was traced to a race condition in one of the files controlling the front panel. A corrected version of the file was provided in February 2019, and I finally got around to installing it (and recompiling the software) on May 22. It ran until May 28, when it locked up again.

I reported this to the group, and one of the developers (Bill) modified the source file to try and fix the problem permanently. The fix was only offered as a set of lines to edit and recompile rather than a new file to keep versions clean. The fix was posted yesterday (May 29)

Today (May 30), I edited the source file and recompiled, then rebooted the PiDP11 at 9am. The main purpose of this post is to document the date & time of this latest fix in the event it does not lock up again. I can then refer back to this post for the date/time the fix was made.

Updating WordPress Just got Messy. Really Messy.

As the title says, really, really messy.

It’s not wordpress’s fault. Rather, wordpress is keeping up with the times, and the times say PHP needs to be kept current.

Up until the last version of WordPress (5.2), my OpenBSD server created many years ago was OK. It’s version of PHP was old, but it worked. When I updated to 5.1, WordPress warned me that my PHP was obsolete, but there wasn’t much I could do at the time. My old version of OpenBSD did not have a simple path to update PHP. Rather, to update such things one is expected to update OpenBSD.

Then came WordPress 5.2. My existing WordPress stated “cannot upgrade due to older PHP” or something similar.

Time to update PHP, which meant a new OpenBSD.

That’s when Messy happened. The latest OpenBSD (6.4) is wonderful. It’s shiny and new and fast, but … they replaced Apache with a new program ‘httpd’ that was written to be ultra-secure. Too secure, in fact.

I spent two weeks fighting OpenBSD 6.4 and httpd, but could not get it to do what I needed. Worse, there’s almost zero helpful documents written about it. The manual is OK but dense, and the only “how to” site covered setting up the ultra-secure version, and nothing else.

Yesterday I finally gave up. Instead of updating OpenBSD, what if I just modified the firewall to scoot all the apache pages to a new server? Something like Ubuntu 18.04 that I’d recently put on all my tomcat/jupterhub servers? Would it be as difficult as OpenBSD?

I found a couple of how-tos, and they seemed utterly simple. “apt-get install apache2”. Done, and it was running! “apt-get install php”. Done, and also running. “apt-get install mysql” (this was for a virtual test server). Done and running. This was scary easy.

Even configuring Apache has gotten much easier due to the plug-and-play structure that’s been adopted (probably for some time).

The only difficult part was installing wordpress. It really wants to be in one place, and doesn’t like port forwarding. For example, if the test server was “http://10.1.1.214”, then that’s where wordpress wanted to be. Port forward “http://huntrods.com:8008” and it just reverted to either 10.1.1.214 or “huntrods.com” and didn’t work. Eventually I realized that port forwarding would happen when I threw the “big switch” and turned off the current (old) server.

With that in mind I did some more testing on WordPress – duplicating this blog from database backup and latest wordpress. It hated the older version and refused to run, but copying over the latest files did the trick.

Finally the big moments: install apache2 and php on the physical server, create the various accounts necessary for users, then copy all the files from the old server to the new server. Most were static web sites, but there were 3 wordpress blogs that had to come over, complete with new databases (from today’s backups).

At last it was all working locally. Time to throw the switch. On the OpenBSD server, I stopped the old apache and disabled it, then forwarded port 80 to the new server. SUCCESS, or at least partial success. I still needed to create all the Virtual Hosts from before, but with the plug-and-play Apach2 that turned out to be easy if time consuming.

Lastly I fired up the WordPress accounts, and they failed. It turned out I had to copy “latest.tar.gz’ over the older WordPress files and then everything worked.

So after two weeks of fighting httpd, I was able to get Apache2 working on an Ubuntu server, complete with full testing, in just under two days.

Success, indeed.

Updating Java is not fun

I’ve been using OpenSDK Java (Java 11) on my Ubuntu servers for a while now, so thought it would be a good idea to update Java on my main production machine.

After digging into “what’s the difference between OpenSDK and Oracle SDK”, I came to the conclusion the main difference was … nothing. Since it was a lot easier to find Oracle SDK for a Win 7 box, I chose that and downloaded the installer.

After installing… nothing. It was still pointing to the older version. I removed the older version(s) and still… nothing. I reinstalled and there was a “next steps” button which led to a help file that basically said “you must manually adjust the system PATH variable for Java to work”. Really? In 2019???

Oh well, it’s easy to do and afterward I did indeed have Java 11 running. I also updated my ‘go.bat’ script that sets up Java for command shell compiling, which is used by my production ant builds of my enterprise application.

Of course, the ant build failed, but I knew it would as the (very old) libraries were removed when I toasted Java 8.

And now came the messy part. I pointed CLASSPATH to the new (better) Tomcat location of the various servlet libraries, but still no good news. After much reading to little effect, I grabbed some of the code and tried compiling it in a shell window, which worked just fine. I had established that ant was not getting the CLASSPATH.

In the midst of this I upgraded Apache Ant to version 10 with no ill effect.

Again, after much more reading, it became clear that Ant actually and openly HATES the classpath variable and erases it when used. There was no functional work-around to this, so I reluctantly rewrote my build.xml files to embed a classpath for the application compiles. This worked, but showed more missing files.

I adjusted the Ant build until everything compiled, but it required a new ‘altlib’ directory of lesser-used jar files to fully work.

Finally, an almost-good compile. There were only a few remaining errors, but they ended up costing me time. All errors amounted to the removal of “com.sun” libraries. One was found in apache.commons, and the other was so deprecated that the advise just said “comment it out”. I did, and everything compiled successfully.

Now I’m running on Java 11 and Ant 10 with what is considered a “proper” build link to libraries. I disagree but there’s little I can do.