✶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
LucianoR, thanks for your feedback! Good to know that OC runs with OpenJDK 8 on the Pi.
- Copy Link
- Report Inappropriate Content
Update notification for new version of Omada Controller 3.2.4
- Copy Link
- Report Inappropriate Content
@R1D2 Installed the 3.2.4 version my Raspberry Pi 4 per instructions.
Since I had previously installed using the .tar.gz I had errors copying the DB using omadactl so I had to rename the installation directory:
sudo mv EAPController OmadaController-3.2.1
And I was unable to find the omadad on the SystemV initilization units, just the old tpeap:
pi@raspberrypi:/opt/tplink $ sudo systemctl list-units | grep omada
pi@raspberrypi:/opt/tplink $ sudo systemctl list-units | grep tpeap
● tpeap.service not-found active exited tpeap.service
So my guess there is none installed?
- Copy Link
- Report Inappropriate Content
@LucianoR, if you had installed the official version manually (that's done with the install.sh shell script in the TAR version), you should disable its start/stop script tpeap at least and rename the /opt/tplink/OmadaController directory before installing a .deb package (the same applies also to the official .deb package). Remember to back up the old version's database as described in the installation instructions.
If mixing the official version – either the TAR or .deb version – with the community version, you will always end up with two versions. Don't do this, even not with any other software package!
BTW: there is a typo in your systemctl command: The start/stop script of the community version is omadad, not omada (note the 'd' at the end, it stands for 'daemon' and corresponds to Linux best practice).
Try the following:
- Make sure that /opt/tplink/OmadaController is a symlink to /opt/tplink/OmadaController-3.2.4.
- Disable the old tpeap service with systemctl. It was manually installed with the TAR version.
- Enable the omadad service of the community version with systemctl to have the controller start automatically on reboot.
Rule of thumb: never install different versions at the same time. The TAR version is for x86 architectures only, the RasPi has an ARM architecture. So, the TAR version is incompatible with other architectures such as the RasPi's ARM CPU (that's why the architecture-independent community version of the controller exists at all).
Hope this helps. If not, consider removal of both versions and re-install the community version again. Make sure you have a backup of the old settings (either a copy of the database under /opt/tplink/OmadaController/data or a backup file created through the Omada Controller's web UI)!
- Copy Link
- Report Inappropriate Content
@R1D2 yeah, I was able to remove the old version and install the new one, and migrate my site data without a problem. I used 'omada' just as a substring while using grep - no mistake there.
However, I don't understand why I need to rename the /opt/tplink/EAPController to OmadaController before using dpkg? I looked at the 'postinst' and 'preinst' scripts and they support the EAPController folder removal. So I guess that step is optional?
Thanks
- Copy Link
- Report Inappropriate Content
Hi LucianoR,
yes, you're right. It was caused when Auranet EAP Controller was renamed to Omada Controller.
I did not follow whether the official version still uses EAPController as the name for the directory or changed it, but community version switched very early to the name OmadaController. Thus, the step is optional.
One reason why official and community version were incompatible (at the time they did share the name EAPController) is that official version places files always into the same directory, thus making it impossible to deploy more than one controller version. Community version (early TAR variants) was able to install several co-existing versions of the controller by using a versioned directory pointed to by the symlink EAPController, so you could switch back and forth between controller versions anytime. Now, official .deb packages remove older versions, but the naming scheme with a symlink and a version-related directory name still remains, since it has the nice side-effect of preserving old databases when installing a new controller version.
People nowadays prefer to have a .deb package rather then the TAR format choosen originally, but you could also preserve the top-level directory for an older controller version manually (either by copying its directory content or by renaming the directory) when installing a new version. This way you can use the omadactl switch command to choose the active controller version and this is controlled with the symlink pointing to the actual OmadaController-x.y.z (or even the older EAPController-x.y.z) directory.
Thus, a downgrade of Omada Controller community version is possible as long as you have the old database and remaining files. That's not true for the official version: downgrade might not be possible once the database got converted to a new version according to their release notes – on Linux it indeed is possible as you and me know :-)
For example, this is from my server:
$ omadactl -l version
Currently installed versions:
EAP Controller 2.7.0
EAP Controller 3.0.2
Omada Controller 3.0.2
Omada Controller 3.0.4
Omada Controller 3.0.5
Omada Controller 3.1.13
Omada Controller 3.2.1
Omada Controller 3.2.4 (current)
$
- Copy Link
- Report Inappropriate Content
First off, I wanted to thank you for publishing this thread. The amount of detail provided is very helpful when trying to get this working. And understanding what's going on under the hood.
I am trying to setup Omada Controller 3.2.4 on FreeBSD, which is different enough from Linux that most approaches don't seem to work.
I'll start another thread for that, but for now I will mention that using dpkg on FreeBSD 11 doesn't seem to work with the community package. Probably because the typical directories in Linux are not present on FreeBSD.
Errors like this will show:
dpkg -i omada-controller_3.2.4-1_all.deb
dpkg: error: failed to open package info file '/var/db/dpkg/status' for reading: No such file or directory
This is more likely due to a dpkg issue. Touching that file yeilds:
dpkg -i omada-controller_3.2.4-1_all.deb
Selecting previously unselected package omada-controller.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack omada-controller_3.2.4-1_all.deb ...
.: cannot open /usr/share/debconf/confmodule: No such file or directory
dpkg: error processing archive omada-controller_3.2.4-1_all.deb (--install):
new omada-controller package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
omada-controller_3.2.4-1_all.deb
I'm not an FreeBSD or Linux expert, and even less familiar with the deb process, so I will try to pursue a manual installation of java controller using locally built JSVC and other freeBSD packages.
I just wanted to note the comments in this thread have been helpful for this. Cheers.
- Copy Link
- Report Inappropriate Content
Hi @elmado,
thanks for your remarks. It's been a very long time since I used BSD Unix and I had no change to follow its evolution since then. But setting up Omada Controller is very easy if packages for JRE, jsvc, mongod, netstat and curl are available already. Omada Controller itself can be installed everywhere in the directory tree (/opt/tplink is just a conventional place, no other dependencies exist), so starting with TP-Link's TAR archive (not my deb-Package for Linux) would be the best way.
You just have to correct the file permissions of Omada Controller to make Privilege Separation work correctly (the file permissions are still pretty much wrong in the official TP-Link package). If it helps, I could send you a directory listing where you can see the correct permissions or even send you a TAR archive with Omada Controller you just would have to unpack. But you should make sure to have JRE and the utilities mentioned above working before trying to install Omada Controller.
- Copy Link
- Report Inappropriate Content
Thanks, I would be happy to check out the permissions to see if they are incorrect on my install.
I think I got most of the required packages (I can run netstat, curl, mongo, jsvc and java). But am running into errors trying to start the controller. I've posted the details in this thread.
Regards
- Copy Link
- Report Inappropriate Content
Update notification for new version of Omada Controller 3.2.6
- Copy Link
- Report Inappropriate Content
Information
Helpful: 11
Views: 77877
Replies: 168