If you browse online software development communities, questions from new developers about AI replacing the need for developers are asked almost daily.
Here’s a couple of my past posts on this topic from 2023 and 2022 which I feel still hold true:
Articles, notes and random thoughts on Software Development and Technology
If you browse online software development communities, questions from new developers about AI replacing the need for developers are asked almost daily.
Here’s a couple of my past posts on this topic from 2023 and 2022 which I feel still hold true:
My SSL certificate for this site was about to expire this week, so I paid for an update for another year and then proceeded to upload my new certificate bundle to my server. Having been through this process a few times, I have a couple of posts describing the steps for configuring nginx with SSL certs here:
… and how to create a certificate bundle here:
I normally concatenate the root, intermediate and my site certificate manually before uploading using the steps in the post above. This time though I noticed the updated certifcate had a bundle download, so I downloaded this and uploaded straight to my site and then restarted…
Unfortunately, since I run nginx in a Docker container, on restarting the container it failed and then went into a restart loop. While constantly failing and restarting like this, it’s not possible (that I know of) to ‘docker exec -it bash’ into the container since it hasn’t completely started. In hindsight maybe ‘docker log’ would have told be what I needed to know, but I wanted to look at the /var/log/nginx/error.log inside the container to see what the issue was. I found a neat trick to do this which I’ll cover in another post.
In the meantime, I found the error in the nginx error.log was this:
2024/06/12 16:31:02 [emerg] 56#56: SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl-certs/my-site.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
This seemed odd since I generated my CSR for the new certificate on the server and had the key for the request and new certificate. This post for this error luckily had suggestions to look at the contents of the bundle, using:
openssl x509 -noout -text -in yourcert.cert
And exactly as one of the answers suggested, the ‘Subject:’ field in the certificate was not for my domain, it was for the CA instead. The bundle that I downloaded after purchasing my new certificate contained the CA and the Intermediate certs but not the cert for my domain… I should have followed my own instructions for combining all three and including my own site certificate.
I created my new bundle by hand, uploaded to my server and now everything is back to normal with the new SSL certificate.
In hindsight I should have tested my updates on my test server before upload direct to my live server, but since moving house recently I no longer have the HP rackserver I had before, on which I used to run a test server that mirrored the config of my live site. Lesson learned, I need to set up a new test server…
The EB cli provides an ‘eb ssh env-name’ command to provide ssh access into a running EC2 instance. If the environment wasn’t setup to enable ssh, you’ll see this:
> eb ssh test
ERROR: This environment is not set up for SSH. Use "eb ssh --setup" to set up SSH for the environment.
After running ‘eb ssh –setup’ you’ll be prompted to confirm the environment name, and then select a previously configured SSH keypair to use to provide auth when logging on to the instance.
If an EC2 instance is already running in the env, this setup step configures new EC2 instances to enable ssh, and then conducts a rolling update to take down any previously started EC2 instances and replace them with new instances.
On Linux distros that use apt package manager, you can search for packages by name using:
sudo apt search package-name
I’m looking to install a supported version of OpenJDK on a Raspberry Pi Zero, which has significantly less resources than a regular Pi and I believe is also an older ARM cpu version than current Pi 4 and 5.
Using ‘apt search’ for openjdk shows a number of 7, 8, 11 and 17 candidates, and also versions compiled specifically for the Pi Zero:
openjdk-17-jre-zero/oldstable-security 17.0.11+9-1~deb11u1 arm64
Alternative JVM for OpenJDK, using Zero