“Found unsupported keytype (18)” Error While Connecting to Kafka

Looks like older versions of Java, even often used ones (like SE 8), can generate this error if your JCE jar files are not updated. To be precise, JCE jars refer to Java Cryptography Extension Unlimited Strength Policy Files. Updating your two JCE jar files might help.

Grab a .zip of the files from Oracle. There should be two jars inside: local_policy.jar and US_export_policy.jar.

Copy/paste them to your JRE’s lib/security folder and overwrite the older ones. Your path will vary, but on a Windows machine it could be something like: C:/Program Files/Java/jdk.1.8.0_151/jre/lib/security/.

“Module not specified” Error in IntelliJ.

This happened after I renamed the modules to more descriptive logical names in IntelliJ 2018.3, Ultimate Edition. As a result, my two Maven module folders were no longer marked as modules in IntelliJ (no blue square in the bottom right corner of the folder icon in the Project panel). To solve the issue, I did the following:

  1. ”Unmark” any resources, java or test folders in each module folder (“Right click/Cmd+click, choose “Mark Directiry As”).
  2. Go to File > Project Structure, select Modules under Project Settings.
  3. Click the Copy icon (next to the + and – icons).
  4. In the Copy Module dialog that pops up, select the source folder for your module under “Module file location”, click OK.
  5. Open your Run Configuration screen. If “Use classpath of module” still only offers “no module”, back up any of your Run Config settings & options, then delete the old configuration and Add New Configuration (+ icon).



Note to Self: How to Copy, Clone, Duplicate a Multi-Module Maven Project in IntelliJ

I’ve tried this with IntelliJ Ultimate 2018.3 on Windows 10 and it worked.

1. Copy/duplicate original project folder inside /IdeaProjects/ via the OS file explorer (not IntelliJ).

2. Delete it’s workspace.xml file inside .idea folder.

3. Delete its .git folder (since you’re starting a new project, based off an existing one).

4. Open the project (do not Import) via IntelliJ

5. IntelliJ might complain about a missing Git directory. Go to File > Settings, Version Control – delete anything in red, like . Click Apply & Ok.

6. Double check your Project Structure panel, make sure Modules language level is set to appropriate values for your code.

Continue reading

Note to Self: Getting Apache Kafka Up & Running for Local Testing

This is a quick note on starting a single-broker Kafka 2.0.1 instance (Scala 2.11) on macOS, using Terminal. This is the standalone version (no Homebrew).

Terminal window 1

$ cd /Users/yourUsrName/pathToKafka/kafka_2.11-2.0.1
$ sh bin/zookeeper-server-start.sh config/zookeeper.properties

Terminal window 2

Optional: test zookeeper connection via telnet

$ telnet localhost 2181
$ stat

Move on to starting a Broker:

$ cd /Users/yourUsrName/pathToKafka/kafka_2.11-2.0.1
$ sh bin/kafka-server-start.sh config/server.properties

Terminal window 3

Create a Topic:

$ cd /Users/yourUsrName/pathToKafka/kafka_2.11-2.0.1
$ sh bin/kafka-topics.sh --create --topic my_topic_2 --zookeeper localhost:2181 --replication-factor 1 --partitions 1

For quicker local testing, I left the –partitions and –replication-factor set to 1.

See log files directory created here:

$ cd /tmp/kafka-logs/my_topic-0

See list of available Topics:

$ cd /Users/yourUsrName/pathToKafka/kafka_2.11-2.0.1
$ sh bin/kafka-topics.sh --list --zookeeper localhost:2181

Start a Producer

$ sh bin/kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic_2

Once you get a carrot prompt, try typing some messages:

> How is this thing doing? Is it on?  
> Anyone?

Terminal window 4

Start a Consumer.

$ cd /Users/yourUsrName/pathToKafka/kafka_2.11-2.0.1
$ sh bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic my_topic_2 --from-beginning

Once the Consumer’s running without errors, you should see the messages you sent via the Producer window showing up.

Apache Kafka Producer Error “zookeeper is not a recognized option”

