How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)

How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)

How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2018-09-14 09:47:53 - last edited 2019-08-13 08:19:39

Introduction

This document introduces how to configure Omada Controller as a Windows Service by using NSSM.

 

Prerequisites

1. A computer with the Omada Controller installed already.

2. Download the NSSM – the Non-Sucking Service Manager (https://nssm.cc/download)

 

Procedures

1. Extract nssm.exe to a convenient location, here I use “C:\Program Files (x86)\TP-LINK\EAP Controller\bin” as example.

 

2. Make sure you have ran Omada Controller before, or you can just keep Omada Controller running during this operation.

 

3. Run Windows Command Line as administrator and cd to the path you placed nssm.exe. Here is the C:\Program Files (x86)\TP-LINK\EAP Controller\bin.

 

 

4. Type nssm install “Omada Controller” to create a new Service using nssm.   

 

Set the following parameters as listed below:

 

Application 

Path:

C:\Program Files (x86)\TP-LINK\EAP Controller\jre\bin\java.exe

Startup directory:

C:\Program Files (x86)\TP-LINK\EAP Controller\jre\bin\

Arguments: 

-server -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+HeapDumpOnOutOfMemoryError -Deap.home="C:\Program Files (x86)\TP-LINK\EAP Controller" -cp "C:\Program Files (x86)\TP-LINK\EAP Controller\lib\*" com.tp_link.eap.start.EapMain

 

Details

Description: 

Add one if you want

Startup type:

Automatic

 

Log on

Local System account and select “Allow service to interact with desktop”

 

Environment

set scriptDir="C:\Program Files (x86)\TP-LINK\EAP Controller\bin"

set eapHome="C:\Program Files (x86)\TP-LINK\EAP Controller"

JAVA_HOME="%eapHome%\jre"

PATH=%JAVA_HOME%\bin;%path%

 

 

5. Click Install service and will show you the successful note.

 

 

 

6. After the Omada Controller service is successfully set up, please restart your computer and the Omada Controller service will startup automatically. Please check on Windows Task Manager to see if the java.exe and mongod.exe are running properly. Then you can type http://127.0.0.1:8088 or https://127.0.0.1:8043 to login to the Omada Controller’s Web management page.

 

 

 

Note: 

1. After the NSSM is installed successfully, you can also use nssm edit “Omada Controller” command to edit the service.

2. When you are going to update the Controller, please remember to stop the service first, or the process will be denied.

 

PS: This guidance refers to the post of the_MiCrO : https://community.tp-link.com/en/business/forum/topic/87217?replyId=184576. Thanks for the help!!!

  4      
  4      
#1
Options
2 Accepted Solutions
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)-Solution
2019-07-24 14:29:21 - last edited 2019-07-25 01:39:24

We use Omada installed on a central "admin-pc" at every client so getting the Omada hw-controler is overhead.

But I wanted to have Omada started automaticly but not going manually to all installations.

I played around how to use NSSM on command line, bit tricky but I got it working.

Now we use our RMM solution to configure NSSM on all present (and new) "admin-pc"'s

 

So, the first installation/configuration of NSSM you do manually.

When done and working, you use the command: NSSM dump <name>

This will "dump" a full set of commands you can add to your bat, cmd or what have you script.

 

I have found not all NSSM.exe do have the dump option.  Download one of the others (beta or what have you) if it is not in the steady release.

 

Ours looks as follows (all used the defaults as described in the knowledge base article):  see attached cmd file

 

 

File:
AutoStartNSSM.cmdDownload
Recommended Solution
  0  
  0  
#17
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)-Solution
2020-03-17 00:24:08 - last edited 2020-03-17 00:24:52

@Powerauditor 

 

We have upgraded the firmware about how to configure Omada Controller as a Windows Service?, you can refer to the faq to stop/run the NSSM. 

 

Note: we don't recommend you install the NSSM on the path of the Omada Controller, or the windows service will not take effect after you upgrade the new Omada Controller. For more details, please refer to the faq above.

Recommended Solution
  0  
  0  
#21
Options
13 Reply
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2018-09-20 22:03:55

Oh thank god for this.

 

I just got a set of EAP225s. Setup of the AP and Omada software was a breeze, and I am looking forward to rolling these out to all our sites.

 

