日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > windows >内容正文

windows

ubuntu系统使用docker gitlab 磁盘空间满问题解决记录

發(fā)布時(shí)間:2024/5/14 windows 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu系统使用docker gitlab 磁盘空间满问题解决记录 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

問(wèn)題

發(fā)現(xiàn)git上傳不了,登錄服務(wù)器,table補(bǔ)齊命令都報(bào)錯(cuò),發(fā)現(xiàn)根目錄磁盤(pán)使用率100%

解決問(wèn)題

問(wèn)題排查:
1.使用排查docker使用空間

docker system df

未見(jiàn)異常

2.清理系統(tǒng)緩存

sudo apt autoremove rm -rf ~/.cache/thumbnails/* sudo rm -rf ~/.local/share/Trash/* ....

等等一頓操作下來(lái),還是100%,reboot
發(fā)現(xiàn)界面都進(jìn)不去了!
屮!

3.進(jìn)入終端
Ctrl+Alt+F2
登錄終端

4.查找大文件夾

sudo du -hsx /* | sort -rh | head -10

一層層找進(jìn)去,在/var/lib/docker/containers目錄發(fā)發(fā)現(xiàn)了一個(gè)日志文件*-json.log占了幾百個(gè)G
我屮艸芔茻!!!!
刪掉,重啟,系統(tǒng)啟動(dòng)正常

but,docker gitlab還是起不來(lái),一直starting

一直報(bào)錯(cuò)…

[+] Running 2/1? Network docker_gitlab_default Created 0.1s? Container gitlab Created 0.1s Attaching to gitlab gitlab | Thank you for using GitLab Docker Image! gitlab | Current version: gitlab-ce=11.1.4-ce.0 gitlab | gitlab | Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file gitlab | And restart this container to reload settings. gitlab | To do it use docker exec: gitlab | gitlab | docker exec -it gitlab vim /etc/gitlab/gitlab.rb gitlab | docker restart gitlab gitlab | gitlab | For a comprehensive list of configuration options please see the Omnibus GitLab readme gitlab | https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md gitlab | gitlab | If this container fails to start due to permission problems try to fix it by executing: gitlab | gitlab | docker exec -it gitlab update-permissions gitlab | docker restart gitlab gitlab | gitlab | Preparing services... gitlab | Starting services... gitlab | Configuring GitLab package... gitlab | /opt/gitlab/embedded/bin/runsvdir-start: line 24: ulimit: pending signals: cannot modify limit: Operation not permitted gitlab | /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system gitlab | JSON file with existing configuration not found inside /opt/gitlab/embedded/nodes. gitlab | Skipping config check. gitlab | gitlab preinstall: gitlab | gitlab preinstall: This node does not appear to be running a database gitlab | gitlab preinstall: Skipping version check, if you think this is an error exit now gitlab | gitlab preinstall: gitlab | Configuring GitLab...

使用docker exec -it gitlab update-permissions等操作,然并nuan~

找到最后持續(xù)輸出的打印如下:

gitlab | ==> /var/log/gitlab/postgresql/current <== gitlab | 2023-02-16_07:24:22.32111 FATAL: lock file "postmaster.pid" is empty gitlab | 2023-02-16_07:24:22.32112 HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash. gitlab | 2023-02-16_07:24:23.32501 FATAL: lock file "postmaster.pid" is empty gitlab | 2023-02-16_07:24:23.32502 HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash. gitlab | 2023-02-16_07:24:24.32886 FATAL: lock file "postmaster.pid" is empty gitlab | 2023-02-16_07:24:24.32887 HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash. gitlab | 2023-02-16_07:24:25.33276 FATAL: lock file "postmaster.pid" is empty gitlab | 2023-02-16_07:24:25.33278 HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.

進(jìn)入docker 容器,在根目錄find這個(gè)文件postmaster.pid,刪之…,重啟容器,一切正常!

切記

磁盤(pán)空間滿先不要不要亂刪東西!!!

一勞永逸解決問(wèn)題

更改docker日志全局設(shè)置

在主機(jī)修改docker配置問(wèn)題,只對(duì)新建docker容器有效。

# 排查Docker容器日志輸出情況 docker inspect --format {{.LogPath}} 容器名/容器ID vim /etc/docker/daemon.json {"registry-mirrors": ["https://mirror.ccs.tencentyun.com","https://10odyesl.mirror.aliyuncs.com"],"log-driver":"json-file","log-opts": {"max-size":"300m", "max-file":"3"} }systemctl restart docker systemctl daemon-reload

更改容器配置(docker-compose)

修改 docker-compose.yml,增加如下配置。yml分級(jí)按兩個(gè)空格縮進(jìn),可以使用在線yml格式校驗(yàn)

logging:driver: "json-file"options:max-size: "50m"max-file: "2

查看配置:docker inspect -f ‘{{.HostConfig.LogConfig}}’ 容器名xxx

參考

Docker日志策略調(diào)整

總結(jié)

以上是生活随笔為你收集整理的ubuntu系统使用docker gitlab 磁盘空间满问题解决记录的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。