halohub/halo:2.8
使用的什么数据库?MySQL 8.x
使用的哪种方式部署?Docker Compose
发生了什么?采用官方docker-compose.yaml(Halo + MySQL)文件,未做任何修改!!!,成功搭建Halo,网站正常访问,没有异常,但看halo容器运行日志和数据库,发现有报错,数据库里面只有一张“extensions”表!!!???
halo容器报错日志在下方(相关日志输出)
数据库表异常如下:
相关日志输出第一处报错处:
2023-08-07T19:18:47.104+08:00 INFO 7 --- [eReconciler-t-1] r.h.a.e.controller.RequestSynchronizer : Started request(class run.halo.app.core.extension.Theme) synchronizer.
2023-08-07T19:18:47.106+08:00 INFO 7 --- [ task-1] run.halo.app.search.IndicesInitializer : Initialized post indices. Usage: StopWatch 'PostIndicesWatch': running time = 854996085 ns; [rebuild] took 854996085 ns = 100%
2023-08-07T19:18:47.367+08:00 WARN 7 --- [rReconciler-t-1] r.h.a.e.controller.DefaultController : Optimistic locking failure when reconciling request: run.halo.app.core.extension.reconciler.UserReconciler-worker-1/Request[name=admin]
2023-08-07T19:19:36.991+08:00 WARN 7 --- [tReconciler-t-1] r.h.a.e.controller.DefaultController : Optimistic locking failure when reconciling request: run.halo.app.core.extension.reconciler.PostReconciler-worker-1/Request[name=5152aea5-c2e8-4717-8bba-2263d46e19d5]
2023-08-07T19:19:37.066+08:00 WARN 7 --- [tReconciler-t-1] r.h.a.e.controller.DefaultController : Optimistic locking failure when reconciling request: run.halo.app.core.extension.reconciler.PostReconciler-worker-1/Request[name=5152aea5-c2e8-4717-8bba-2263d46e19d5]
2023-08-07T19:19:37.864+08:00 INFO 7 --- [tor-tcp-epoll-2] org.wltea.analyzer.dic.Dictionary : 加载扩展停止词典:org/wltea/analyzer/dic/stopword.dic
2023-08-07T19:19:39.360+08:00 ERROR 7 --- [or-http-epoll-3] o.s.w.s.adapter.HttpWebHandlerAdapter : [e4ad11dd-43] 500 Server Error for HTTP POST "/apis/api.console.halo.run/v1alpha1/plugins/install"
java.lang.IllegalArgumentException: `detail` is required
at org.springframework.util.Assert.notNull(Assert.java:204) ~[spring-core-6.0.11.jar:6.0.11]
at org.springframework.web.DefaultErrorResponseBuilder.<init>(DefaultErrorResponseBuilder.java:57) ~[spring-web-6.0.11.jar:6.0.11]
at org.springframework.web.ErrorResponse.builder(ErrorResponse.java:177) ~[spring-web-6.0.11.jar:6.0.11]
附加信息
官方docker-compose文件,未作任何修改: version: "3"
services: halo: image: halohub/halo:2.8 container_name: halo restart: on-failure:3 depends_on: halodb: condition: service_healthy networks: halo_network: volumes:
- ./:/root/.halo2 ports:
- "8090:8090" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"] interval: 30s timeout: 5s retries: 5 start_period: 30s command:
- --spring.r2dbc.url=r2dbc:pool:mysql://halodb:3306/halo
- --spring.r2dbc.username=root MySQL 的密码,请保证与下方 MYSQL_ROOT_PASSWORD 的变量值一致。
- --spring.r2dbc.password=o#DwN&JSa56
- --spring.sql.init.platform=mysql 外部访问地址,请根据实际需要修改
- --halo.external-url=http://localhost:8090/ 初始化的超级管理员用户名
- --halo.security.initializer.superadminusername=admin 初始化的超级管理员密码
-
--halo.security.initializer.superadminpassword=P@88w0rd
halodb: image: mysql:8.0.31 container_name: halodb restart: on-failure:3 networks: halo_network: command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --explicit_defaults_for_timestamp=true volumes:
- ./mysql:/var/lib/mysql
- ./mysqlBackup:/data/mysqlBackup ports:
- "3306:3306" healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"] interval: 3s retries: 5 start_period: 30s environment: 请修改此密码,并对应修改上方 Halo 服务的 SPRING_R2DBC_PASSWORD 变量值
- MYSQL_ROOT_PASSWORD=o#DwN&JSa56
- MYSQL_DATABASE=halo
networks: halo_network:
完整halo容器日志: halo_logs.txt