How to restart unifi controller

How to restart unifi controller DEFAULT

roldaojr/unifi-restart-aps.py

#!/usr/local/bin/python-3.7importsslimporturllib.requestimporturllib.parseimporthttp.cookiejarimportjsonimportargparseBASEURL="https://unifi-controller-ip:8443"USERNAME="admin"PASSWORD="password"# Insecure SSL contextctx=ssl.create_default_context()ctx.check_hostname=Falsectx.verify_mode=ssl.CERT_NONEcookies=http.cookiejar.CookieJar()classUnifiController():def__init__(self, url, verbose=False):self.url=urlself.verbose=verbosedefapi_request(self, path, data=None):ifself.verbose:print('Request %s/api/%s,data=%s'% (self.url, path, data))body=json.dumps(data).encode('ascii') ifdataelseNonerequest=urllib.request.Request('%s/api/%s'% (self.url, path), data=body)cookies.add_cookie_header(request)response=urllib.request.urlopen(request, context=ctx)cookies.extract_cookies(response, request)returnjson.loads(response.read())deflogin(self, username, password):try:login=self.api_request('login', {'username': username, 'password': password,'sessionTimeout': 600 })excepturllib.error.HTTPErroraserr:print('Erro ao realizar login: %s'%err)defcall_command_alldevs(self, cmd='restart', opts={}):sites=self.api_request('self/sites')forsiteinsites['data']:ifsite['role'] =='admin':devices=self.api_request('s/%s/stat/device'%site['name'])fordeviceindevices['data']:print('Call %s in device %s IP %s'% (cmd, device['mac'], device['ip']),end='\n'ifself.verboseelse': ' )try:params= {'mac': device['mac'], 'cmd':cmd}ifopts.get('soft', False):params['reboot_type'] ='soft'self.api_request('s/%s/cmd/devmgr'%site['name'],params )print('ok')excepturllib.error.HTTPErrorase:print('Erro HTTP %s'%e.status)if__name__=='__main__':parser=argparse.ArgumentParser(description='Reboot all devices in UniFi controller')parser.add_argument('-c', '--controller', default="http://localhost:8443",help='UniFi controller URL (default http://localhost:8443)')parser.add_argument('-u', '--user', default="admin",help='Admin username (default admin)')parser.add_argument('-p', '--password', default="unifi",help='Admin password (default unifi)')parser.add_argument('-s', '--soft', help='Do a soft reboot', action='store_true')parser.add_argument('-v', help='Verbose output', action='store_true')try:args=parser.parse_args()unifi=UnifiController(args.controller, verbose=args.v)unifi.login(args.user, args.password)unifi.call_command_alldevs('restart', {'soft': args.soft})exceptargparse.ArgumentErroraserr:#print(err)parser.print_help()
Sours: https://gist.github.com/roldaojr/c085270e7b58a16ef6159c48a88f2701

How to Keep the UniFi Controller Windows Service Running 24/7 with Service Protector

Keep UniFi Controller Windows Service running 24/7 with Service Protector

Automatically re-launch the UniFi Controller when it stops for any reason. Survive crashes, memory leaks, accidental shutdowns, etc.

The UniFi Controller from Ubiquiti Networks allows you to manage multiple wireless networks from your web browser. It can be installed as a Windows Service, to start immediately when your server boots and keep running unattended in the background in a 24x7 environment:

UniFi Controller installed as a Windows Service

To protect the UniFi Controller Windows Service with Service Protector:

  1. Download and install Service Protector, if necessary.

  2. Start Service Protector.

  3. Select Protector > Add to open the Add Protector window:

    Add Protector

  4. On the General tab, in the Service to protect field, select the UniFi Controller windows service. It will be called UniFi Controller.

    There will be a green circle next to the name if the service is already running.

    UniFi Controller Windows Service: General Tab

  5. Click the Save button. In a few seconds, an entry for UniFi Controller will show up in the Service Protector window. The UniFi Controller windows service may be running but it is not yet being protected by Service Protector.

    UniFi Controller Windows Service: Created

    Click on the green circle to see details of the UniFi Controller service:

    UniFi Controller Windows Service: Details

  6. To start monitoring UniFi Controller, choose Protector > Start "UniFi Controller". In a couple of seconds the shield icon in the Protected column will go green to show that UniFi Controller is being managed by Service Protector.

    UniFi Controller Windows Service: Protected

    Click on the green shield to see details of the UniFi Controller service:

    UniFi Controller Windows Service: Details

  7. That's it! Next time your computer boots, UniFi Controller will start up automatically (as normal) and Service Protector will start monitoring the service to restart it quickly it if it crashes for any reason.

    We encourage you to edit the UniFi Controller entry in Service Protector and check out the many other settings that may be helpful in your environment. For example, periodically restart the service to cure memory leaks, configure a script to detect failures of the web interface, and much more.



Trouble protecting the UniFi Controller Windows Service?

Sours: https://www.coretechnologies.com/products/ServiceProtector/Services/AutoRestartUniFiControllerWindowsService.html
  1. Wooden pots for indoor plants
  2. 1978 mustang cobra 2 horsepower
  3. Reefer roadside service near me
  4. 2017 jaguar xf trim levels

IT Knowledgebase IT Knowledgebase



6022 views Less than a minute
  1. Log in to the Unifi Controller
  2. Click on the Devices Tab
  3. Click on the Access Point you wish to restart
  4. On the right-hand side fly in click on the tools icon
  5. Scroll down and click on Open Terminal
  6. On the terminal that opens type in reboot and hit enter

 

unifi access point rebootUnifiWindows Commands
Trusted IT Support Sydney by 4iT - Your IT Support Department

