root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install python-setuptools
Command 'yum' not found, but can be installed with:
apt install yum
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo apt install yum
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-meld3 python-pkg-resources
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libcurl3-gnutls libsqlite0 python-libxml2 python-lzma python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber
Suggested packages:
libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc python-sqlite-dbg
The following NEW packages will be installed:
libcurl3-gnutls libsqlite0 python-libxml2 python-lzma python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber yum
0 upgraded, 10 newly installed, 0 to remove and 233 not upgraded.
Need to get 1,215 kB of archives.
After this operation, 6,223 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.20 [219 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 libsqlite0 amd64 2.8.17-14fakesync1 [160 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python-libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.7 [141 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-lzma amd64 0.5.3-3 [27.9 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-sqlite amd64 1.0.1-12 [20.9 kB]
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-pycurl amd64 7.43.0.1-0.2 [43.1 kB]
Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-urlgrabber all 3.10.2-1 [51.0 kB]
Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-rpm amd64 4.14.1+dfsg1-2 [44.7 kB]
Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-sqlitecachec amd64 1.1.4-1 [21.4 kB]
Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 yum all 3.4.3-3 [486 kB]
Fetched 1,215 kB in 1s (1,474 kB/s)
Selecting previously unselected package libcurl3-gnutls:amd64.
(Reading database ... 117455 files and directories currently installed.)
Preparing to unpack .../0-libcurl3-gnutls_7.58.0-2ubuntu3.20_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.20) ...
Selecting previously unselected package libsqlite0.
Preparing to unpack .../1-libsqlite0_2.8.17-14fakesync1_amd64.deb ...
Unpacking libsqlite0 (2.8.17-14fakesync1) ...
Selecting previously unselected package python-libxml2.
Preparing to unpack .../2-python-libxml2_2.9.4+dfsg1-6.1ubuntu1.7_amd64.deb ...
Unpacking python-libxml2 (2.9.4+dfsg1-6.1ubuntu1.7) ...
Selecting previously unselected package python-lzma.
Preparing to unpack .../3-python-lzma_0.5.3-3_amd64.deb ...
Unpacking python-lzma (0.5.3-3) ...
Selecting previously unselected package python-sqlite.
Preparing to unpack .../4-python-sqlite_1.0.1-12_amd64.deb ...
Unpacking python-sqlite (1.0.1-12) ...
Selecting previously unselected package python-pycurl.
Preparing to unpack .../5-python-pycurl_7.43.0.1-0.2_amd64.deb ...
Unpacking python-pycurl (7.43.0.1-0.2) ...
Selecting previously unselected package python-urlgrabber.
Preparing to unpack .../6-python-urlgrabber_3.10.2-1_all.deb ...
Unpacking python-urlgrabber (3.10.2-1) ...
Selecting previously unselected package python-rpm.
Preparing to unpack .../7-python-rpm_4.14.1+dfsg1-2_amd64.deb ...
Unpacking python-rpm (4.14.1+dfsg1-2) ...
Selecting previously unselected package python-sqlitecachec.
Preparing to unpack .../8-python-sqlitecachec_1.1.4-1_amd64.deb ...
Unpacking python-sqlitecachec (1.1.4-1) ...
Selecting previously unselected package yum.
Preparing to unpack .../9-yum_3.4.3-3_all.deb ...
Unpacking yum (3.4.3-3) ...
Setting up python-lzma (0.5.3-3) ...
Setting up python-sqlitecachec (1.1.4-1) ...
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.20) ...
Setting up python-pycurl (7.43.0.1-0.2) ...
Setting up python-urlgrabber (3.10.2-1) ...
Setting up python-libxml2 (2.9.4+dfsg1-6.1ubuntu1.7) ...
Setting up libsqlite0 (2.8.17-14fakesync1) ...
Setting up python-rpm (4.14.1+dfsg1-2) ...
Setting up python-sqlite (1.0.1-12) ...
Setting up yum (3.4.3-3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install pyhon-setuptools
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install python-setuptools
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
python-meld3
Use 'sudo apt autoremove' to remove it.
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 233 not upgraded.
Need to get 329 kB of archives.
After this operation, 1,415 kB of additional disk space will be used.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-setuptools all 39.0.1-2 [329 kB]
Fetched 329 kB in 0s (2,936 kB/s)
Selecting previously unselected package python-setuptools.
(Reading database ... 117706 files and directories currently installed.)
Preparing to unpack .../python-setuptools_39.0.1-2_all.deb ...
Unpacking python-setuptools (39.0.1-2) ...
Setting up python-setuptools (39.0.1-2) ...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# easy_install supervisor
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for supervisor
Reading http://mirrors.cloud.aliyuncs.com/pypi/simple/supervisor/
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/3d/47/b4030b2b01f6c559bd528974cee72bee7fe75594b31cc3e064678a454548/supervisor-4.2.4-py2.py3-none-any.whl#sha256=bbae57abf74e078fe0ecc9f30068b6da41b840546e233ef1e659a12e4c875af6
Best match: supervisor 4.2.4
Processing supervisor-4.2.4-py2.py3-none-any.whl
Installing supervisor-4.2.4-py2.py3-none-any.whl to /usr/local/lib/python3.6/dist-packages
Adding supervisor 4.2.4 to easy-install.pth file
Installing echo_supervisord_conf script to /usr/local/bin
Installing pidproxy script to /usr/local/bin
Installing supervisorctl script to /usr/local/bin
Installing supervisord script to /usr/local/bin
Installed /usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg
Processing dependencies for supervisor
Finished processing dependencies for supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# find / -name 'supervisor'
/usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# echo_supervisord_conf > /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# vi /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor/conf.d
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# cd /etc/supervisor/conf.d/
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# ls
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# vim xxfb.conf
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# supervisord-c /etc/supervisor/supervisord.conf
supervisord-c: command not found
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cd /
root@VERDE-SICC-APPLICATION1:/# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/# /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/#
尝试2
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install python-setuptools
Command 'yum' not found, but can be installed with:
apt install yum
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo apt install yum
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-meld3 python-pkg-resources
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libcurl3-gnutls libsqlite0 python-libxml2 python-lzma python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber
Suggested packages:
libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc python-sqlite-dbg
The following NEW packages will be installed:
libcurl3-gnutls libsqlite0 python-libxml2 python-lzma python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber yum
0 upgraded, 10 newly installed, 0 to remove and 233 not upgraded.
Need to get 1,215 kB of archives.
After this operation, 6,223 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.20 [219 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 libsqlite0 amd64 2.8.17-14fakesync1 [160 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python-libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.7 [141 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-lzma amd64 0.5.3-3 [27.9 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-sqlite amd64 1.0.1-12 [20.9 kB]
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-pycurl amd64 7.43.0.1-0.2 [43.1 kB]
Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-urlgrabber all 3.10.2-1 [51.0 kB]
Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-rpm amd64 4.14.1+dfsg1-2 [44.7 kB]
Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python-sqlitecachec amd64 1.1.4-1 [21.4 kB]
Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 yum all 3.4.3-3 [486 kB]
Fetched 1,215 kB in 1s (1,474 kB/s)
Selecting previously unselected package libcurl3-gnutls:amd64.
(Reading database ... 117455 files and directories currently installed.)
Preparing to unpack .../0-libcurl3-gnutls_7.58.0-2ubuntu3.20_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.20) ...
Selecting previously unselected package libsqlite0.
Preparing to unpack .../1-libsqlite0_2.8.17-14fakesync1_amd64.deb ...
Unpacking libsqlite0 (2.8.17-14fakesync1) ...
Selecting previously unselected package python-libxml2.
Preparing to unpack .../2-python-libxml2_2.9.4+dfsg1-6.1ubuntu1.7_amd64.deb ...
Unpacking python-libxml2 (2.9.4+dfsg1-6.1ubuntu1.7) ...
Selecting previously unselected package python-lzma.
Preparing to unpack .../3-python-lzma_0.5.3-3_amd64.deb ...
Unpacking python-lzma (0.5.3-3) ...
Selecting previously unselected package python-sqlite.
Preparing to unpack .../4-python-sqlite_1.0.1-12_amd64.deb ...
Unpacking python-sqlite (1.0.1-12) ...
Selecting previously unselected package python-pycurl.
Preparing to unpack .../5-python-pycurl_7.43.0.1-0.2_amd64.deb ...
Unpacking python-pycurl (7.43.0.1-0.2) ...
Selecting previously unselected package python-urlgrabber.
Preparing to unpack .../6-python-urlgrabber_3.10.2-1_all.deb ...
Unpacking python-urlgrabber (3.10.2-1) ...
Selecting previously unselected package python-rpm.
Preparing to unpack .../7-python-rpm_4.14.1+dfsg1-2_amd64.deb ...
Unpacking python-rpm (4.14.1+dfsg1-2) ...
Selecting previously unselected package python-sqlitecachec.
Preparing to unpack .../8-python-sqlitecachec_1.1.4-1_amd64.deb ...
Unpacking python-sqlitecachec (1.1.4-1) ...
Selecting previously unselected package yum.
Preparing to unpack .../9-yum_3.4.3-3_all.deb ...
Unpacking yum (3.4.3-3) ...
Setting up python-lzma (0.5.3-3) ...
Setting up python-sqlitecachec (1.1.4-1) ...
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.20) ...
Setting up python-pycurl (7.43.0.1-0.2) ...
Setting up python-urlgrabber (3.10.2-1) ...
Setting up python-libxml2 (2.9.4+dfsg1-6.1ubuntu1.7) ...
Setting up libsqlite0 (2.8.17-14fakesync1) ...
Setting up python-rpm (4.14.1+dfsg1-2) ...
Setting up python-sqlite (1.0.1-12) ...
Setting up yum (3.4.3-3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install pyhon-setuptools
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# yum install python-setuptools
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
python-meld3
Use 'sudo apt autoremove' to remove it.
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 233 not upgraded.
Need to get 329 kB of archives.
After this operation, 1,415 kB of additional disk space will be used.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-setuptools all 39.0.1-2 [329 kB]
Fetched 329 kB in 0s (2,936 kB/s)
Selecting previously unselected package python-setuptools.
(Reading database ... 117706 files and directories currently installed.)
Preparing to unpack .../python-setuptools_39.0.1-2_all.deb ...
Unpacking python-setuptools (39.0.1-2) ...
Setting up python-setuptools (39.0.1-2) ...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# easy_install supervisor
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for supervisor
Reading http://mirrors.cloud.aliyuncs.com/pypi/simple/supervisor/
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/3d/47/b4030b2b01f6c559bd528974cee72bee7fe75594b31cc3e064678a454548/supervisor-4.2.4-py2.py3-none-any.whl#sha256=bbae57abf74e078fe0ecc9f30068b6da41b840546e233ef1e659a12e4c875af6
Best match: supervisor 4.2.4
Processing supervisor-4.2.4-py2.py3-none-any.whl
Installing supervisor-4.2.4-py2.py3-none-any.whl to /usr/local/lib/python3.6/dist-packages
Adding supervisor 4.2.4 to easy-install.pth file
Installing echo_supervisord_conf script to /usr/local/bin
Installing pidproxy script to /usr/local/bin
Installing supervisorctl script to /usr/local/bin
Installing supervisord script to /usr/local/bin
Installed /usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg
Processing dependencies for supervisor
Finished processing dependencies for supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# find / -name 'supervisor'
/usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# echo_supervisord_conf > /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# vi /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor/conf.d
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# cd /etc/supervisor/conf.d/
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# ls
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# vim xxfb.conf
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# supervisord-c /etc/supervisor/supervisord.conf
supervisord-c: command not found
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cd /
root@VERDE-SICC-APPLICATION1:/# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/# /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/# supervisorctl status
root@VERDE-SICC-APPLICATION1:/# ps -ef | WebApi.dll
WebApi.dll: command not found
root@VERDE-SICC-APPLICATION1:/# service supervisor restart
Failed to restart supervisor.service: Unit supervisor.service not found.
root@VERDE-SICC-APPLICATION1:/# ps aux | grep supervisor
root 20314 0.0 0.2 71324 22376 ? Ss 00:05 0:00 /usr/bin/python3 /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
root 20327 0.0 0.0 14428 1008 pts/1 S+ 00:09 0:00 grep --color=auto supervisor
root@VERDE-SICC-APPLICATION1:/# reboot
SSH 120.77.144.195: session closed
Press any key to reconnect
SSH Connecting to 120.77.144.195
SSH Host key fingerprint:
SSH ecdsa-sha2-nistp256 Swa/e2Yyt2pKjMsO/wA+sjXJYnFiNkrTt38OAdVADiY=
SSH Trying saved password
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-101-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* Super-optimized for small spaces - read how we shrank the memory
footprint of MicroK8s to make it the smallest full K8s around.
https://ubuntu.com/blog/microk8s-memory-optimisation
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Welcome to Alibaba Cloud Elastic Compute Service !
Last login: Thu Sep 8 15:27:06 2022 from 114.238.67.21
root@VERDE-SICC-APPLICATION1:~# cd /usr/local/wwwroot/XXFB/
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# dotnet WebApi.dll
Hosting environment: Production
Content root path: /usr/local/wwwroot/XXFB
Now listening on: http://172.16.0.220:6557
Application started. Press Ctrl+C to shut down.
^CApplication is shutting down...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo supervisorctl update
error: <class 'FileNotFoundError'>, [Errno 2] No such file or directory: file: /usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg/supervisor/xmlrpc.py line: 560
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# cd /var/
root@VERDE-SICC-APPLICATION1:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run chmod 777 /var/log
chmod: cannot access 'chmod': No such file or directory
chmod: cannot access '777': No such file or directory
root@VERDE-SICC-APPLICATION1:/var# chmod 777 log
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/log
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///tmp/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# touch /var/log/supervisord.log
root@VERDE-SICC-APPLICATION1:/var# touch /var/run//supervisord.pid
root@VERDE-SICC-APPLICATION1:/var# mkdir /etc/supervisor/conf.d
mkdir: cannot create directory ‘/etc/supervisor/conf.d’: File exists
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///tmp/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# cat /etc/supervisor/supervisord.conf
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
; - Command will be truncated if it looks like a config file comment, e.g.
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
;
; Warning:
; Paths throughout this example file use /tmp because it is available on most
; systems. You will likely need to change these to locations more appropriate
; for your system. Some systems periodically delete older files in /tmp.
; Notably, if the socket file defined in the [unix_http_server] section below
; is deleted, supervisorctl will be unable to connect to supervisord.
[unix_http_server]
file=/var/run/supervisor.sock ; the path to the socket file
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
; Security Warning:
; The inet HTTP server is not enabled by default. The inet HTTP server is
; enabled by uncommenting the [inet_http_server] section below. The inet
; HTTP server is intended for use within a trusted environment only. It
; should only be bound to localhost or only accessible from within an
; isolated, trusted network. The inet HTTP server does not support any
; form of encryption. The inet HTTP server does not use authentication
; by default (see the username= and password= options to add authentication).
; Never expose the inet HTTP server to the public internet.
;[inet_http_server] ; inet (TCP) server disabled by default
;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
loglevel=info ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false ; start in foreground if true; default false
silent=false ; no logs to stdout if true; default false
minfds=1024 ; min. avail startup file descriptors; default 1024
minprocs=200 ; min. avail process descriptors;default 200
;umask=022 ; process file creation umask; default 022
;user=supervisord ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor ; supervisord identifier, default is 'supervisor'
;directory=/tmp ; default is not to cd during start
;nocleanup=true ; don't clean up tempfiles at start; default false
;childlogdir=/tmp ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value" ; key value pairs to add to environment
;strip_ansi=false ; strip ansi escape codes in logs; def. false
; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
; The supervisorctl section configures how supervisorctl will connect to
; supervisord. configure it match the settings in either the unix_http_server
; or inet_http_server section.
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris ; should be same as in [*_http_server] if set
;password=123 ; should be same as in [*_http_server] if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history ; use readline history if available
; The sample program section below shows all possible program subsection values.
; Create one or more 'real' program: sections to be able to control them under
; supervisor.
;[program:theprogramname]
;command=/bin/cat ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=999 ; the relative start priority (default 999)
;autostart=true ; start at supervisord start (default: true)
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
;startretries=3 ; max # of serial start failures when starting (default 3)
;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT ; signal used to kill process (default TERM)
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
;killasgroup=false ; SIGKILL the UNIX process group (def false)
;user=chrism ; setuid to this UNIX account to run the program
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
;stdout_syslog=false ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false ; emit events on stderr writes (default false)
;stderr_syslog=false ; send stderr to syslog with process name (default false)
;environment=A="1",B="2" ; process environment additions (def no adds)
;serverurl=AUTO ; override serverurl computation (childutils)
; The sample eventlistener section below shows all possible eventlistener
; subsection values. Create one or more 'real' eventlistener: sections to be
; able to handle event notifications sent by supervisord.
;[eventlistener:theeventlistenername]
;command=/bin/eventlistener ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;events=EVENT ; event notif. types to subscribe to (req'd)
;buffer_size=10 ; event buffer queue size (default 10)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=-1 ; the relative start priority (default -1)
;autostart=true ; start at supervisord start (default: true)
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
;startretries=3 ; max # of serial start failures when starting (default 3)
;autorestart=unexpected ; autorestart if exited after running (def: unexpected)
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT ; signal used to kill process (default TERM)
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
;killasgroup=false ; SIGKILL the UNIX process group (def false)
;user=chrism ; setuid to this UNIX account to run the program
;redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
;stdout_syslog=false ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
;stderr_events_enabled=false ; emit events on stderr writes (default false)
;stderr_syslog=false ; send stderr to syslog with process name (default false)
;environment=A="1",B="2" ; process environment additions
;serverurl=AUTO ; override serverurl computation (childutils)
; The sample group section below shows all possible group values. Create one
; or more 'real' group: sections to create "heterogeneous" process groups.
;[group:thegroupname]
;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
;priority=999 ; the relative start priority (default 999)
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.ini
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctlstatus
supervisorctlstatus: command not found
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
For help, use /usr/local/bin/supervisord -h
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.soc
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# cd /run
root@VERDE-SICC-APPLICATION1:/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.soc udev uuidd
root@VERDE-SICC-APPLICATION1:/run# rm -r supervisor.soc
root@VERDE-SICC-APPLICATION1:/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo tmpfiles.d utmp
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid udev uuidd
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid systemd user
root@VERDE-SICC-APPLICATION1:/run# cd /etc/supervisor/conf.d/
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# ls
xxfb.conf
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cat xxfb.conf
[program:WebApi]
command=dotnet WebApi.dll
directory=/usr/local/wwwroot/XXFB # 项目地址
environment=ASPNETCORE__ENVIRONMENT=Production
autostart=true
autorestart=true
startretries=100
user=root
redirect_stderr=true
stdout_logfile=/var/log/xxfb.out.log
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cd /var/run/
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# Unlinking stale socket /var/run/supervisor.sock
Unlinking: command not found
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
Unlinking stale socket /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# rm -r supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo tmpfiles.d utmp
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid udev uuidd
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid systemd user
root@VERDE-SICC-APPLICATION1:/var/run# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
Unlinking stale socket /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var/run# supervisorctl status
WebApi STARTING
root@VERDE-SICC-APPLICATION1:/var/run#
尝试3
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 233 not upgraded.
Need to get 329 kB of archives.
After this operation, 1,415 kB of additional disk space will be used.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-setuptools all 39.0.1-2 [329 kB]
Fetched 329 kB in 0s (2,936 kB/s)
Selecting previously unselected package python-setuptools.
(Reading database ... 117706 files and directories currently installed.)
Preparing to unpack .../python-setuptools_39.0.1-2_all.deb ...
Unpacking python-setuptools (39.0.1-2) ...
Setting up python-setuptools (39.0.1-2) ...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# easy_install supervisor
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for supervisor
Reading http://mirrors.cloud.aliyuncs.com/pypi/simple/supervisor/
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/3d/47/b4030b2b01f6c559bd528974cee72bee7fe75594b31cc3e064678a454548/supervisor-4.2.4-py2.py3-none-any.whl#sha256=bbae57abf74e078fe0ecc9f30068b6da41b840546e233ef1e659a12e4c875af6
Best match: supervisor 4.2.4
Processing supervisor-4.2.4-py2.py3-none-any.whl
Installing supervisor-4.2.4-py2.py3-none-any.whl to /usr/local/lib/python3.6/dist-packages
Adding supervisor 4.2.4 to easy-install.pth file
Installing echo_supervisord_conf script to /usr/local/bin
Installing pidproxy script to /usr/local/bin
Installing supervisorctl script to /usr/local/bin
Installing supervisord script to /usr/local/bin
Installed /usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg
Processing dependencies for supervisor
Finished processing dependencies for supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# find / -name 'supervisor'
/usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# echo_supervisord_conf > /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# vi /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# mkdir /etc/supervisor/conf.d
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# cd /etc/supervisor/conf.d/
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# ls
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# vim xxfb.conf
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# supervisord-c /etc/supervisor/supervisord.conf
supervisord-c: command not found
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cd /
root@VERDE-SICC-APPLICATION1:/# which supervisord
/usr/local/bin/supervisord
root@VERDE-SICC-APPLICATION1:/# /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/# supervisorctl status
root@VERDE-SICC-APPLICATION1:/# ps -ef | WebApi.dll
WebApi.dll: command not found
root@VERDE-SICC-APPLICATION1:/# service supervisor restart
Failed to restart supervisor.service: Unit supervisor.service not found.
root@VERDE-SICC-APPLICATION1:/# ps aux | grep supervisor
root 20314 0.0 0.2 71324 22376 ? Ss 00:05 0:00 /usr/bin/python3 /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
root 20327 0.0 0.0 14428 1008 pts/1 S+ 00:09 0:00 grep --color=auto supervisor
root@VERDE-SICC-APPLICATION1:/# reboot
SSH 120.77.144.195: session closed
Press any key to reconnect
SSH Connecting to 120.77.144.195
SSH Host key fingerprint:
SSH ecdsa-sha2-nistp256 Swa/e2Yyt2pKjMsO/wA+sjXJYnFiNkrTt38OAdVADiY=
SSH Trying saved password
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-101-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* Super-optimized for small spaces - read how we shrank the memory
footprint of MicroK8s to make it the smallest full K8s around.
https://ubuntu.com/blog/microk8s-memory-optimisation
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Welcome to Alibaba Cloud Elastic Compute Service !
Last login: Thu Sep 8 15:27:06 2022 from 114.238.67.21
root@VERDE-SICC-APPLICATION1:~# cd /usr/local/wwwroot/XXFB/
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# dotnet WebApi.dll
Hosting environment: Production
Content root path: /usr/local/wwwroot/XXFB
Now listening on: http://172.16.0.220:6557
Application started. Press Ctrl+C to shut down.
^CApplication is shutting down...
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# sudo supervisorctl update
error: <class 'FileNotFoundError'>, [Errno 2] No such file or directory: file: /usr/local/lib/python3.6/dist-packages/supervisor-4.2.4-py3.6.egg/supervisor/xmlrpc.py line: 560
root@VERDE-SICC-APPLICATION1:/usr/local/wwwroot/XXFB# cd /var/
root@VERDE-SICC-APPLICATION1:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run chmod 777 /var/log
chmod: cannot access 'chmod': No such file or directory
chmod: cannot access '777': No such file or directory
root@VERDE-SICC-APPLICATION1:/var# chmod 777 log
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/log
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///tmp/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# touch /var/log/supervisord.log
root@VERDE-SICC-APPLICATION1:/var# touch /var/run//supervisord.pid
root@VERDE-SICC-APPLICATION1:/var# mkdir /etc/supervisor/conf.d
mkdir: cannot create directory ‘/etc/supervisor/conf.d’: File exists
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///tmp/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# cat /etc/supervisor/supervisord.conf
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
; - Command will be truncated if it looks like a config file comment, e.g.
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
;
; Warning:
; Paths throughout this example file use /tmp because it is available on most
; systems. You will likely need to change these to locations more appropriate
; for your system. Some systems periodically delete older files in /tmp.
; Notably, if the socket file defined in the [unix_http_server] section below
; is deleted, supervisorctl will be unable to connect to supervisord.
[unix_http_server]
file=/var/run/supervisor.sock ; the path to the socket file
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
; Security Warning:
; The inet HTTP server is not enabled by default. The inet HTTP server is
; enabled by uncommenting the [inet_http_server] section below. The inet
; HTTP server is intended for use within a trusted environment only. It
; should only be bound to localhost or only accessible from within an
; isolated, trusted network. The inet HTTP server does not support any
; form of encryption. The inet HTTP server does not use authentication
; by default (see the username= and password= options to add authentication).
; Never expose the inet HTTP server to the public internet.
;[inet_http_server] ; inet (TCP) server disabled by default
;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
loglevel=info ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false ; start in foreground if true; default false
silent=false ; no logs to stdout if true; default false
minfds=1024 ; min. avail startup file descriptors; default 1024
minprocs=200 ; min. avail process descriptors;default 200
;umask=022 ; process file creation umask; default 022
;user=supervisord ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor ; supervisord identifier, default is 'supervisor'
;directory=/tmp ; default is not to cd during start
;nocleanup=true ; don't clean up tempfiles at start; default false
;childlogdir=/tmp ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value" ; key value pairs to add to environment
;strip_ansi=false ; strip ansi escape codes in logs; def. false
; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
; The supervisorctl section configures how supervisorctl will connect to
; supervisord. configure it match the settings in either the unix_http_server
; or inet_http_server section.
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris ; should be same as in [*_http_server] if set
;password=123 ; should be same as in [*_http_server] if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history ; use readline history if available
; The sample program section below shows all possible program subsection values.
; Create one or more 'real' program: sections to be able to control them under
; supervisor.
;[program:theprogramname]
;command=/bin/cat ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=999 ; the relative start priority (default 999)
;autostart=true ; start at supervisord start (default: true)
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
;startretries=3 ; max # of serial start failures when starting (default 3)
;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT ; signal used to kill process (default TERM)
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
;killasgroup=false ; SIGKILL the UNIX process group (def false)
;user=chrism ; setuid to this UNIX account to run the program
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
;stdout_syslog=false ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false ; emit events on stderr writes (default false)
;stderr_syslog=false ; send stderr to syslog with process name (default false)
;environment=A="1",B="2" ; process environment additions (def no adds)
;serverurl=AUTO ; override serverurl computation (childutils)
; The sample eventlistener section below shows all possible eventlistener
; subsection values. Create one or more 'real' eventlistener: sections to be
; able to handle event notifications sent by supervisord.
;[eventlistener:theeventlistenername]
;command=/bin/eventlistener ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;events=EVENT ; event notif. types to subscribe to (req'd)
;buffer_size=10 ; event buffer queue size (default 10)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=-1 ; the relative start priority (default -1)
;autostart=true ; start at supervisord start (default: true)
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
;startretries=3 ; max # of serial start failures when starting (default 3)
;autorestart=unexpected ; autorestart if exited after running (def: unexpected)
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT ; signal used to kill process (default TERM)
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
;killasgroup=false ; SIGKILL the UNIX process group (def false)
;user=chrism ; setuid to this UNIX account to run the program
;redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
;stdout_syslog=false ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
;stderr_events_enabled=false ; emit events on stderr writes (default false)
;stderr_syslog=false ; send stderr to syslog with process name (default false)
;environment=A="1",B="2" ; process environment additions
;serverurl=AUTO ; override serverurl computation (childutils)
; The sample group section below shows all possible group values. Create one
; or more 'real' group: sections to create "heterogeneous" process groups.
;[group:thegroupname]
;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
;priority=999 ; the relative start priority (default 999)
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.ini
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctlstatus
supervisorctlstatus: command not found
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
root@VERDE-SICC-APPLICATION1:/var# supervisord -c /etc/supervisor/supervisord.conf
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
For help, use /usr/local/bin/supervisord -h
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.soc
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# vim /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# chmod 777 /var/run
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock refused connection
root@VERDE-SICC-APPLICATION1:/var# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var# supervisorctl status
unix:///var/run/supervisor.sock no such file
root@VERDE-SICC-APPLICATION1:/var# cd /run
root@VERDE-SICC-APPLICATION1:/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.soc udev uuidd
root@VERDE-SICC-APPLICATION1:/run# rm -r supervisor.soc
root@VERDE-SICC-APPLICATION1:/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo tmpfiles.d utmp
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid udev uuidd
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid systemd user
root@VERDE-SICC-APPLICATION1:/run# cd /etc/supervisor/conf.d/
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# ls
xxfb.conf
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cat xxfb.conf
[program:WebApi]
command=dotnet WebApi.dll
directory=/usr/local/wwwroot/XXFB # 项目地址
environment=ASPNETCORE__ENVIRONMENT=Production
autostart=true
autorestart=true
startretries=100
user=root
redirect_stderr=true
stdout_logfile=/var/log/xxfb.out.log
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/etc/supervisor/conf.d# cd /var/run/
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# Unlinking stale socket /var/run/supervisor.sock
Unlinking: command not found
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
Unlinking stale socket /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# rm -r supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo tmpfiles.d utmp
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid udev uuidd
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid systemd user
root@VERDE-SICC-APPLICATION1:/var/run# touch /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
Unlinking stale socket /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# ls
agetty.reload chronyd.pid crond.pid initctl log NetworkManager redis sendsigs.omit.d squid.pid sudo systemd user
atd.pid cloud-init crond.reboot initramfs motd.dynamic nginx.pid resolvconf shm sshd supervisord.pid tmpfiles.d utmp
chrony console-setup dbus lock mount plymouth rsyslogd.pid squid sshd.pid supervisor.sock udev uuidd
root@VERDE-SICC-APPLICATION1:/var/run# unlink /var/run/supervisor.sock
root@VERDE-SICC-APPLICATION1:/var/run# supervisord -c /etc/supervisor/supervisord.conf
root@VERDE-SICC-APPLICATION1:/var/run# supervisorctl status
WebApi STARTING
root@VERDE-SICC-APPLICATION1:/var/run# cd /usr/l
lib/ local/
root@VERDE-SICC-APPLICATION1:/var/run# cd /usr/lib/
root@VERDE-SICC-APPLICATION1:/usr/lib# ls
accountsservice dbus-1.0 gnupg language-selector modules-load.d pptpd sasl2 systemd x86_64-linux-gnu
apt dpkg gnupg2 libsqlite.so.0 networkd-dispatcher pyshared sendmail systemtap
bfd-plugins eject gold-ld libsqlite.so.0.8.6 nginx python2.7 sftp-server sysusers.d
binfmt.d emacsen-common groff linux openssh python3 squid tar
chrony emqx grub linux-boot-probes os-prober python3.6 squid3 tasksel
cloud-init environment.d grub-legacy locale os-probes python3.7 ssl tc
cnf-update-db file initramfs-tools lsb os-release python3.8 sudo tmpfiles.d
command-not-found gcc kernel man-db pm-utils rpm sysctl.d ubuntu-release-upgrader
compat-ld gettext klibc mime pppd rsyslog sysstat valgrind
root@VERDE-SICC-APPLICATION1:/usr/lib# cd /systemd
-bash: cd: /systemd: No such file or directory
root@VERDE-SICC-APPLICATION1:/usr/lib# cd systemd
root@VERDE-SICC-APPLICATION1:/usr/lib/systemd# ls
boot catalog scripts tests user user-environment-generators user-generators user-preset
root@VERDE-SICC-APPLICATION1:/usr/lib/systemd# cd /
root@VERDE-SICC-APPLICATION1:/# ls
bin dev home initrd.img.old lib64 media opt root sbin swapfile tmp var vmlinuz.old
boot etc initrd.img lib lost+found mnt proc run srv sys usr vmlinuz
root@VERDE-SICC-APPLICATION1:/# sudo cp /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
root@VERDE-SICC-APPLICATION1:/# cd /etc/systemd/system/
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# ls
aegis.service CmsGoAgent.service graphical.target.wants ntp-systemd-netif.path sysinit.target.wants
aliyun.service dbus-org.freedesktop.network1.service multi-user.target.wants rc-local.service syslog.service
AssistDaemon.service dbus-org.freedesktop.resolve1.service network-online.target.wants redis.service systemd-resolved.service.wants
chronyd.service default.target.wants network-pre.target.wants sockets.target.wants timers.target.wants
cloud-init.target.wants getty.target.wants ntp.service sshd.service
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# vim rc-local.service
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# cd /etc/
root@VERDE-SICC-APPLICATION1:/etc# ls
adduser.conf cron.monthly gshadow- libnl-3 mysql profile.d security terminfo
adjtime crontab gss locale.alias nanorc protocols selinux timezone
alternatives cron.weekly hdparm.conf locale.gen netplan python sensors3.conf tmpfiles.d
apm dbus-1 host.conf localtime network python2.7 sensors.d ucf.conf
apparmor debconf.conf hostname logcheck networkd-dispatcher python3 services udev
apparmor.d debian_version hosts login.defs NetworkManager python3.6 shadow ufw
apt default hosts.allow logrotate.conf networks rc0.d shadow- updatedb.conf
at.deny deluser.conf hosts.deny logrotate.d newt rc1.d shells update-manager
bash.bashrc depmod.d init.d lsb-release nginx rc2.d skel update-motd.d
bash_completion dhcp initramfs-tools ltrace.conf nsswitch.conf rc3.d squid vim
bash_completion.d dpkg inputrc machine-id ntp.conf rc4.d ssh vtrgb
bindresvport.blacklist emacs iproute2 magic opt rc5.d ssl wgetrc
binfmt.d emqx issue magic.mime os-release rc6.d subgid X11
ca-certificates environment issue.net mailcap pam.conf rc.local subgid- xdg
ca-certificates.conf fonts kernel mailcap.order pam.d rcS.d subuid yum
calendar fstab kernel-img.conf manpath.config passwd redis subuid- zsh_command_not_found
chatscripts fuse.conf ldap mime.types passwd- resolvconf sudoers
chrony gai.conf ld.so.cache mke2fs.conf perl resolv.conf sudoers.d
cloud groff ld.so.conf modprobe.d pm rmt supervisor
console-setup group ld.so.conf.d modules popularity-contest.conf rpc sysctl.conf
cron.d group- legal modules-load.d ppp rsyslog.conf sysctl.d
cron.daily grub.d libaudit.conf motd pptpd.conf rsyslog.d sysstat
cron.hourly gshadow libibverbs.d mtab profile securetty systemd
root@VERDE-SICC-APPLICATION1:/etc# systemctl enable supervisord
Failed to enable unit: Unit file supervisord.service does not exist.
root@VERDE-SICC-APPLICATION1:/etc# cd /etc/systemd/system/
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# vim supervisord.service
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# systemctl enable supervisord
Created symlink /etc/systemd/system/multi-user.target.wants/supervisord.service → /etc/systemd/system/supervisord.service.
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# Created symlink /etc/systemd/system/multi-user.target.wants/supervisord.service → /etc/systemd/system/supervisord.service.
Created: command not found
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# systemctl enable supervisord
root@VERDE-SICC-APPLICATION1:/etc/systemd/system# systemctl is-enabled supervisord
enabled
root@VERDE-SICC-APPLICATION1:/etc/systemd/system#
尝试5
- 要找到supervisor的安装位置,配置文件一定要对,最后发现一个换行问题,坑!
[Unit]
Description=Supervisor daemon
[Service]
Type=forking
ExecStart=/usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecStop=/usr/local/bin/supervisorctl shutdown
ExecReload=/usr/local/bin/supervisorctl reload
KillMode=process Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
网友评论