PGYER / codefever

CodeFever 是完全免费开源的 Git 代码托管服务,支持一行命令安装到自己服务器!CodeFever Community Edition (A Self-hosted Git Services)!
https://codefever.cn
MIT License
2.69k stars 281 forks source link

最新版docker部署报错 #182

Closed yangliuchang closed 1 year ago

yangliuchang commented 1 year ago

系统环境:Ubuntu22.04.2 Docker version 24.0.5, build ced0996

logs:

Failed to allocate manager object, freezing.

ERROR 2002 (HY000): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) stty: standard input: Inappropriate ioctl for device Enter current password for root (enter for none): stty: standard input: Inappropriate ioctl for device

yangliuchang commented 1 year ago

完整log: `root@vultr:~# docker container logs codefever -f await system initializing... [!!!!!!] Failed to allocate manager object, freezing.

Start post initialization... Generateing public key for ssh ... Generating public/private rsa key pair. Created directory '/home/git/.ssh'. Your identification has been saved in /home/git/.ssh/id_rsa. Your public key has been saved in /home/git/.ssh/id_rsa.pub. The key fingerprint is: SHA256:mEiw6b2VB4hfCUQ88lDgvuilvuI92BU+Pq/MQEA+Cd0 git@72a2591eb667 The key's randomart image is: +---[RSA 2048]----+ |.ooB= | |+.==Eo . | | ==+o.+ | | oo+.+ = | | o.= S | | ... . | |. +o+ . | |o.+o+o | |+*...++. | +----[SHA256]-----+ Redirecting to /bin/systemctl restart sshd.service Failed to get D-Bus connection: No such file or directory Failed to get D-Bus connection: No such file or directory Starting service: SSH authorized key sync ... Service started: SSH authorized key sync Starting service: SSH authorized key sync ... Service started: HTTP gateway Failed to get D-Bus connection: No such file or directory Starting php-fpm done Failed to get D-Bus connection: No such file or directory Starting nginx daemon: . Redirecting to /bin/systemctl start crond.service Failed to get D-Bus connection: No such file or directory Redirecting to /bin/systemctl start sendmail.service Failed to get D-Bus connection: No such file or directory Note: Forwarding request to 'systemctl enable mariadb.service'. Failed to get D-Bus connection: No such file or directory Note: Forwarding request to 'systemctl enable sendmail.service'. Failed to get D-Bus connection: No such file or directory Note: Forwarding request to 'systemctl enable crond.service'. Failed to get D-Bus connection: No such file or directory Start Database Initialization... Installing MariaDB/MySQL system tables in '/var/lib/mysql' ... 2023-08-25 9:49:16 0 [Warning] Can't create test file /var/lib/mysql/72a2591eb667.lower-test 2023-08-25 9:49:16 0 [ERROR] mariadbd: Can't create/write to file './ddl_recovery.log' (Errcode: 13 "Permission denied") 2023-08-25 9:49:16 0 [ERROR] DDL_LOG: Failed to create ddl log file: ./ddl_recovery.log 2023-08-25 9:49:16 0 [ERROR] Aborting

Installation of system tables failed! Examine the logs in /var/lib/mysql for more information.

The problem could be conflicting information in an external my.cnf files. You can ignore these by doing:

shell> /bin/mariadb-install-db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &

and use the command line tool /usr/bin/mariadb to connect to the mysql database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables;

Try 'mysqld --help' if you have problems with paths. Using --general-log gives you a log in /var/lib/mysql that may be helpful.

The latest information about mysql_install_db is available at https://mariadb.com/kb/en/installing-system-tables-mysql_install_db You can find the latest source at https://downloads.mariadb.org and the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report at https://mariadb.org/jira

Redirecting to /bin/systemctl start mariadb.service Failed to get D-Bus connection: No such file or directory

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here.

stty: standard input: Inappropriate ioctl for device Enter current password for root (enter for none): stty: standard input: Inappropriate ioctl for device ERROR 2002 (HY000): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) stty: standard input: Inappropriate ioctl for device Enter current password for root (enter for none): stty: standard input: Inappropriate ioctl for device `