Omada Controller 3.0.2 for Linux (including new tpeap v1.4)

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
123...

Omada Controller 3.0.2 for Linux (including new tpeap v1.4)

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Omada Controller 3.0.2 for Linux (including new tpeap v1.4)
Omada Controller 3.0.2 for Linux (including new tpeap v1.4)
2018-08-21 05:31:23 - last edited 2021-01-21 08:35:15

Update 2020-04-30: Omada EAP Controller 3.2.10 community version has just been released.

There is now a .deb-package available for easy installation on Debian, Raspbian and any other Debian-based Linux. The steps below are not necessary anymore for the installation of Omada Controller using the dpkg package manager.

 

The following (now obsolete) post is still here for reference only:

 

Hello world!

 

TP-Link just released the latest version of Omada Controller 3.0.2. Thanks to a tip from forum user humor_amarillo I got my hands on it early. So here it is, baked in just no time: The community version of

 

Omada EAP Controller 3.0.2 for Linux

Last update: 2018-08-28 22:40

 

What's new in this version?

  • Cloud support. See the official release notes on the TP-Link website.
  • Auto-backup, but the Windows-way. See below for the Linux-way to do backups.
  • From what I saw so far, the directory structure has been cleaned up. Photoshop file with icons from v2.7.0 has been removed from the images directory. 
  • GUI now seems much more cleaner, too. Well done, TP-Link!
  • EAP Controller starts ~30% faster compared with v2.7.0.
  • All steps in the initial wizard now can be skipped! Finally my feature request was honored, thanks to R&D very much!

 

What's new in the Linux release?

  • Logo now shows »Community version« below the TP-Link logo, so you can recognize it better.
  • Two new options for tpeap:
  1. dump lets you dump the database as well as the maps and keystores.
  2. restore lets you restore a database dump including maps and previous keystores.
  • A surprise (see below).

 

Update #1: New tpeap 1.4 has been released (see this post for more details).

For your convenience, I have attached the new tpeap script v1.4 to this posting, too. It might be handy for doing a backup of your v2.7.0 installation, which can be easily restored in EAP Controller 3.0.2.

 

Update #2: The tpeap 1.4 just has been added to the TAR archive with Omada Controller 3.0.2. If you download the TAR archive as described below, you will get the new tpeap script already - no need to install it twice.

 

Standard disclaimer, as usual: Use at your own risk.

This community version (cv for short) is neither released nor supported by TP-Link and it still needs some testing.

 

 

Installation of the Linux version

 

— If you want to install the Linux version for the first time, please see this post first, replace the instructions in step 2 there with the instructions in the same step 2 in this post below and proceed with the remaining steps here when you have installed all the pre-requisites (eapc role account, Java JRE, mongodb database).

 

— If you already have installed Omada EAP Controller 2.7.0cv on your Linux system, just read on.

 

 

Step 1: Make a backup

Obviously, to make a backup, the old EAP Controller needs to be running. Download the tpeap script attached to this posting and install it (you can safely overwrite the old tpeap version in the 2.7.0cv Controller):

 

        cp tpeap /opt/tplink/EAPController/bin/

 

Next, create a backup. You need to specify a directory for the database dump (else it uses the directory EAPC_HOME/backup):

 

        tpeap dump /tmp/backup

 

tpeap will create the directory, copy your maps and keystore to it, and then execute mongodump, which dumps the database in binary BSON format into the backup archive. Now you can safely stop the EAP Controller.

 

 

Step 2: Download and extract the software

Download the TAR archive from https://rent-a-guru.de/ftp/eapc-3.0.2.tar.gz

 

Check the SHA256 sum:

 

        $ sha256sum -b eapc-3.0.2.tar.gz 
        2b9c9ce54a3bc698b25901f1234aef79e3d1e51703a9af1dcaa8360c4b407f66 *eapc-3.0.2.tar.gz

        9638bb2ed43d58169a33b52ea2be1d48482fae68a5d93028f162ff66f2b0c4ea *eapc-3.0.2.tar.gz

        $

 

 

Step 3: Set up the EAP Controller

Installation is straight-forward: Extract the TAR archive as root in /opt/tplink, remove the symlink EAPController pointing to version 2.7.0cv and create a new one pointing to the EAPController-3.0.2 directory just extracted from the TAR archive. Easy, isn't it?

 

        cd /opt/tplink

        tar xvzf /your-download-dir/eapc-3.0.2.tar.gz

        rm EAPController

        ln -s EAPController-3.0.2 EAPController

 

