Configuration for the REST server in mgmt-framework

94 views
Skip to first unread message

Viji Desikan

unread,
Jul 9, 2020, 4:38:46 PM7/9/20
to sonic-mgmt-workgroup
Hi,
Is there a way to get help to get the REST server in the mgmt-framework working ?

The logs show that the REST server is running with no auth. 

Fetch the logs of a container
admin@sonic:~$ docker logs mgmt-framework
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2020-06-20 03:13:18,997 CRIT Set uid to user 0
2020-06-20 03:13:19,006 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2020-06-20 03:13:19,272 INFO RPC interface 'supervisor' initialized
2020-06-20 03:13:19,302 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-06-20 03:13:19,310 INFO supervisord started with pid 1
2020-06-20 03:13:20,325 INFO spawned: 'dependent-startup' with pid 8
2020-06-20 03:13:20,370 INFO spawned: 'start' with pid 9
2020-06-20 03:13:20,627 INFO success: start entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-06-20 03:13:20,651 INFO exited: start (exit status 0; expected)
2020-06-20 03:13:21,665 INFO success: dependent-startup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 03:13:23,499 INFO spawned: 'rsyslogd' with pid 13
2020-06-20 03:13:24,498 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 03:13:24,837 INFO spawned: 'rest-server' with pid 17
2020-06-20 03:13:25,831 INFO success: rest-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 03:13:27,282 INFO exited: dependent-startup (exit status 0; expected)
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2020-06-20 10:25:16,838 CRIT Set uid to user 0
2020-06-20 10:25:16,839 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
Unlinking stale socket /var/run/supervisor.sock
2020-06-20 10:25:17,345 INFO RPC interface 'supervisor' initialized
2020-06-20 10:25:17,346 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-06-20 10:25:17,350 INFO supervisord started with pid 1
2020-06-20 10:25:18,378 INFO spawned: 'dependent-startup' with pid 8
2020-06-20 10:25:18,391 INFO spawned: 'start' with pid 9
2020-06-20 10:25:18,752 INFO success: start entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-06-20 10:25:18,759 INFO exited: start (exit status 0; expected)
2020-06-20 10:25:19,772 INFO success: dependent-startup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 10:25:21,941 INFO spawned: 'rsyslogd' with pid 13
2020-06-20 10:25:22,934 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 10:25:22,966 INFO spawned: 'rest-server' with pid 17
2020-06-20 10:25:23,961 INFO success: rest-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-20 10:25:25,995 INFO exited: dependent-startup (exit status 0; expected)
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2020-07-02 01:42:25,826 CRIT Set uid to user 0
2020-07-02 01:42:25,835 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
Unlinking stale socket /var/run/supervisor.sock
2020-07-02 01:42:26,359 INFO RPC interface 'supervisor' initialized
2020-07-02 01:42:26,360 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-02 01:42:26,361 INFO supervisord started with pid 1
2020-07-02 01:42:27,369 INFO spawned: 'dependent-startup' with pid 8
2020-07-02 01:42:27,406 INFO spawned: 'start' with pid 9
2020-07-02 01:42:27,626 INFO success: start entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-07-02 01:42:27,629 INFO exited: start (exit status 0; expected)
2020-07-02 01:42:28,636 INFO success: dependent-startup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 01:42:30,662 INFO spawned: 'rsyslogd' with pid 13
2020-07-02 01:42:31,658 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 01:42:31,684 INFO spawned: 'rest-server' with pid 17
2020-07-02 01:42:32,675 INFO success: rest-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 01:42:33,621 INFO exited: dependent-startup (exit status 0; expected)
2020-07-02 03:44:51,779 WARN received SIGTERM indicating exit request
2020-07-02 03:44:51,781 INFO waiting for rest-server, rsyslogd to die
2020-07-02 03:44:51,793 INFO stopped: rest-server (terminated by SIGTERM)
2020-07-02 03:44:52,802 INFO stopped: rsyslogd (exit status 0)
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2020-07-02 03:48:09,578 CRIT Set uid to user 0
2020-07-02 03:48:09,581 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2020-07-02 03:48:09,745 INFO RPC interface 'supervisor' initialized
2020-07-02 03:48:09,749 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-02 03:48:09,750 INFO supervisord started with pid 1
2020-07-02 03:48:10,758 INFO spawned: 'dependent-startup' with pid 8
2020-07-02 03:48:10,775 INFO spawned: 'start' with pid 9
2020-07-02 03:48:11,099 INFO success: start entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-07-02 03:48:11,102 INFO exited: start (exit status 0; expected)
2020-07-02 03:48:12,122 INFO success: dependent-startup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 03:48:13,748 INFO spawned: 'rsyslogd' with pid 13
2020-07-02 03:48:14,753 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 03:48:14,816 INFO spawned: 'rest-server' with pid 17
2020-07-02 03:48:15,846 INFO success: rest-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-02 03:48:17,335 INFO exited: dependent-startup (exit status 0; expected)


The requests fail with 404  or "Operation Failed" Application Error.

Please let me know ,what configuration needs to be set in config db for REST to work.

Thanks
Viji


Reply all
Reply to author
Forward
0 new messages