Installing Omada Controller 3.2.4 on FreeBSD
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!
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
@R1D2 thanks for the info, so it looks like there's at least a stop-gap measure in the interim. Hopefully TP-Link replies shortly about any future plans here.
- Copy Link
- Report Inappropriate Content
@emaste, in my opinion the split between Windows and Linux Java classes in Omada controller v3.0.2 was wrong and unnecessary. It even introduces double work for TP-Link's engineering to create distribution packages. Unfortunately, so far I couldn't convince engineering to revert those platform tests in the Java classes.
- Copy Link
- Report Inappropriate Content
Since about 5 minutes the latest Omada Controller is running locally on FreeBSD.
I followed the initial information mentioned by @elmado
After some bytecode editing (1 String) the set is working fine.
Best regards
- Copy Link
- Report Inappropriate Content
@chrisSLDS That's great! Could you post a little guide on how-to make that edit?
- Copy Link
- Report Inappropriate Content
First of all, download the package of Omada Controller you like (Linux of course). Then take the bytecode editor of you choice. I choose Recaf.
EAPController/bin: (Not necessary if always started manually)
If you want to use it as deamon you have to generate a rc file in /usr/local/etc/rc.d/
with nearly the same content as in control.sh
EAPController/lib:
Open 'eap-infrastructure-X.X.XX.jar' in Recaf. Navigate to classes->com->tp_link->eap->util->m->a. Somewhere there is a function defined as 'public static boolean c()'
In this method, the check if the system is linux.
BTW: The correct check should be "freebsd" || "nux".
But here is only "linux" ... this should be changed for freebsd usage to 'freebsd'
( Right click on method definition -> Edit with assembler => EDIT => [Ctrl] + [S] )
File -> Export ... Save as same filename
EAPController/lib:
mongodb.properties:
change line to : eap.linux.mongod="/usr/local/bin/mongod"
change line to : eap.linux.mongo="/usr/local/bin/mongo"
I think thats all
- Copy Link
- Report Inappropriate Content
@chrisSLDS I've done the bytecode edits and properties file changes -- no problems with that, but I can't seem to get the service to startup. I'm not seeing the architecture errors, but it keeps failing saying that it can't start mongo DB server.
in the server.log:
"[main] [WARN]-[SourceFile:78] - com.tp_link.eap.start.a.a: Fail to start mongo DB server"
I tried several of the different versions of mongodb on freebsd pkg (mongodb36, mongodb40, mongodb44), but no luck.
I noticed one suspicious warning in the mongodb.log:
"W ASIO [initandlisten] No TransportLayer configured during NetworkInterface startup"
But there's no specific file or directory permission error associated with it, so it's unclear if that's an issue.
Also, I did not build the apache-commons-daemon from source -- just installed it from pkg. I'm on FreeBSD 12.2
Attaching the configs and log files here in case it's something you've edited in your setup?
- Copy Link
- Report Inappropriate Content
Hello there
I was unable to run freebsd omada
I need help
i need installation instruction?
- Copy Link
- Report Inappropriate Content
Information
Helpful: 0
Views: 9011
Replies: 17
Voters 0
No one has voted for it yet.