Do a quick check wether the permissions and ownership has been set correctly (complete dialog shown here):

 

        # ls -ld /opt/tplink/EAPController-3.0.2

        drwxr-xr-x 13 eapc eapc 4096 Aug 21 05:53 /opt/tplink/EAPController-3.0.2

        # ls -l /opt/tplink/EAPController-3.0.2

        total 12
        drwxr-xr-x 2 root root    6 Aug 21 05:27 backup
        drwxr-xr-x 2 root root   55 Aug 21 02:11 bin
        drwxr-xr-x 6 eapc eapc   55 Aug 21 05:53 data

        drwxr-x--- 2 root eapc   39 Aug 21 01:30 keystore
        drwxr-xr-x 2 root root 4096 Aug 21 01:30 lib
        drwxr-xr-x 2 eapc eapc   58 Aug 21 05:53 logs
        drwxr-xr-x 2 root root   22 Aug 21 03:18 man
        drwxr-x--- 2 root eapc 4096 Aug 21 01:30 properties
        drwxr-xr-x 2 root root   36 Aug 21 05:36 webapps
        drwxr-xr-x 3 eapc eapc   32 Aug 21 05:53 work

        #

 

Two more things: Install the symlink to the Java JRE:

 

        cd /opt/tplink/EAPController

        ln -s /where-your-JRE-lives/ jre

 

and the manpage of tpeap (you find it in the man subdirectory):

 

        cp man/tpeap.man /usr/share/man/man8/tpeap.8

        gzip -v --best /usr/share/man/man8/tpeap.8

 

My JRE resides under /opt/jvm, so it looks like this:

 

        # ls -l jre

        lrwxrwxrwx 1 root root 21 Aug 21 05:53 jre -> /opt/jvm/jre1.8.0_181

 

 

Important note for users of Ubuntu and probably other distros, too:

If your mongodb version is >= 3.6 you need to edit the argument list EAPC uses to start the mongod daemon. The option --nohttpinterface, which is set by EAPC, has been removed in mongodb version 3.6 and newer.

 

Find out your mongod version:

 

        mongod --version

 

To get rid of the --nohttpinterface option, you will have to delete it from the file mongodb.properties:

 

        cd /opt/tplink/EAPController/properties

        cp mongod.properties ../mongod.properties.ORIG

        sed -i 's/^\(eap.mongod.args=.*\) --nohttpinterface \(.*\)$/\1 \2/' mongodb.properties

 

Of course, you can use any other editor, too. 

 

 

Last step: fire up the new Controller

 

        tpeap -w start

 

Now restore the database saved in step 1:

 

        tpeap restore /tmp/backup


Enjoy!

 

 

Uh, and if you want to see what probably comes next to a Linux server near you:

 

The color-intense theme awesome with FontAwesome icons - no more image files needed, clean layout for EAPC 2.7.0cv. 

 

 

 

 

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  8      
  8      
#1
Options
109 Reply
Re:Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 10:46:58 - last edited 2019-03-06 01:55:43

How can we make fresh install on esxi (ubuntu 16.04 or 18.01) ?

 

p.s.for newbies instuctions please... tplink not support linux install since 2.5.3 anymore?

  1  
  1  
#2
Options
Re:Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 13:57:47 - last edited 2019-03-06 01:55:43

I was searching all days yesterday for this update...and now... our lord and saviour published the solution! :)

 

I tried to install is from scratch as I had previous installation following: https://medium.com/@arthurgay/eap-controller-software-on-a-raspberry-pi-9e93ecd1672e

But I had the 2.5.3 installed.

I completly removed that and redo the installation according your guidelines.

 

So I followed your instructions for 2.7.0 but with the addiditon to 3.0.2 now, and I can't get tpeap to start. The error during start is:

The file '/opt/jvm/jre1.8.0_181/bin/java' belongs to no guest image and there is no default guest image.

 

I believe I must have done something wrong with the java step but not sure why as I'm (pretty) confident I did what you mentioned to do. any ideas? 

 

update:

been trying to resolve it but made it worse :) 

/usr/bin/java -version
bash: /usr/bin/java: cannot execute binary file: Exec format error
 

 the symlink is available ... no idea what I'm doing wrong here

  0  
  0  
#3
Options
Re:Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 17:05:21 - last edited 2019-03-06 01:55:43

