Description

This article provides information about restarting the management process or daemon (MGD) for Juniper Networks EX/QFX/MX series without having to restart the entire Routing Engine.

Symptoms

Which commands should I use to restart the MGD process?

Solution

There are two ways to restart the mgd process:

  1. Using command restart management. This can also be combined with several knobs:

switch   > restart management ?
Possible completions:
<[Enter]>             Execute this command
gracefully            Gracefully restart the process
immediately           Immediately restart (SIGKILL) the process
soft                  Soft reset (SIGHUP) the process
|                     Pipe through a command 
On some platforms, this option may be hidden, in which case you may need to manually enter the full command:
switch   >restart m  

Possible completions:
> mc-ae-config-check-service MC-LAG Configuration Consistency Check daemon
member Restart software process on specific virtual chassis member (0..9)
> mgd-api Management Daemon GRPC server
> mib-process Management Information Base II process
> mosquitto Mosquitto Broker for notification
> multicast-snooping Multicast Snooping process 

switch> restart management 
Management process started, pid 30895 
  1. From shell using root access. There may be several mgd processes running at the same time. Therefore, you need to kill them individually:

switch>start shell user root

root@switch% ps -auwx| grep mgd
root 4550 0.0 0.4 280500 7284 - I Sat07 0:00.08 /usr/sbin/mgd-api -N
root 30895 0.0 1.6 300196 32136 - S 17:31 0:01.24 /usr/sbin/mgd -N
root 30927 0.0 1.6 300196 32340 - Ss 17:31 0:00.05 mgd: (mgd) (root)/dev/pts/0 (mgd)
root 31039 0.0 0.1 8512 2192 0 S+ 17:32 0:00.01 grep mgd

root@switch:RE:0% kill 4550
root@switch:RE:0% kill 30895
root@switch:RE:0% kill 30927
root@switch:RE:0% exit 
 

Note: 1

Either method could close any existing sessions on the device as well as cancel pending commits. You may see the following message when you log back in:

WARNING: cli has been replaced by an updated version:
CLI release 18.1R3.3 built by builder on 2018-08-30 05:29:08 UTC
Restart cli using the new version? [yes, no] (yes) yes

Note: 2

If the process that needs to be restarted is "mgd-api," which is the management daemon for gRPC, use the following command:

switch > restart mgd-api

Modification History

  • 2023-03-24: Added change for mgd-api restart command

  • 2020-02-08: Updated solution to include two methods to restart the mgd process

  • 2018-10-31: Article updated to include information about switching products; EX and QFX product categories added