如何解決docker無法啟動的問題
docker無法啟動問題
由于下載jenkins出現(xiàn)問題TLS handshark timeout
用了網(wǎng)上的一個方法
$ echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
導致docker無法啟動
sudo service docker restart Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. root@zhangyuan7-Lenovo-XiaoXin-700-15ISK:/etc/docker# systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since 四 2018-04-26 14:23:53 CST; 1min 23s ago Docs: https://docs.docker.com Process: 5210 ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE) Main PID: 5210 (code=exited, status=1/FAILURE) 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --tlskey string Path to TLS key file (default "/root/.docker/key.pem") 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --tlsverify Use TLS and verify the remote 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userland-proxy Use userland proxy for loopback traffic (default true) 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userland-proxy-path string Path to the userland proxy binary 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userns-remap string User/Group setting for user namespaces 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: Failed to start Docker Application Container Engine. 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: -v, --version Print version information and quit 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: Run 'dockerd COMMAND --help' for more information on a command. 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: docker.service: Unit entered failed state. 4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: docker.service: Failed with result 'exit-code'.
查閱了網(wǎng)上好多方法,都不對癥,好吧,
只有對比能用的服務(wù)器上面的docker配置看看有什么問題,
終于在/etc/default/中的docker文件,
需要把文件中的最后一行注釋掉
# Here in Debian, this file is sourced by: # - /etc/init.d/docker (sysvinit) # - /etc/init/docker (upstart) # - systemd's docker.service # Use of this file for configuring your Docker daemon is discouraged. # The recommended alternative is "/etc/docker/daemon.json", as described in: # https://docs.docker.com/v1.11/engine/reference/commandline/daemon/#daemon-configuration-file # If that does not suit your needs, try a systemd drop-in file, as described in: # https://docs.docker.com/v1.11/engine/admin/systemd/#custom-docker-daemon-options #DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io"
然后重啟
sudo service docker restart
終于可以了?。?/p>
總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
MySQL系列之十 MySQL事務(wù)隔離實現(xiàn)并發(fā)控制
今天的內(nèi)容就和大家聊一聊MySQL數(shù)據(jù)庫中關(guān)于MySQL事務(wù)隔離實現(xiàn)并發(fā)控制的問題,主要是基于鎖實現(xiàn)控制技術(shù)2021-07-07在windows上安裝不同(兩個)版本的Mysql數(shù)據(jù)庫的教程詳解
這篇文章主要介紹了在windows上安裝不同(兩個)版本的Mysql數(shù)據(jù)庫 ,需要的朋友可以參考下2019-04-04MySQL的的數(shù)據(jù)一致性保障與延遲問題處理
在分布式數(shù)據(jù)庫和高并發(fā)應(yīng)用場景下,數(shù)據(jù)一致性 和 數(shù)據(jù)延遲 是兩個不可忽視的問題,MySQL 作為廣泛使用的關(guān)系型數(shù)據(jù)庫,提供了多種機制來保障數(shù)據(jù)一致性,本文將深入探討 MySQL 如何保障數(shù)據(jù)一致性 以及 應(yīng)對數(shù)據(jù)延遲的策略,需要的朋友可以參考下2025-03-03MySQL 數(shù)據(jù)庫的監(jiān)控方式小結(jié)
本文主要介紹了MySQL 數(shù)據(jù)庫的監(jiān)控方式小結(jié),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2023-04-04MySQL學習筆記之創(chuàng)建、刪除、修改表的方法
這篇文章主要介紹了MySQL學習筆記之創(chuàng)建、刪除、修改表的方法,結(jié)合實例分析了mysql創(chuàng)建表、增加,修改及刪除列、查看表結(jié)構(gòu)、刪除表等基本語法與使用技巧,需要的朋友可以參考下2016-09-09MySQL如何實現(xiàn)快速插入大量測試數(shù)據(jù)
這篇文章主要介紹了MySQL如何實現(xiàn)快速插入大量測試數(shù)據(jù)問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-11-11MySQL與PHP的基礎(chǔ)與應(yīng)用專題之數(shù)據(jù)完整性
MySQL是一個關(guān)系型數(shù)據(jù)庫管理系統(tǒng),由瑞典MySQL?AB?公司開發(fā),屬于?Oracle?旗下產(chǎn)品。MySQL?是最流行的關(guān)系型數(shù)據(jù)庫管理系統(tǒng)之一,本系列將帶你掌握php與mysql的基礎(chǔ)應(yīng)用,本篇從數(shù)據(jù)完整性開始2022-02-02