Then I tried finding a US source for the OC200. Pretty much squat.

 

Then I installed the OC software on a Windows 2012r2 server, hoping when I logged off it would still be running. Nope.

 

There is almost nothing more frustrating than finding an awesome set of tools that check all the admin boxes, and then finding that the supporting hardware or software is as good as useless. I got to this point after struggling through an install of Unifi products.

 

And then I found this. I am almost afraid to hope that it works.

  0  
  0  
#2
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2018-09-21 13:53:50 - last edited 2020-03-17 00:24:41

Checking back in to confirm this works swimmingly on Windows Server 2012r2.

 

On a related note, I got a response to my inquiry yesterday about the availability of the OC200 in the US from the business division. They expect shipments to the states in October and we should see inventory on Amazon after that.

 

I am actually far less concerned about having the OC200 deployed now that I know we can run it as a service on our Windows servers.

 

Thanks again for providing this very helpful tutorial!!!

  1  
  1  
#3
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2018-10-09 07:25:14
Hey Nice work ... how about you at least give the former author some credits? ;-P
  0  
  0  
#4
Options
Re:Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2018-10-19 07:52:45 - last edited 2018-12-17 09:44:39

the_MiCrO wrote

Hey Nice work ... how about you at least give the former author some credits? ;-P

Oh, this document have referred to your article, I will add the explanation in the end of this post. Thank you for the help!!!

  0  
  0  
#6
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2019-07-05 04:30:43

 

Thank you very much to provide this detailed tutorial.

 

It works great & swimmingly on Windows Server 2012r2.

 

I am actually far less concerned about having the OC200 deployed now that I know we can run it as a service on our Windows servers.

 

Thanks again for providing this very helpful & Centralh tutorial!!!

Expert Graphic & Web Designer and love
  0  
  0  
#15
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)-Solution
2019-07-24 14:29:21 - last edited 2019-07-25 01:39:24

We use Omada installed on a central "admin-pc" at every client so getting the Omada hw-controler is overhead.

But I wanted to have Omada started automaticly but not going manually to all installations.

I played around how to use NSSM on command line, bit tricky but I got it working.

Now we use our RMM solution to configure NSSM on all present (and new) "admin-pc"'s

 

So, the first installation/configuration of NSSM you do manually.

When done and working, you use the command: NSSM dump <name>

This will "dump" a full set of commands you can add to your bat, cmd or what have you script.

 

I have found not all NSSM.exe do have the dump option.  Download one of the others (beta or what have you) if it is not in the steady release.

 

Ours looks as follows (all used the defaults as described in the knowledge base article):  see attached cmd file

 

 

File:
AutoStartNSSM.cmdDownload
Recommended Solution
  0  
  0  
#17
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2020-03-10 16:04:06

@jonas Qucik question, what service or process do i need to stop if I want to upgrade Omada Controller? mangod.exe or java.exe or both?

  0  
  0  
#18
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2020-03-10 16:16:08

@Powerauditor If you upgrade when Omada is started manually, none.  The upgrade will take care of that itself.

If you have NSSM service option running, stop the NSSM service, wait 30 secs or so and start the upgrade

  0  
  0  
#19
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)-Solution
2020-03-17 00:24:08 - last edited 2020-03-17 00:24:52

@Powerauditor 

 

We have upgraded the firmware about how to configure Omada Controller as a Windows Service?, you can refer to the faq to stop/run the NSSM. 

 

Note: we don't recommend you install the NSSM on the path of the Omada Controller, or the windows service will not take effect after you upgrade the new Omada Controller. For more details, please refer to the faq above.

Recommended Solution
  0  
  0  
#21
Options
Re:How to Configure Omada Controller as a Windows Service(above Controller 2.5.4)
2020-07-19 06:22:06

I just tried this procedure on the new version (4.1.5) and the service does not start. 

 

I changed the variables to the java location (as it seems java is not bundled with the latest release) but still doesn't work. I get an error in the event log as follows:

 

Failed to start service Omada.  Program "C:\Program Files (x86)\Java\jre\bin\java.exe" couldn't be launched. CreateProcess() failed: The parameter is incorrect.
 

  0  
  0  
#22
Options