Installing Omada Controller 3.2.4 on FreeBSD
I'm trying to install Omada Controller on FreeBSD (11 because eventually it will go on a PFSense router based of 2.4.4).
I've seen a few useful scripts like https://github.com/tinwhisker/tplink-eapcontroller-pfsense which provide a recipie for setting Omada up on a freeBSD type device, but they are a bit outdated.
The overall idea seems to remain the same tho - provide java and mongo db binaries which are compatible with your OS/architecture and run the Java controller.
The threads in this forum have also proven very handy. It also noted that the BSD package for the apache-commons-deamon (JSVC) may not be compatible.
So far I've installed the following freeBSD packages and their related dependancies
pkg install mongodb40-4.0.12_1
pkg install bash
pkg install apache-commons-daemon-1.2.2
As per the instructions from Java, I have added the following lines in /etc/fstab:
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
Then extracted the EAP controller from the tar.gz file and moved it into /opt/tplink/EAPController
Updated the jre directory to point to /usr/local/openjdk8/jre and bin/mongod to point to /usr/local/bin/mongod
Running bash control.sh start results in the following startup log:
:/opt/tplink/EAPController/logs # cat startup.log
java version "1.8.0_232"OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
commons daemon version "1.2.2"
commons daemon process (id: 1669, parent: 1668)
Going to init controller!
Going to start controller!
SLF4J: com.tp_link.eap.configuration.b
SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work as normally expected.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: com.tp_link.eap.util.o
Error: system is not linux, should not call this founction
Strange spelling there of the word function🙂
At this point, based on the info from the other thread
https://community.tp-link.com/en/business/forum/topic/166466
It suggests that JSVC needs to be rebuilt locally, I gave that a shot by adding a few more packages:
pkg install bash
pkg install gcc10-devel-10.0.0.s20191201
Then I manually built the jsvc from http://commons.apache.org/proper/commons-daemon/download_daemon.cgi with a bit of command line file pointing..
./configure --with-java=/usr/local/openjdk8/bin --with-os-type=../include/freebsd
Unfortunately I'm still seeing the same error, but with a different package:
/opt/tplink/EAPController/logs # cat startup.log
java version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
commons daemon version "1.2.2"
commons daemon process (id: 4963, parent: 4961)
Going to init controller!
Going to start controller!
Error: system is not linux, should not call this founction
SLF4J: com.tp_link.eap.util.m.a
SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work as normally expected.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
The error makes me wonder if there is some code trying to determine the os type, and perhaps it's getting freebsd back from the OS, like one would in uname:
uname -a
FreeBSD freebsd.myhome.home 11.3-STABLE FreeBSD 11.3-STABLE #0 r355869: Thu Dec 19 02:10:41 UTC 2019 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
If this is the case, and the check is part of the custom java controller software this could pose a challenge. Seems a bit strange tho, since people have run the older versions of omada on FreeBSD.
Any input would be appreciated! Thanks!