Related Articles

For more information about our Managed IT Support for your Sydney based business connect with us today!
Find Out More
Sours: https://support.4it.com.au/article/how-to-reboot-unifi-access-point-from-unifi-controller/
How to reset Unifi Access points to factory default. Password recovery

Views:48

Scenario
Make: Ubiquiti
Model: Unifi UAP-nanoHD, U6-LR, U6-Light, UAP-AC-HD, etc
Mode: CLI
Description: This article is to discuss a stepwise method to reboot or reload Ubiquiti Unifi access points. This method is valid for all models of Ubiquiti Unifi access points.

Physical Method

When an access point is connected to a LAN cable having PoE or via an ethernet injector, the access point can be reloaded or rebooted by unplugging and replugging the LAN cable. Remove the LAN cable or PoE injector to stop the power supply to the access point and then re-connect the cable. This process will reboot the access point.

unifi access point

Unplug and re-plug the Ethernet cable and it will reboot the access point. Each access point can be rebooted in the same way.

Remote Method

If the access point is connected to a network and it is accessible over the network then we can reboot or reload the access point remotely. Follow the steps mentioned below.

Step1: SSH onto Access Point
Access the access point over SSH. Click the link to know how to ssh onto the access point.

SSH 10.1

Step2: Login
Log in to the access point over SSH using username and password. Click the link to know Ubiquiti Unifi Default Username & Password.

Step3: Reboot or Reload
Reboot or Reload the access point using the command as shown below.

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.01.1 14:09:05 =~=~=~=~=~=~=~=~=~=~=~=
login as: edledge-admin
[email protected]'s password: edledge

BusyBox v1.25.1 () built-in shell (ash)

___ ___ .__________.__
| | |____ |__\_ ____/__|
| | / \| || __) | | (c) 2010-2021
| | | | \ || \ | | Ubiquiti Networks, Inc.
|______|___| /__||__/ |__|
|_/ https://www.ui.com/

Welcome to UniFi U6-LR!

edledge-ap# reboot
edledge-ap#

Step4: Confirmation
Once the access point is rebooted then the SSH will be disconnected with an error as shown below. After few minutes the access point will be back online.

SSH disconnected

The above mentioned methods will reboot the access point. Sometimes we get INFORM ERROR on Unifi Access Points, refer to the linked article to resolve the issue. Also, follow the article if you are looking to factory reset Ubiquiti Unifi access points to its default settings.

Source: Knowledge Base, Lab, Ubiquiti

EA00078

Sours: https://edledge.com/ea00078/

Controller restart how to unifi

Anyone know how to restart all of the services in the Unifi Controller? I need to stop apache and any other services that are running as one of them keeps getting hung up. 


Best Answer

Derek_A

Ghost Chili

OP

In a normal windows install there are no services with the Unifi controller.  It is a Java based app.  If you open task manager you will see 2 or 3 java.exe and/or javaw.exe processes running, those are the controller.  Kill those processes and you have killed the controller.

View this "Best Answer" in the replies below »

7 Replies

· · ·

Derek_A

Ghost Chili

OP

Best Answer

In a normal windows install there are no services with the Unifi controller.  It is a Java based app.  If you open task manager you will see 2 or 3 java.exe and/or javaw.exe processes running, those are the controller.  Kill those processes and you have killed the controller.

3

· · ·

Rockn

Mace

OP

I figured it was Java holding 8443 open so I killed it and the service started normally. Thanks

0

· · ·

Jack6865

Serrano

OP

I can add that it only happens when Java calls out for an update.

If you are hosting the controller on a machine that is never used to surf the internet with, just shut off Java updates and it will never happen again.

We host it on a virtual server and have had no issues at all : )

0

· · ·

Rockn

Mace

OP

I need to get the controller installed on another computer. This is a utility server that has everything plus the kitchen sink running on it. I have never had an issue running it in my office.

0

· · ·

Rockn

Mace

OP

I seem to recall an issue with Java versions too if they didn't match a config file then the controller would constantly crash.

0

· · ·

Cody8983

Jalapeno

OP

Not sure if this would interest you but it is possible to run the Unifi controller as a service. It just takes a couple of additions to the %PATH% and a quick command line.

https://community.ubnt.com/t5/UniFi-Controller-Installation/UniFi-Run-the-controller-as-a-Windows-se...

0

· · ·

molan

Mace

OP

also keep in mind they offer unifi on Linux, in fact they develops for Linux first with windows being an after thought.

if you are virtual I would,recomend setting up a dedicated Linux vm to host the controller

0

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

Sours: https://community.spiceworks.com/topic/445472-restarting-all-unifi-services
Quick Way How to Restart Unifi Router

Pale as paper, and I'm old to carry the carcasses of girls in my arms. Get the key, open the door, turn on the light, put the girl on an old chair, splash half a bottle of. Peroxide on the wound, cleanse the blood, again peroxide and a couple of tampons, now the bandage is faster to make than to say or write.

The girl calmed down a little and began to look around. Books, books are everywhere, the tiny free space is the couch I sit on, the low coffee table with the laptop and the chair where she sits.

You will also like:

Tomorrow morning you need to be in the mood, and in general. She understands that it flows, holding this vibrator in her hand, it always evokes very exquisite sensations, and the moments of anticipation when. You deliberately pull the time, forcing yourself to tremble in your own way are very sweet, and filled with that special languor, familiar only to truly sophisticated and passionate natures.

Olga turns off the overhead light, lights a floor lamp next to the chair and sits down in front of a large mirror above the. Dressing table.



939 940 941 942 943