@R1D2 Thank to you for your great job!!!  TP-Link should inform local branchs (like TP-Link germany ) of these important updates. I always search last updates in www.tp-link.com/en

 

I don't have much knowledge about Linux but I am thinking in test with AMD APU: https://www.pcengines.ch/apu2.htm

 

@Jonas_TP-Link Is it planned by HQ to develope Linux version of Omada Controller? It has no sense that R1D2 can make it and RD no.

 

If I test I will post the results.

  0  
  0  
#4
Options
Re: Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 18:21:34 - last edited 2019-03-06 01:55:43

BillyVan wrote

How can we make fresh install on esxi (ubuntu 16.04 or 18.01) ?

 

Hi BillyVan,

 

that's pretty easy, just follow the steps in this recipe showing installation of v2.7.0, but download the new TAR archive v3.0.2 instead.

 

In short:

 

  • Set up a role account (user »eapc«) first (step 1).
  • Then download the TAR archive from this post here (step 2).
  • Then extract the TAR file, install it in /opt/tplink, install Oracle's Java JRE and the mongodb package (remaining steps in the post linked above).

 

The important point is to first execute the command in step 1 of the recipe linked above in order to get right file ownership if you extract the TAR archive. All other steps can be issued in almost any order then.

 

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  1  
  1  
#5
Options
Re:Re:Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 18:24:48 - last edited 2019-03-06 01:55:43

WoDkaBE wrote

I believe I must have done something wrong with the java step but not sure why as I'm (pretty) confident I did what you mentioned to do. any ideas? 

 

update:

been trying to resolve it but made it worse :) 

/usr/bin/java -version
bash: /usr/bin/java: cannot execute binary file: Exec format error

 

Exec format error meas that the JRE downloaded is for another CPU architecture. What CPU architecture do you have and what did you download from Oracle?

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  0  
  0  
#6
Options
Re: Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 18:29:40 - last edited 2019-03-06 01:55:43

humor_amarillo wrote

@R1D2 Thank to you for your great job!!!  TP-Link should inform local branchs (like TP-Link germany ) of these important updates. I always search last updates in www.tp-link.com/en

 

You're welcome. TP-Link Germany always is kept informed by me, they know first-hand if a new Linux port came out.

 

I don't have much knowledge about Linux but I am thinking in test with AMD APU: https://www.pcengines.ch/apu2.htm

 

I tested EAP Controller 2.6.1 and 2.7.0 on PC Engines APU1D4, APU2C4 and even ALIX 2d13 already.

Runs fine, albeit a bit slow, much like on the Raspberry Pi 3 ARMv7 platform.

 

As for TP-Link's R&D, they already got my tpeap script by mail in June 2017, when EAP Controller v2.4.7 came out.

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  1  
  1  
#7
Options
Re:Re:Re:Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 20:45:59 - last edited 2019-03-06 01:55:43

R1D2 wrote

WoDkaBE wrote

I believe I must have done something wrong with the java step but not sure why as I'm (pretty) confident I did what you mentioned to do. any ideas? 

 

update:

been trying to resolve it but made it worse :) 

/usr/bin/java -version
bash: /usr/bin/java: cannot execute binary file: Exec format error

 

Exec format error meas that the JRE downloaded is for another CPU architecture. What CPU architecture do you have and what did you download from Oracle?

It's on Raspberry pi 3. It worked before with older version of the controller for Linux. I guess  I broke it with using the wrong version following your guidelines.

It's fixed now with setting the alternative values back.

 

