Services Commands

connectorctl service restart

This command restarts all the Cisco Spaces: Connector services. To enable debug logs, use the -l keyword is specified. 

connectorctl service restart -s service-name [ -l debug-level [ -d debug-period-in-minutes ] ]

Syntax Description

Keyword and Variable Description

-s service-name

Configure the service that needs to be restarted.

-l debug-level

(Optional) Configure the debug level. Values are DEBUG, INFO, and WARNING.
  • If debug-level is unspecified, the default value is DEBUG.

Note

 

Running the service at DEBUG log level would significantly impact performance

-d debug-period-in-minutes

(Optional) Specify the debug period in minutes. If unspecified, the default value is 10 minutes.

  • If -l is unspecified, service is restarted but debugging is not logged.

Command History

Release 3

This command is introduced.

Examples

You can also restart a specified service. The following is a sample output of the command:
$[spacesadmin@connector ~]$ connectorctl service restart -s location -l DEBUG
Executing command:service
Command execution status: Success

Status:Successfully started location

connectorctl servicestatus

This command displays the status of all the services running on the Cisco Spaces: Connector.

Parameters

None.

connectorctl servicestatus

Usage Guidelines


[cmxadmin@cmxnew ~]$ connectorctl servicestatus
======================================================================================================
Docker Downloaded Images
======================================================================================================

REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
connector.dev-dnaspaces.io/connector   v2.0.226            3e961019b481        30 hours ago        837MB
codekoala/pypi                         latest              9d1395575eb8        2 years ago         59.7MB


======================================================================================================
Docker Running Containers
======================================================================================================

CONTAINER ID        IMAGE                                           COMMAND             CREATED             STATUS              PORTS                                                                                                                                 NAMES
713a1fed5f06        connector.dev-dnaspaces.io/connector:v2.0.226   "./entrypoint.sh"   19 hours ago        Up 10 minutes       0.0.0.0:8002-8003->8002-8003/tcp, 0.0.0.0:2003->2003/udp, 0.0.0.0:8186->8186/tcp, 127.0.0.1:8185->8185/tcp, 0.0.0.0:8004->25103/tcp   connector


======================================================================================================
Docker Service Status
======================================================================================================

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-18 18:53:35 -10; 10min ago
     Docs: https://docs.docker.com
 Main PID: 29575 (dockerd)
   Memory: 55.9M
   CGroup: /system.slice/docker.service
           ├─29575 /usr/bin/dockerd
           ├─29582 docker-containerd --config /var/run/docker/containerd/containerd.toml
           └─29739 docker-containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/713a1fed5f06283b48771e699ca6082b3b7a39ceeb8f28776aae97b914c78afa -address /var/run/docker/containerd/docker-containerd.sock -containerd-binary /usr/bin/docker-containerd -runtime-root /var/run/docker/runtime-runc

Feb 18 18:53:33 cmxnew dockerd[29575]: time="2020-02-18T18:53:33.454920975-10:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc4204074f0, READY" module=grpc
Feb 18 18:53:33 cmxnew dockerd[29575]: time="2020-02-18T18:53:33.454943957-10:00" level=info msg="Loading containers: start."
Feb 18 18:53:34 cmxnew dockerd[29575]: time="2020-02-18T18:53:34.198905851-10:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35-10:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/713a1fed5f06283b48771e699ca6082b3b7a39ceeb8f28776aae97b914c78afa/shim.sock" debug=false pid=29739
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35.313599290-10:00" level=info msg="Loading containers: done."
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35.446434997-10:00" level=info msg="Docker daemon" commit=e68fc7a graphdriver(s)=overlay2 version=18.06.1-ce
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35.446524264-10:00" level=info msg="Daemon has completed initialization"
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35.463099648-10:00" level=warning msg="Could not register builder git source: failed to find git binary: exec: \"git\": executable file not found in $PATH"
Feb 18 18:53:35 cmxnew dockerd[29575]: time="2020-02-18T18:53:35.480241781-10:00" level=info msg="API listen on /var/run/docker.sock"
Feb 18 18:53:35 cmxnew systemd[1]: Started Docker Application Container Engine.


======================================================================================================
HAProxy Service Status
======================================================================================================

● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-18 18:53:35 -10; 10min ago
  Process: 29815 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q (code=exited, status=0/SUCCESS)
 Main PID: 29817 (haproxy)
   Memory: 7.7M
   CGroup: /system.slice/haproxy.service
           ├─29817 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
           └─29820 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid

Feb 18 18:53:35 cmxnew haproxy[29817]: [WARNING] 048/185335 (29817) : config : log format ignored for frontend 'https' since it has no log address.
Feb 18 18:53:35 cmxnew haproxy[29817]: [WARNING] 048/185335 (29817) : config : log format ignored for frontend 'grpchttps' since it has no log address.
Feb 18 18:53:35 cmxnew haproxy[29817]: [NOTICE] 048/185335 (29817) : New worker #1 (29820) forked
Feb 18 18:53:35 cmxnew systemd[1]: Started HAProxy Load Balancer.
Feb 18 18:53:35 cmxnew haproxy[29817]: [WARNING] 048/185335 (29820) : Server grpcserver/grpcserver is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Feb 18 18:53:35 cmxnew haproxy[29817]: [ALERT] 048/185335 (29820) : backend 'grpcserver' has no server available!
Feb 18 18:53:36 cmxnew haproxy[29817]: [WARNING] 048/185336 (29820) : Server dsapapi/dsapapi is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Feb 18 18:53:36 cmxnew haproxy[29817]: [ALERT] 048/185336 (29820) : backend 'dsapapi' has no server available!
Feb 18 18:53:36 cmxnew haproxy[29817]: [WARNING] 048/185336 (29820) : Server firehose/firehose is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Feb 18 18:53:36 cmxnew haproxy[29817]: [ALERT] 048/185336 (29820) : backend 'firehose' has no server available!


======================================================================================================
NGINX Service Status
======================================================================================================

● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-18 18:53:35 -10; 10min ago
  Process: 29836 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 29832 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 29831 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 29839 (nginx)
   Memory: 2.1M
   CGroup: /system.slice/nginx.service
           ├─29839 nginx: master process /usr/sbin/nginx
           └─29840 nginx: worker process

Feb 18 18:53:35 cmxnew systemd[1]: Starting The nginx HTTP and reverse proxy server...
Feb 18 18:53:35 cmxnew nginx[29832]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 18 18:53:35 cmxnew nginx[29832]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 18 18:53:35 cmxnew systemd[1]: Started The nginx HTTP and reverse proxy server.


======================================================================================================
Connector Agent Service Status
======================================================================================================

● cmx-agent.service - uWSGI instance to serve dna-spaces-agent
   Loaded: loaded (/etc/systemd/system/cmx-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-18 18:53:21 -10; 10min ago
 Main PID: 29480 (uwsgi)
   Memory: 35.4M
   CGroup: /system.slice/cmx-agent.service
           ├─29480 /usr/bin/uwsgi --ini agent_wsgi.ini
           └─29497 /usr/bin/uwsgi --ini agent_wsgi.ini

Feb 18 18:53:21 cmxnew systemd[1]: Started uWSGI instance to serve dna-spaces-agent.
Feb 18 18:53:21 cmxnew systemd[1]: Starting uWSGI instance to serve dna-spaces-agent...
Feb 18 18:53:21 cmxnew uwsgi[29480]: [uWSGI] getting INI configuration from agent_wsgi.ini