easychen / pushdeer

开放源码的无App推送服务,iOS14+扫码即用。亦支持快应用/iOS和Mac客户端、Android客户端、自制设备
Other
4.57k stars 467 forks source link

[Bug]数据库镜像起不来 #132

Closed jjss520 closed 2 years ago

jjss520 commented 2 years ago

pushdeer_redis_1 is up-to-date Recreating pushdeer_mariadb_1 ... error

ERROR: for pushdeer_mariadb_1 Cannot start service mariadb: driver failed programming external connectivity on endpoint pushdeer_mariadb_1 (2998229a2cd546c8ff26c7d114f9e1db550d26a8a5cadab281987e7ae9dd1e74): Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use

ERROR: for mariadb Cannot start service mariadb: driver failed programming external connectivity on endpoint pushdeer_mariadb_1 (2998229a2cd546c8ff26c7d114f9e1db550d26a8a5cadab281987e7ae9dd1e74): Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use ERROR: Encountered errors while bringing up the project. [root@izj6cgfspfgitcx5o80sffz pushdeer]# 好像是数据库镜像不行

easychen commented 2 years ago

3306 端已经被占用了。要么修改 docker-compose 中数据库的端口,要么将宿主机上3306端口的服务停下来。

jjss520 commented 2 years ago

改了数据库端口号,三个镜像成功布置,但pushdeer_app镜像,跑不起来,看日志也没有错误呀,不知道怎么回事

-> Executing /opt/docker/provision/entrypoint.d/05-permissions.sh

-> Executing /opt/docker/provision/entrypoint.d/20-apache.sh

-> Executing /opt/docker/provision/entrypoint.d/20-php-fpm.sh

-> Executing /opt/docker/provision/entrypoint.d/20-php.sh

-> Executing /opt/docker/provision/entrypoint.d/init.sh

Installing dependencies from lock file (including require-dev)

Verifying lock file contents can be installed on current platform.

Nothing to install, update or remove

Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.

Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump

@php artisan package:discover --ansi

Discovered Package: facade/ignition

Discovered Package: fruitcake/laravel-cors

Discovered Package: laravel/sail

Discovered Package: laravel/sanctum

Discovered Package: laravel/tinker

Discovered Package: nesbot/carbon

Discovered Package: nunomaduro/collision

Package manifest generated successfully.

77 packages you are using are looking for funding.

Use the composer fund command to find out more!

Application key set successfully.

Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = pushdeer and table_name = migrations and table_type = 'BASE TABLE')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:705

701▕         // If an exception occurs when attempting to run a query, we'll format the error

702▕         // message to include the bindings with SQL, which will make this exception a

703▕         // lot more helpful to the developer instead of just the database's errors.

704▕         catch (Exception $e) {

➜ 705▕ throw new QueryException(

706▕                 $query, $this->prepareBindings($bindings), $e

707▕             );

708▕         }

709▕     }

  +36 vendor frames 

37 artisan:37

  Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
qiaoyukeji commented 2 years ago

我也报这个错,docker中数据库的端口改成了3316,然后就报错了

app_1      | Package manifest generated successfully.
app_1      | 77 packages you are using are looking for funding.
app_1      | Use the `composer fund` command to find out more!
app_1      | Application key set successfully.
app_1      | 
app_1      |    Illuminate\Database\QueryException 
app_1      | 
app_1      |   SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = pushdeer and table_name = migrations and table_type = 'BASE TABLE')
app_1      | 
app_1      |   at vendor/laravel/framework/src/Illuminate/Database/Connection.php:705
app_1      |     701▕         // If an exception occurs when attempting to run a query, we'll format the error
app_1      |     702▕         // message to include the bindings with SQL, which will make this exception a
app_1      |     703▕         // lot more helpful to the developer instead of just the database's errors.
app_1      |     704▕         catch (Exception $e) {
app_1      |   ➜ 705▕             throw new QueryException(
app_1      |     706▕                 $query, $this->prepareBindings($bindings), $e
app_1      |     707▕             );
app_1      |     708▕         }
app_1      |     709▕     }
app_1      | 
easychen commented 2 years ago

所有数据库端口相关的参数都要同步改。