Mac Mini 502 Bad Gateway

Tags: #<Tag:0x00007f2fbacd81b0>

Mac mini
macOS Mojave
2.3GHz Intel Core i7

Thought I try to install OpenHAB on my Mac mini after running into grafana rendering issues on a RPI4

Seem to have succeeded with the terminal installation of Release Build 2.4.0, now with no errors after installing Zulu 8, but I still have 502 Bad Gateway ‘Invalid SOCKS version. Expected 0x05, got 0x47’ when trying to access openHAB through Safari.

Initially tried installing with Zulu 10, but I found the compatibility issues when looking through the forum for possible solutions.
Many thanks,
Ian

OpenHAB requires Java 8 so Zulu 8 should work.
Support for Java 11 is on the roadmap for OH 3. Version 1 bindings keep us on Java 8.
Perhaps some Java 10 pieces still there?
Try shutting down OH and deleting the cache files & folders. Next startup will be slow but it may resolve the issue.

Wow! Thanks for the quick reply.
I’m not a mac person, so can you point me to the files I need to delete. I’ve had a look in the openhab folder under users but it seems to be empty.
Ian

I am not familiar with OpenHAB on Mac either. I would also clear the browser cache.

After stopping OpenHAB, here is what is done on a typical Linux installation. Check to see if there are filed & folders in /var/lib/openhab2/cache & /var/lib/openhab2/tmp first.

sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*

Tried to have a look in those folders, but /var/lib/openhab2/ …‘no such file or directory’
The only folder in /var/lib/ is postfix.

Thanks again
Ian

I believe, the userdata folder is defined as an environment variable when logged in as the user that runs openhab. Try cd $OPENHAB_USERDATA. That should get you to where /var/lib/openhab2 is on Linux.

Still end up with no such file or directory…
Ian

Well I deleted the userdata folder, in fact I deleted all the files and completed several fresh installs but I still have the same problem where the openhab service is running in terminal, but I cannot access OpenHAB through Safari (502 Bad Gateway). I can however, access OpenHAB running on the raspberry pi from the Mac Mini with no problems.
There is no openhab2 folder in /var/lib/ that I can find.
Many thanks
Ian

On the mac mini I found the openhab cache and tmp folders to be at:sudo
/users//openhab/userdata .
Ian

Sorry too many keyboards…

On the mac mini I found the openhab cache and tmp folders to be at:
/users//openhab/userdata .
Ian

So as a last resort I uninstalled java and its cache, cleared the openhab cache and tmp files, reinstalled Zulu 8, reboted the mac, restarted openhab service in terminal and…no change, still error 502, even if I try to log in with ip address:8080 instead of localhost:8080, and the same result if I try to log in via another machine on the network. So running out of ideas here…
Ian