<
WiFi
eap controller linux start failed
This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
eap controller linux start failed
Posts: 1
Helpful: 0
Solutions: 0
Stories: 0
Registered: 2017-11-29
2017-11-29 19:26:42
Posts: 1
Helpful: 0
Solutions: 0
Stories: 0
Registered: 2017-11-29
eap controller linux start failed
2017-11-29 19:26:42
Tags:
Model :
Hardware Version :
Firmware Version :
ISP :
Hi
I have installed eap controller 2.5.3 on linux ubuntu. When trying to start it I get: Start failed.
How to fix this?
Best Regards,
Håvard
Hardware Version :
Firmware Version :
ISP :
Hi
I have installed eap controller 2.5.3 on linux ubuntu. When trying to start it I get: Start failed.
How to fix this?
Best Regards,
Håvard
#1
Options
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
Thread Manage
Announcement Manage
3 Reply
Posts: 6
Helpful: 0
Solutions: 0
Stories: 0
Registered: 2017-08-16
Re:eap controller linux start failed
2017-12-05 17:38:09
Hi,
Which version ubuntu you are using?
EAP Controller supporting 64-bit Linux operating system, including Ubuntu 14.04/16.04/17.04, CentOS 6.x/7.x and Fedora 20 or above.
and require JRE 1.7 (or above) Java environment.
Please make sure you have installed Java environment.
And can you show me more detail of "start failed"?
Which version ubuntu you are using?
EAP Controller supporting 64-bit Linux operating system, including Ubuntu 14.04/16.04/17.04, CentOS 6.x/7.x and Fedora 20 or above.
and require JRE 1.7 (or above) Java environment.
Please make sure you have installed Java environment.
And can you show me more detail of "start failed"?
0
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
0
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
#2
Options
- Copy Link
- Report Inappropriate Content
Thread Manage
Announcement Manage
Posts: 4334
Helpful: 1039
Solutions: 173
Stories: 3
Registered: 2015-12-05
Re:eap controller linux start failed
2017-12-07 08:43:06
Jonas_TP-Link wrote
EAP Controller supporting 64-bit Linux operating system, including Ubuntu 14.04/16.04/17.04, CentOS 6.x/7.x and Fedora 20 or above.
and require JRE 1.7 (or above) Java environment.
I don't want to hijack this tread, but there are serious problems with the install.sh and bin/control.sh scripts, which prevent installation and which also can prevent the start of the EAP Controller on Debian Linux, which is the core system for Ubuntu and many other Linux distributions. Albeit both scripts have the same bug, the installation could proceed in certain situations, but the start/stop script might fail.
The problems arise with the check for root permission. This check is done using:
[CODE]if [ $UID != ${ROOT_UID} ]
then ...[/CODE]
in both scripts. There are as much as three (!) bugs in this tiny line, leading to a fourth - even more serious - bug. Here we go:
Bug #1: missing apostrophes around shell variables which can be empty. If executed in its original form, the shell script prints an error for the check:
[CODE]# sh ./install.sh
./install.sh: 114: [: !=: unexpected operator
EAP Controller will be installed in [/opt/tplink/EAPController] (y/n):[/CODE]
but it will continue to run. This way, you can indeed install the EAP Controller if you are root already.
Bug #2: Albeit UID is set by the login shell, it is not (always) exported from the login shell to subshells. If the script is executed by a subshell like in " sh ./install.sh", it will barf even if you are root since UID is now empty. You will notice this error if you try to fix bug #1. Let's use apostrophes around the variable names to reveal this bug:
[CODE]if [ "$UID" != "${ROOT_UID}" ]
then ...[/CODE]
Now even if run by root, the script exits with an error message (and this bug could have been noticed during test phase if there had not been Bug #1 already):
[CODE]# sh ./install.sh
The script need root permission. Exit.
# [/CODE]
You can only "fix" this by manually exporting UID in your login shell as in " export UID; sh ./install.sh".
But then comes Bug #3, the most important bug: Never ever use the shell variable UID to check for root permissions. Otherwise everybody can run:
[CODE]UID=0 ./install.sh[/CODE]
to spoof his/her real user ID as being root for your script. This leads us to Bug #4: Everybody on the server (even non-root users) can stop an already running EAP Controller by using " UID=0 bin/control.sh stop", albeit it can not be started this way.
Fix: Use the command " id -u" to get the real user ID, which can't be spoofed. This is how to test for root permission on Linux (note also the correct numeric test operator ' -ne' instead of the string comparison operator ' ='):
[CODE][ $(id -u) -ne 0 ] && { echo "You must be root to run this script. Exit." 1>&2; exit 1; }[/CODE]
BTW: I did inform several people at TP-Link including support about this bug for all Linux versions of EAP Controller released so far and also for Pharos Control, which uses the same buggy construct.
I really recommend my start/stop script as a replacement for the bin/control.sh script as it fixes those bugs since EAP Controller 2.4.8 already:
http://forum.tp-link.com/showthread.php?97236-EAP-Software-Why-not-available-for-Linux-as-Docker-image&p=210127&viewfull=1#post210127
It even avoids other incompatible constructs supported by only some shells like bash, but not by sh:
[CODE]if [[ $confirm = "Y" || $confirm = "YES" ]]; then[/CODE]
leads to:
[CODE]# sh ./install.sh
EAP Controller will be installed in [/opt/tplink/EAPController] (y/n): y
./install.sh: 23: ./install.sh: [[: not found
./install.sh: 23: ./install.sh: Y: not found
./install.sh: 25: ./install.sh: [[: not found
./install.sh: 25: ./install.sh: Y: not found
EAP Controller will be installed in [/opt/tplink/EAPController] (y/n):
#[/CODE]
And so on ...
༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
1
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
1
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
#3
Options
- Copy Link
- Report Inappropriate Content
Thread Manage
Announcement Manage
Posts: 1
Helpful: 1
Solutions: 0
Stories: 0
Registered: 2018-03-31
Re:eap controller linux start failed
2018-03-31 19:50:48
Sorry re-hijacking this thread but I might have the solution to the original problem. At least check it.
During startup the controller checks network port availability. This is done by a call to netstat.
I run a "newer" version of debian that don't have netstat out of the box.
My solution was to run
apt install net-tools
and now the controller starts fine and also keeps its configuration across reboots.
During startup the controller checks network port availability. This is done by a call to netstat.
I run a "newer" version of debian that don't have netstat out of the box.
My solution was to run
apt install net-tools
and now the controller starts fine and also keeps its configuration across reboots.
1
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
1
We appreciate your feedback. Feel free to let us know more. Log in to submit feedback.
#4
Options
- Copy Link
- Report Inappropriate Content
Thread Manage
Announcement Manage
Posts: 1
Helpful: 0
Solutions: 0
Stories: 0
Registered: 2017-11-29
2017-11-29 19:26:42
Posts: 1
Helpful: 0
Solutions: 0
Stories: 0
Registered: 2017-11-29
Information
Helpful: 0
Views: 3736
Replies: 3
Voters 0
No one has voted for it yet.
Tags
Related Articles
Linux EAP Controller
1903
0
Omada EAP controller for Linux
13480
0
EAP Controller on Linux host
1150
0
Report Inappropriate Content
Transfer Module
New message