✶Update 09/2020✶ Omada Controller 3.2.10 for Debian, Raspbian and other Linux systems
Looking for Omada SDN Controller Linux version? It's here.
Last Update: 2020-09-07
[Update: To allow for version switching between different versions of the controller, V3.2.10 received an upgrade. You can install it over an existing V3.2.10 without losing data.]
I just made a .deb package with Omada Controller 3.2.10 for Debian, Raspbian and any other Linux system providing the dpkg installer. Please find the release notes at the end of this post.
This .deb package is in the tradition of the community version of Omada Controller, meaning it contains the same Java classes and remaining files as the official TP-Link version except for the binaries bundled with it (JRE, mongodb) and the start/stop script control.sh (which is replaced by my own version omadactl).
Prerequisites
You will need netstat (package: net-tools), curl and the native versions of JRE, jsvc and mongod (installed by default in Raspbian based on Stretch, unfortunately not so in Debian). Setting up the Oracle JRE and jsvc is left to you as an exercise; here are some suggestions:
Debian and any other Linux distribution:
Install mongodb from the standard repository and JRE8 from Oracle's website. As for jsvc, don't use the Debian binary package, it requires OpenJDK last time I checked this. Instead, get the source code for jsvc (command apt-get source jsvc), compile it and install jsvc manually. Sorry for this inconvenience, but TP-Link decided to use jsvc for Privilege Separation rather than the much more common standard start-stop-daemon or daemonize programs already present on almost any Linux system. Don't blame me for this – omadactl still can use both methods, but you need to use jsvc for Omada Controller versions V3.x.
Raspbian (see also »Limitations« below):
Oracle JRE8, jsvc and mongodb are pre-installed by default in Raspbian (make sure you did not explicitly choose OpenJDK as an alternative for the Oracle JRE). You can easily check whether the required programs are installed on your Raspbian:
$ java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
$ update-java-alternatives -l
jdk-8-oracle-arm32-vfp-hflt 318 /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
$ mongod -version
db version v2.4.14
Thu Apr 30 12:49:28.060 git version: nogitversion
$
Donwload the all-architectures .deb package
Download https://rent-a-guru.de/ftp/omada-controller_3.2.10-3_all.deb
Compare the checksum of the downloaded .deb file for integrity:
$ md5sum -b omada-controller_3.2.10-3_all.deb
6b986ee67828d4c1e55d8dc6af1e8cbc *omada-controller_3.2.10-3_all.deb
or:
$ sha256sum -b omada-controller_3.2.10-3_all.deb
ef77aa88a3196d7663f35e59357a67833b86fa783923df480f56318ea84e5de2 *omada-controller_3.2.10-3_all.deb
Installation
First, make a backup of your Omada Controller's settings before installing. Either use the web UI or copy the whole content of the subdirectory data in /opt/tplink/OmadaController to a backup directory. You can later move the data directory back into the new controller version.
Install the new version of Omada Controller with:
dpkg -i omada-controller_3.2.10-3_all.deb
After a successful installation the controller will be started automatically.
Notes:
- Ignore the warnings from dpkg about some directories which can't be deleted. dpkg will remove files from older versions of the same package omada-controller, but it won't delete the old database directory (unless you do a manual purge before installing). This means that your database and settings from previous versions of Omada Controller will be retained - you can copy the files in the data subdirectory over to the new version. See »Restoring Omada Controller settings« below.
- Installation directory is /opt/tplink/OmadaController-3.2.10. The symlink /opt/tplink/OmadaController is a short-hand alias to the installation directory.
- Start/stop script has been renamed from tpeap to omadactl (
deprecatedtpeap is still there, it's a symlink to omadactl).
Update: tpeap has been finally removed.
If installing using dpkg, you won't be able to switch between versions of Omada Controller using omadactl's switch command.
Update: The current release of V3.2.10 now allows to switch between this and any newer controller versions.
- Some options of omadactl have no effect with only one version of the controller installed, that is if you install the .deb-Package. dpkg will override the old version before installing the new one. However, since the installation directoy reflects the version (intentionally!), you find all settings in the data subdirectory of the old version's installation directory. See »Restoring Omada Controller settings« below.
- On my RasPi the start of the controller needs ~69 seconds (first time start: ~124 seconds). You might want to increase the standard time-out (70 sec.) for starting the controller if it needs more time on your RasPi (time depends on other active processes during the start). To change the default time-out, use omadactl -S num, where num is the new time-out in seconds. This command will store the new time-out permanently in omadactl's config file and exits immediately (without starting Omada Controller).
Restoring Omada Controller settings
There is an easy way to restore your controller's settings using omadactl. Let's say you want to update Omada Controller 3.2.9 to 3.2.10. The directory OmadaController-3.2.9 will be cleaned by dpkg before it installs the new version in a new directory OmadaController-3.2.10. However, user files will be retained (dpkg prints warnings about which directories are not removed). Now stop the new controller using omadactl and use omadactl with the copydb command:
omadactl -w stop
omadactl copydb OmadaController-3.2.9 OmadaController-3.2.10
This will copy all settings under the data subdirectory from the old version to the new version. Restart the controller and you will see all your EAPs, settings, maps etc. If everything works, you can safely remove the old directory using rm -rf OmadaController-3.2.9.
Limitations
Keep in mind that under Rasbian, which still is a 32-bit OS for compatibility with older Pis, mongodb has a 2GB limit for the size of the database. You could compile a 64-bit kernel / userland programs to get rid of this limit.
If Omada Controller doesn't start automatically on reboot of the RasPi, check with systemctl whether the omadad.service is enabled.
Omada Controller on RasPi is slooooooow, especially if initializing the environment at the first start. Start it with omadactl -W 240, note the time it needs to start (omadactl will print a message) and set the time + a 10 seconds reserve using omadactl -S num, where num is the new time-out in seconds (see the manpage).
More information
For help with omadactl see its manpage attached to this post or use the command: man omadactl2
For customization of omadactl see the config file /etc/default/omada.
Update: has been merged into file CONFIG in /opt/tplink/OmadaController.
For selection of the correct JRE see file CONFIG in /opt/tplink/OmadaController.
For a list of all files installed by the .deb package use the command: dpkg -L omada-controller
If you want to uninstall this .deb package (except the database and other files created at run-time), use the »remove« option of dpkg: dpkg -r omada-controller
If you want to uninstall this .deb package (including the database and other files created at run-time), use the »purge« option of dpkg: dpkg -P omada-controller
Release notes for omadactl version 3.0 in package 3.2.10-3
Bugs fixed:
- Fixed non-working verbose option (-v) in omadactl.
New features:
- Changed version dependencies for mongodb: The controller needs either mongodb v2.4 or mongodb-org v3.2.
Release notes for omadactl version 3.0 in package 3.2.10-2
Bugs fixed:
- Fixed a bug in the DEBIAN/control file.
New features:
- Updated omadactl and omadad to version 3.0. The files are no longer installed in /usr/bin and /etc/init.d, but are included in Omada Controller's home dir. The installer adds symlinks for those commands in /usr/bin and /etc/init.d.
- Enabled support in omadactl for switching between controller versions when more than one Omada Controller is installed.
- Merged /etc/default/omadad and /opt/tplink/OmadaController/CONFIG.
Release notes for Omada controller version 3.2.10-1
Bugs fixed by TP-Link:
- Fixed the bug that Omada Controller allow any user to read the files of controller.
- Fixed the bug that controller will report an error when Top Usage data is empty.
Have fun!
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
I have it both running and tested on Jessie and Buster. In fact it really doesnt matter as long you have the same architecture armhf and docker running.
- Copy Link
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
Hi thanx for the posts sofar.
Since I have never used docker and a learning noob in command line skills, I have some additional questions:
- If the docker container runs under root user, does that mean the Pi always needs to boot up as root user?
I ask this because by default it boots up as user Pi in the home/pi directory and command line functions have to be executed with sudo
2. The start-up script you shared:
- Does it matter in which directory this script is located?
- How can I make it bootable?
- This sounds maybe stupid...where can I download the "3.2.10-1-lomem" docker image?
and where should it be stored? or is this handled by the script?
#version=latest
version=3.2.10-1-lomem
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
docker rm omada-controller
omadadata="/opt/tplink/$version/OmadaController/data"
omadawork="/opt/tplink/$version/OmadaController/work"
omadalogs="/opt/tplink/$version/OmadaController/logs"
mkdir -p $omadadata
mkdir -p $omadawork
mkdir -p $omadalogs
docker run -d \
--name omada-controller \
--network host \
--memory 900m \
-e TZ=Europe/Amsterdam \
-e SMALL_FILES=true \
-p 8088:8088 -p 8043:8043 -p 27001:27001/udp -p 27002:27002 -p 29810:29810/udp -p 29811:29811 -p 29812:29812 -p 29813:29813 \
-v $omadadata:/opt/tplink/OmadaController/data -v $omadawork:/opt/tplink/OmadaController/work -v $omadalogs:/opt/tplink/OmadaController/logs \
ronaldo1965/omada-controller:$version
- Copy Link
- Report Inappropriate Content
Hy,
thanks for your work.
I've got a big problem - the .deb packet has an Error:
"dpkg-deb: Datei könnte ein Archiv sein, das durch
einen Download im ASCII-Modus beschädigt wurde
dpkg-deb: Fehler: »omada-controller_3.2.10-1_all.deb« ist kein Archiv im Debian-Format
dpkg: Fehler beim Bearbeiten des Archivs omada-controller_3.2.10-1_all.deb (--install):
»dpkg-deb --control«-Unterprozess gab den Fehlerwert 2 zurück
Fehler traten auf beim Bearbeiten von:
omada-controller_3.2.10-1_all.deb"
translated: the archive ist damaged - i also get another checksum md5 and sha by downloading vie ftp like told.
I've done the Download twice - same problem.
Thanks for your help.
Bigjames122
- Copy Link
- Report Inappropriate Content
@BigJames122, try binary mode in your client. You or your client did select text mode – that's wrong for files of this type.
The server sets binary mode by default, just don't change it or use the FTP command bin:
$ ftp ftp.rent-a-guru.de
220 ftp.rent-a-guru.de FTP server ready.
Name (ftp.rent-a-guru.de:r1d2): ftp
331 Anonymous login ok, send your complete email address as your password.
Password: mail@address
[...]
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I
ftp> cd private
250 CWD command successful
ftp> get omada-controller_3.2.10-1_all.deb
ftp> quit
221- You have transferred 1 files.
$ md5sum -b omada-controller_3.2.10-1_all.deb
60c070dbd74aa46d1999ebada8942f20 *omada-controller_3.2.10-1_all.deb
$ sha256sum -b omada-controller_3.2.10-1_all.deb
9b0e5da56e3d8ec0cd975da7009fe2b87962a6a3992b95bc0d32b39e334a7bc9 *omada-controller_3.2.10-1_all.deb
$
- Copy Link
- Report Inappropriate Content
Thanks a lot - that solved my problem.
Only the known problem of Java left - but i only fount about Java-8
pi@raspberry:~ $ sudo omadactl status
Omada Controller is not running
pi@raspberry:~ $ sudo omadactl start
Starting Omada Controller
Cannot find any VM in Java Home /usr/lib/jvm/java-11-openjdk-armhf
pi@raspberry:~ $ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Raspbian-3deb10u1)
OpenJDK Server VM (build 11.0.7+10-post-Raspbian-3deb10u1, mixed mode)
I've already set "ln -s java-11-openjdk-armhf default-java" like i found in other tutorials - doesn't work
Would be pleasent if you have a hint.
Thanks a lot (in the name of the non-profit-Organisation imt trying it for)
Bigjames122
- Copy Link
- Report Inappropriate Content
BigJames122 wrote
pi@raspberry:~ $ sudo omadactl start
Starting Omada Controller
Cannot find any VM in Java Home /usr/lib/jvm/java-11-openjdk-armhf
pi@raspberry:~ $
You have OpenJDK installed. I have different reports about compatibility of OpenJDK with Omada Controller and it's not recommended to use it if the controller refuses to start with this JDK active.
Please install Oracle JDK or JRE as described in my post #1. To install, use:
$ sudo -i
# apt-get update
# apt-get install oracle-java8-jdk jsvc
# update-java-alternatives --list
jdk-8-oracle-arm32-vfp-hflt 318 /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
# ^D
$
I've already set "ln -s java-11-openjdk-armhf default-java" like i found in other tutorials - doesn't work
Never mess manually with the alternatives system. Don't follow tutorials suggesting to do so.
Use only the updata-java-alternatives command to create, remove, select a Java alternative or list all installed alternatives with option --list as shown above. See the manpage for other options to this command.
- Copy Link
- Report Inappropriate Content
@Anjerlaan You can pull it via docker pull ronaldo1965/omada-controller:3.2.10-1-lomem or directly run. Its getting pulled then too.
- Copy Link
- Report Inappropriate Content
@ R1D2 hello.congratulations great job. a question:
which version of raspbian do you recommend? Do I have raspbian 9 Jessie?
- Copy Link
- Report Inappropriate Content
Ferse wrote
which version of raspbian do you recommend?
Hi @Ferse, it should work with any version as long as you can get Oracle JRE and mongodb. As a last resort you can download JRE from Oracle's web site (I do this every time when deploying the controller, currently I'm using jre1.8.0_251) and for mongodb one could compile it using the sources if it's missing.
Under Jessie it should run out of the box. Under Stretch could be that you need to install JRE from a backport repository or from Oracle's website. Omada Controller has been tested under Debian (not Raspbian) Jessie and Stretch, but recently I changed my server's operating systems to systemd-free Devuan and thus will be able to test further versions only on Devuan.
- Copy Link
- Report Inappropriate Content
Information
Helpful: 11
Views: 78462
Replies: 168