As I’m brushing up on Apache Kafka_2.11_2.0.1 (Scala 11, Kafka 2.0.1) on macOS Mojave, I ran into this minor hick up while trying to spin up a command line Producer:

$ sh bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic my_topic --from-beginning
zookeeper is not a recognized option

Turns out they changed that option name from “–zookeeper localhost:2181” to “–bootstrap-server localhost:9092. The new command looks like so:

$sh bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic my_topic --from-beginning
Your message shows up here

Cross Domain Error on Localhost on Any Error in Google Apps Script

I noticed an odd-feeling error while playing with a frontend AJAX call from a localhost server that fetched data from a Google Sheet via a Google Apps Script middleware script.

Any time there was any kind of error in the Google Apps Script code. The JSON-P-based front end call was receiving this message (using the Chrome dev tools Console):

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://script.google.com/macros/s/-yourScriptID-/exec?action=rd with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.</code>

Technically, of course, it was a showing up as a CORS (Cross Domain Resource Sharing) or CORB (Cross Domain Read Blocking) error.

I bet the Google Apps Script error message automatically sends data back as HTML/Text and this is messing with the JSON-P callback, which is expecting the data type to be “javascript”.

Visiting VR Zone Shinjuku in Tokyo

I had a chance to visit in April, 2018 and loved my overall experience.

It was like Ghost In The Shell themed VR laser tag.

Japan. It’s been on my list of place to visit for years. Decades at this point. I finally got to this Spring. On this trip, I got to experience a Live Events tech space that I’ve only previously seen and worked with in the context of pop up shop style one offs for concerts, sports tournaments.

The Concept

If you’re in the US and you’ve heard of The Void. Perhaps, you’ve been there. I’m about to go check that out next week. VR Zone Shinjuku is a similar VR theme park. I got to play a 3 on 3 game of VR laser tag as a Ghost In The Shel themed operative whose mission is to take out “the terrorists” (the opposing team of 3 in our case).

The Tech

The staff at VR Zone Shinjuku were naturally fairly tightlipped about specifics of how everything works behind the scenes. No photos were allowed inside, past the entrance.

However, they headset was HTC Vive, coupled with what looked like custom VR tracker shin guards, a gauntlet and body sensor belt that allowed for full range of motion wireless tracking. The ceiling had a ton of what looked like infrared sensors, pointed in every possible direction.

Each player had an MSI VR ONE Backpack PC strapped to their back.

The Vive headset had custom wireless trackers mounted on top of it as well.

The Staff

These guys were very professional and on top of their game. I was very impressed. The team was highly knowledgeable on the complex gear up procedure and it seemed like everyone spoke at least 3 languages (Japanese, Mandarin and English). I deal with Brand Ambassadors at live events on a regular basis – the VR Zone Shinjuku staff were in my top 3 crews of all time.

Digital Signage Touchscreen Displays with a Mac Mini?

Use Case

First of all, why would you want to? Digital Signage isn’t always just a video playing in a loop, which can run off a built-in media player (like on a Samsung DM55E screen with MagicInfo S3 Digital Signage Software) or a BrightSign player with it’s overly convoluted content management system. Sometimes you have an HTML5 application that can run in Google Chrome as a full screen app, other times you have a complex Unity3D desktop app that also needs to run off more of a serious machine than a typical media player.

You’re certainly better off with a PC in this situation. Intel’s NUC and others now even allow the small form factor that Mac Mini used to rule.

Mac Minis weren’t originally designed for touchscreen displays, but what if you’re stuck with venue or client that has already purchased a Mac Mini and now you have to use that equipment because the budget’s been spent?

One option that works

Assuming there’s budget and you have some leeway in choice of touchscreens, rent an ELO touchscreen. Something like the 4202L 42″ Interactive Digital Signage. ELO does provide drivers for Mac that work with single touch (at least).

Note: ELO’s site provides drivers for lower versions of Mac OS / OS X and says “MAC OS X (10.12): Contact Tech Support for Max OSX 10.12”. Unofficially, their latest driver at the time – UPDD_05_01_1482.dmg – worked for me on Mac OS 10.12. Their tech support never got back to me, so keep that in mind.