root 非常抱歉,实在是没能复现。
背景:
- CentOS 7.6
- 使用 https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm 的包安装的 mysql-server-5.7
- MySQL 没有做任何配置,除了修改默认的 root 密码。
- Docker 容器构建命令:
docker run -it -d --name halo -p 8090:8090 -v ~/.halo:/root/.halo --restart=always --net=host halohub/halo
- 数据库创建命令:
create database halodb character set utf8mb4 collate utf8mb4_bin;
- 服务器是在 digitalocean 新开的机器。
配置文件:
server:
port: 8090
# Response data gzip.
compression:
enabled: false
spring:
datasource:
# H2 database configuration.
#driver-class-name: org.h2.Driver
#url: jdbc:h2:file:~/.halo/db/halo
#username: admin
#password: 123456
# MySQL database configuration.
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password:
# H2 database console configuration.
h2:
console:
settings:
web-allow-others: false
path: /h2-console
enabled: false
halo:
# Your admin client path is https://your-domain/{admin-path}
admin-path: admin
# memory or level
cache: memory
日志:
[root@centos-s-1vcpu-1gb-nyc1-01 .halo]# docker logs halo
__ __ __
/ / / /___ _/ /___
/ /_/ / __ `/ / __ \
/ __ / /_/ / / /_/ /
/_/ /_/\__,_/_/\____/
Version: 1.4.7
2021-03-26 10:11:23.683 INFO 7 --- [ main] run.halo.app.Application : Starting Application v1.4.7 using Java 11.0.10 on centos-s-1vcpu-1gb-nyc1-01 with PID 7 (/application/BOOT-INF/classes started by root in /application)
2021-03-26 10:11:23.717 INFO 7 --- [ main] run.halo.app.Application : No active profile set, falling back to default profiles: default
2021-03-26 10:11:29.654 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-03-26 10:11:30.515 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 811 ms. Found 22 JPA repository interfaces.
2021-03-26 10:11:35.799 INFO 7 --- [ main] org.eclipse.jetty.util.log : Logging initialized @17591ms to org.eclipse.jetty.util.log.Slf4jLog
2021-03-26 10:11:36.895 INFO 7 --- [ main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8090
2021-03-26 10:11:36.923 INFO 7 --- [ main] org.eclipse.jetty.server.Server : jetty-9.4.36.v20210114; built: 2021-01-14T16:44:28.689Z; git: 238ec6997c7806b055319a6d11f8ae7564adc0de; jvm 11.0.10+9
2021-03-26 10:11:37.097 INFO 7 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring embedded WebApplicationContext
2021-03-26 10:11:37.098 INFO 7 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 12937 ms
2021-03-26 10:11:38.422 INFO 7 --- [ main] run.halo.app.config.HaloConfiguration : Halo cache store load impl : [class run.halo.app.cache.InMemoryCacheStore]
2021-03-26 10:11:39.912 INFO 7 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-03-26 10:11:40.240 INFO 7 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.28.Final
2021-03-26 10:11:41.610 INFO 7 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-03-26 10:11:42.349 INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-03-26 10:11:43.511 INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-03-26 10:11:43.699 INFO 7 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
2021-03-26 10:11:53.316 INFO 7 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-03-26 10:11:53.366 INFO 7 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-03-26 10:11:58.771 INFO 7 --- [ main] org.eclipse.jetty.server.session : DefaultSessionIdManager workerName=node0
2021-03-26 10:11:58.772 INFO 7 --- [ main] org.eclipse.jetty.server.session : No SessionScavenger set, using defaults
2021-03-26 10:11:58.775 INFO 7 --- [ main] org.eclipse.jetty.server.session : node0 Scavenging every 660000ms
2021-03-26 10:11:58.811 INFO 7 --- [ main] o.e.jetty.server.handler.ContextHandler : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@1d07d728{application,/,[file:///tmp/jetty-docbase.8090.12587981809050615185/, jar:file:/application/BOOT-INF/lib/springfox-swagger-ui-3.0.0.jar!/META-INF/resources],AVAILABLE}
2021-03-26 10:11:58.818 INFO 7 --- [ main] org.eclipse.jetty.server.Server : Started @40618ms
2021-03-26 10:12:07.928 INFO 7 --- [ main] run.halo.app.handler.file.FileHandlers : Registered 9 file handler(s)
2021-03-26 10:12:13.692 INFO 7 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-03-26 10:12:16.260 INFO 7 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2021-03-26 10:12:16.365 INFO 7 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 4 endpoint(s) beneath base path '/api/admin/actuator'
2021-03-26 10:12:16.642 INFO 7 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-03-26 10:12:16.645 INFO 7 --- [ main] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-03-26 10:12:16.648 INFO 7 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 3 ms
2021-03-26 10:12:16.737 INFO 7 --- [ main] o.e.jetty.server.AbstractConnector : Started ServerConnector@d25e878{HTTP/1.1, (http/1.1)}{0.0.0.0:8090}
2021-03-26 10:12:16.740 INFO 7 --- [ main] o.s.b.web.embedded.jetty.JettyWebServer : Jetty started on port(s) 8090 (http/1.1) with context path '/'
2021-03-26 10:12:16.876 INFO 7 --- [ main] run.halo.app.Application : Started Application in 56.192 seconds (JVM running for 58.676)
2021-03-26 10:12:16.878 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Starting migrate database...
2021-03-26 10:12:17.285 INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 7.5.1 by Redgate
2021-03-26 10:12:17.422 INFO 7 --- [ main] o.f.c.i.database.base.DatabaseType : Database: jdbc:mysql://127.0.0.1:3306/halodb (MySQL 5.7)
2021-03-26 10:12:17.676 INFO 7 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Repair of failed migration in Schema History table `halodb`.`flyway_schema_history` not necessary as table doesn't exist.
2021-03-26 10:12:17.788 INFO 7 --- [ main] o.f.core.internal.command.DbRepair : Successfully repaired schema history table `halodb`.`flyway_schema_history` (execution time 00:00.152s).
2021-03-26 10:12:17.893 INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 7.5.1 by Redgate
2021-03-26 10:12:18.176 INFO 7 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 4 migrations (execution time 00:00.062s)
2021-03-26 10:12:18.406 INFO 7 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table `halodb`.`flyway_schema_history` with baseline ...
2021-03-26 10:12:18.728 INFO 7 --- [ main] o.f.core.internal.command.DbBaseline : Successfully baselined schema with version: 1
2021-03-26 10:12:18.744 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema `halodb`: 1
2021-03-26 10:12:18.845 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema `halodb` to version "2 - migrate 1.2.0-beta.1 to 1.2.0-beta.2"
2021-03-26 10:12:19.069 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema `halodb` to version "3 - migrate 1.3.0-beta.1 to 1.3.0-beta.2"
2021-03-26 10:12:19.414 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema `halodb` to version "4 - migrate 1.3.0-beta.2 to 1.3.0-beta.3"
2021-03-26 10:12:19.496 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Successfully applied 3 migrations to schema `halodb` (execution time 00:00.761s)
2021-03-26 10:12:19.531 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Migrate database succeed.
2021-03-26 10:12:19.533 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Created backup directory: [/tmp/halo-backup]
2021-03-26 10:12:19.543 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Created data export directory: [/tmp/halo-data-export]
2021-03-26 10:12:20.157 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo started at http://127.0.0.1:8090
2021-03-26 10:12:20.158 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo admin started at http://127.0.0.1:8090/admin
2021-03-26 10:12:20.158 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo has started successfully!
2021-03-26 10:16:38.422 WARN 7 --- [ Timer-0] run.halo.app.cache.AbstractCacheStore : Cache key: [cache_lock_login_auth] has been expired
部分截图:
安装好的:http://157.230.191.193:8090