halo | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.5.jar:6.0.5]
halo | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.5.jar:6.0.5]
halo | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:961) ~[spring-beans-6.0.5.jar:6.0.5]
halo | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917) ~[spring-context-6.0.5.jar:6.0.5]
halo | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[spring-context-6.0.5.jar:6.0.5]
halo | at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.0.3.jar:3.0.3]
halo | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-3.0.3.jar:3.0.3]
halo | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[spring-boot-3.0.3.jar:3.0.3]
halo | at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[spring-boot-3.0.3.jar:3.0.3]
halo | at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) ~[spring-boot-3.0.3.jar:3.0.3]
halo | at run.halo.app.Application.main(Application.java:28) ~[classes/:2.3.0]
halo | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
halo | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
halo | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
halo | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
halo | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[application/:na]
halo | at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) ~[application/:na]
halo | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[application/:na]
halo | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[application/:na]
halo | Caused by: org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection
halo | at org.springframework.r2dbc.connection.ConnectionFactoryUtils.lambda$getConnection$0(ConnectionFactoryUtils.java:90) ~[spring-r2dbc-6.0.5.jar:6.0.5]
halo | at reactor.core.publisher.Mono.lambda$onErrorMap$28(Mono.java:3773) ~[reactor-core-3.5.3.jar:3.5.3]
halo | at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.3.jar:3.5.3]
halo | ... 49 common frames omitted
halo | Caused by: io.r2dbc.postgresql.PostgresqlConnectionFactory$PostgresConnectionException: Cannot connect to 172.19.0.218/<unresolved>:5432
halo | at io.r2dbc.postgresql.PostgresqlConnectionFactory.cannotConnect(PostgresqlConnectionFactory.java:188) ~[r2dbc-postgresql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
halo | at io.r2dbc.postgresql.PostgresqlConnectionFactory.lambda$doCreateConnection$7(PostgresqlConnectionFactory.java:153) ~[r2dbc-postgresql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
halo | at reactor.core.publisher.Mono.lambda$onErrorMap$28(Mono.java:3773) ~[reactor-core-3.5.3.jar:3.5.3]
halo | at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.3.jar:3.5.3]
halo | ... 34 common frames omitted
halo | Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: /172.19.0.218:5432
halo | at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$2.run(AbstractEpollChannel.java:613) ~[netty-transport-classes-epoll-4.1.89.Final.jar:4.1.89.Final]
halo | ... 10 common frames omitted
halo |
halo exited with code 1
halodb | 2023-03-31 13:11:58.495 UTC [62] LOG: checkpoint starting: time
halodb | 2023-03-31 13:12:02.617 UTC [62] LOG: checkpoint complete: wrote 44 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.112 s, sync=0.004 s, total=4.123 s; sync files=12, longest=0.002 s, average=0.001 s; distance=252 kB, estimate=252 kB
配置完成后,输出网址无法进入,麻烦大佬看下配置是否有问题
`version: "3"
services:
halo:
image: halohub/halo:2.3.0
container_name: halo
restart: on-failure:3
depends_on:
halodb:
condition: service_healthy
networks:
halo_network:
volumes:
- ./:/root/.halo2
ports:
- "315:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:315/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command:
- --spring.r2dbc.url=r2dbc:pool:postgresql://ip地址:5432/数据库名称
- --spring.r2dbc.username=数据库用户名
- --spring.r2dbc.password=数据库密码
- --spring.sql.init.platform=postgresql
- --halo.external-url=http://ip地址:315/
- --halo.security.initializer.superadminusername=admin
- --halo.security.initializer.superadminpassword=P@88w0rd
halodb:
image: postgres:latest
container_name: halodb
restart: on-failure:3
networks:
halo_network:
volumes:
- ./db:/var/lib/postgresql/data
ports:
- "624:5432"
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_PASSWORD=数据库密码
- POSTGRES_USER=halo
- POSTGRES_DB=halo
- PGUSER=halo
networks:
halo_network:
`