pi@MyRaspberrypi:~ $ /usr/bin/java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
pi@MyRaspberrypi:~ $ sudo tpeap -w start
[....] Starting Omada EAP Controller:.................................................................[FAIL. failed!
Start failed - see '/opt/tplink/EAPController/logs/server.log' for errors.

 

But it still doesn't start.----Edited logs out

 

 

  0  
  0  
#8
Options
Re: Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 21:47:55 - last edited 2019-03-06 01:55:43

I guess I break it with using now an the incorrect version of Java? I used the one in your guidelines. Is there another one I better use for the Rasberry pi?

 

On the RasPi you don't need to install Java, Raspbian already comes with Java installed (current version 1.8.0_65).

Thus, there are even no special steps required on Raspbian compared to us poor Debian users, who got no Java pre-installed. 

 

 

So, here comes the recipe for you, just executed on my RasPi:

 

Step 0: Stop mongod and the EAP Controller if it is running (issue the command ps -eaf | grep java to find it, kill it).

 

Step 1: Create the role account (user) »eapc« if you have not done so already:

 

        sudo adduser --system --disabled-login --group --no-create-home \

                --home /opt/tplink/EAPController \

                --gecos "EAPC privilege separation" \

                --shell /bin/false eapc

 

Step 2: Extract the TAR archive in the home directory of EAP Controller.

Important: do this step only after you did create the »eapc« role account, else file ownerships will be wrong!

 

Here is the complete dialog:

 

pi@raspberrypi:/opt/tplink $ sudo bash            <- get rid of this "sudo" mess
root@raspberrypi:/opt/tplink# PS1="# "            <- set a useful prompt

# cd /opt/tplink                                  <- change into EAP Controller home

# tar xvzf ~pi/eapc-3.0.2.tar.gz                  <- extract the files from the archive
EAPController-3.0.2/
EAPController-3.0.2/data/
EAPController-3.0.2/data/autobackup/
EAPController-3.0.2/data/db/
EAPController-3.0.2/data/db/journal/

 

[more output deleted]

 

The directory should look now similar to this (note directory/file ownership!):

 

# ls -l
total 28
drwxr-xr-x 12 eapc eapc 4096 Aug 21 03:50 EAPController-3.0.2

# ls -l EAPController-3.0.2

total 40
drwxr-xr-x 2 root root 4096 Aug 21 00:11 bin
drwxr-xr-x 6 eapc eapc 4096 Aug 21 21:11 data        
<- check file ownership, must be eapc
drwxr-x--- 2 root eapc 4096 Aug 20 23:30 keystore
drwxr-xr-x 2 root root 4096 Aug 20 23:30 lib
drwxr-xr-x 2 eapc eapc 4096 Aug 21 21:04 logs
drwxr-xr-x 2 root root 4096 Aug 21 01:18 man
drwxr-x--- 2 root eapc 4096 Aug 20 23:30 properties
drwxr-xr-x 2 root root 4096 Aug 21 03:36 webapps
drwxr-xr-x 3 eapc eapc 4096 Aug 21 21:11 work
#

 

Create a symlink EAPController pointing to the actual directory:

 

# ln -s EAPController-3.0.2 EAPController

#

 

 

Step 3: Change into this directory and create a symlink to the Raspbian Java JRE:

 

# cd EAPController

# ln -s /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre jre

#

 

If you have not done so already, install a short-hand for the tpeap command:

 

# ln -s /opt/tplink/EAPController/bin/tpeap /bin/tpeap

#

 

Last step: Start EAP Controller, note option -W to give it some more time than the default time-out:

 

# tpeap -W 250 start
[ ok ] Starting Omada EAP Controller:........................................................
Omada EAP Controller started successfully.
Direct your browser to http://raspberrypi:8088 for accessing the Omada EAP Controller.
#

 

If you don't specify -W 250, tpeap will start the EAP Controller in the background, but you still have to wait for it to become ready.

 

If in doubt, check with:

 

# tpeap status
Omada EAP Controller is still initializing, please wait.

 

To avoid typing -W 250 all the time, edit /opt/tplink/EAPController/bin/tpeap and remove the comment of the WAIT_TIME variable in line 53:

 

    # How long to wait for completion of the start if '-w' is given (seconds).
    #WAIT_TIME=70    # Fast server systems
    WAIT_TIME=240    # Slower systems (RasPi, other SoCs)

 

 

 

That's all, works fine on my RasPi. If you get it running, please reply, I will mix us a »White Russian« drink then. 

 


 

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  1  
  1  
#9
Options
Re: Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 21:50:48 - last edited 2019-03-06 01:55:43

Pleeeeease don't post Java server.log. It contains Java mess, nothing really useful. Please shorten your posting, I won't read Java stack backtraces at all. 

 

But o.k., there is one (1) useful message: You have wrong file permissions/ownerships. See my previous post, check for the correct ownerhip of the files.

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
  1  
  1  
#10
Options
Re:Re: Omada EAP Controller 3.0.2 for Linux is here!
2018-08-21 22:20:38 - last edited 2019-03-06 01:55:43

Ok I did the whole thing and rights are good now. Symlinks are ok as well...but hold on with the drinks 😔

 

But again error. ---eddited logs out that showed mongod lines that didn't show actually errors---

  0  
  0  
#11
Options