Kafka producer: ip addresses and host names

Scenario:

  • Kafka client 2.4.0
  • Java 1.8.0_151
  • Kafka cluster is running on a machine with hostname ‘ubuntu-confluent’
  • Producer has bootstrap.servers=10.0.0.x (ip of same host as ubuntu-confluent)
  • At runtime, it appears hosthame is passed back to client
  • Subsequent network calls from client back to cluster appear to use hostname instead of ip, and it fails

Exception on client:

2020-03-08 21:26:06,144 [kafka-producer-network-thread | producer-1] WARN org.apache.kafka.clients.NetworkClient [] - [Producer clientId=producer-1] Error connecting to node ubuntu-confluent:9092 (id: 0 rack: null)
java.net.UnknownHostException: ubuntu-confluent: nodename nor servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_151]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[?:1.8.0_151]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_151]
at org.apache.kafka.clients.ClientUtils.resolve(ClientUtils.java:104) ~[kafka-clients-2.4.0.jar:?]

Easiest fix is to just add an entry to /etc/hosts.

Retrieving ADS-B transponder data from dump1090

dump1090 is probably the goto solution for receiving ADS-B transponder signals from planes flying overhead because

a) it runs with a cheap rtlsdr USB dongle (more info on dongles here)

b) runs on a cheap $35 Raspberry Pi

I’ve always wondered how it would be possible to get data out of dump1090 to use within other apps. It provides a data feed on port 30003 that is relatively easy to capture by using a util like netcat. If you have another app to receive/parse/process the data, this is as easy as:

nc ip-of-pi 30003 | app-to-parse-data

I have a project ‘in-flight’ right now using this approach… more updates later.

Installing SunPCI 1.3 software on Solaris 10: x86 PC single board computer in a SPARC machine

The SunPCI single board computer is an interesting piece of hardware. This was a self-contained x86 PC on a single card that could be installed in Sun Ultra machines, that along with supporting software allowed you to install any operating system that required x86 hardware and run it on your Sun SPARC machine alongside whatever you were natively running on SPARC, such as Solaris.

Rather than x86 emulation, this approach provided a real x86 CPU and everything you’d expect in a typical PC compatible machine, all on a single card.

I recently picked up a Sun Ultra 60 and was lucky that it came with a SunPCI card. After I did a fresh Solaris 10 install, I needed to find the SunPCI software and drivers which didn’t come with Solaris 10. I Googled for a while and found a link to an FTP site that had the SunPCI software… trouble is this was a couple of months ago, and I’ve since gone back to try and find the same site to include a link but I think the site has recently gone down…

The official product manuals are still available and can be downloaded from Oracle here:

https://docs.oracle.com/cd/F24621_01/index.html

Getting started with the install steps, I cd’d into the folder after I’d untar’d it, and then ran pkgadd -d to start the install:

After the install completed I got this error that the SunPCI driver was not installed:

cd into /opt/SUNWspci and run ./sunpci – this tells you to run sunpcload to load the drivers:

This error about not finding the .2100 driver files is mentioned in a few posts, and most suggest (like here) to just symlink the missing filename to the same corresponding named .280 files like this:

Now it starts up and prompts to create a new C: disk image:

Create a disk large enough for whatever you’re going to install:

Booting up the card, you can see the hardware specs from the BIOS screens as it boots up – this is a v1 (I think) SunPCI board with and AMD K6 at 300MHz:

The mounted cd-rom drive appears in the SunPCI machine as drive R:, so cd’ing into the root of the Windows 95 cd install cdrom here, and run setup.exe to start the install:

Windows 95 starts running!

After Windows 95 install, install the SunPCI drivers for Windows 95, these are to support the onboard video, etc on the SunPCI card :

At this point I have Windows 95 running on my SunPCI card! Apparently you can either run with a monitor connected directly to the VGA output on the board, or run within Solaris in a window sharing the same display. I haven’t tried the dedicated monitor option yet, I’ll look into this next!

SSL certs upgraded, Docker images upgraded, ready to go!

I had to renew my SSL certs for this site, so while doing so I upgraded and addressed a few other issues.

First, apparently when I deployed the SSL certs last time I missed out some of the root certs in the chain. The vendor I used gives you each of the root certs individually and you need to manually concatenate them together yourself. More in another post on the steps I too to do this.

Since certs are part of my nginx Docker image, I rebuilt my image upgrading everything to latest versions. Since it was a also a couple of years since I last did this, I also had to go back through my posts here to work out the steps I took to deploy last time. I’ll post another update on the steps I took for this also later.