2020年8月5日 星期三

Aug 04, 2020 日誌

設定 cad4 server。修復啟動 uWSGI問題,並設定 cmsimde 隨開機啟動。

修復啟動 uWSGI問題

由於在啟動時出現以下問題:

probably another instance of uWSGI is running on the same address (:8080).

背景有正在執行的 uWSGI 正在使用相同的 port 8080,所以需要先停止執行背景執行的 uWSGI ,再重啟。

先檢查正在執行的 uWSGI 的 pid 代碼,再用 kill 去停止執行

列出所有正在執行的程式,查看 uWSGI 的 pid 代碼:

ps -A

找到相對應的 pid ,用 kill 停止執行

sudo kill pid的號碼

重啟 uWSGI

/usr/bin/uwsgi --emperor /home/s40723150/uwsgi_ini

之後再測試是否可以連上https://[2001:288:6004:17:2020:cad:0:4]:9443

設定 uwsgi service

以管理者身分在 /etc/systemd/system 目錄中建立 cmsimde.service 檔案, 內容如下:

[Unit]
Description=uWSGI to serve CMSiMDE 
After=network.target

[Service]
User=kmol2020
Group=kmol2020
WorkingDirectory=/home/kmol2020/uwsgi_ini
ExecStart=/usr/bin/uwsgi --emperor /home/kmol2020/uwsgi_ini

[Install]
WantedBy=multi-user.target

接著將 cmsimde 服務設為隨系統開機啟動

sudo systemctl enable cmsimde

由於是用 putty 遠端控制,所以就先不重新啟動主機。

沒有留言:

張貼留言

Oct 19, 2020 日誌

看 neural_network_in_python.pdf 安裝 NVIDIA CUDA 10.1 和 cudnn 7.6.5