Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用docker compse方式部署openspg,server容器启动报错(Unknown database ‘openspg’) #441

Closed
qzbqzb opened this issue Dec 28, 2024 · 1 comment

Comments

@qzbqzb
Copy link

qzbqzb commented Dec 28, 2024

2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - sun.java.launcher=SUN_STANDARD
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - sun.jnu.encoding=UTF-8
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - sun.management.compiler=HotSpot 64-Bit Tiered Compilers
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - sun.os.patch.level=unknown
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - user.dir=/
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - user.home=/root
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - user.language=en
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - user.name=root
2024-12-28 15:55:11,644 [] [] [main] INFO c.a.o.s.a.s.EnvironmentPropertiesPrinter - user.timezone=Asia/Shanghai
2024-12-28 15:55:11,648 [] [] [main] INFO c.a.o.a.s.Application - Started Application in 12.65 seconds (JVM running for 13.46)
2024-12-28 15:55:11,744 [] [] [main] INFO c.a.o.a.s.Application - OpenSPG Application Started!!!
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - ___ ____ ____ ____
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - / _ \ _ __ ___ _ __ / || _ \ / |
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - | | | | '
\ / _ \ '
\
| |
) | | _
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - | || | |) | / | | |) | __/| || |
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - _/| ./ ___|| ||/|| _|
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - |_|
2024-12-28 15:55:11,745 [] [] [main] INFO c.a.o.a.s.Application - * Running on http://127.0.0.1:8887
2024-12-28 15:55:11,746 [] [] [main] INFO c.a.o.a.s.Application - * Running on http://172.21.0.4:8887
2024-12-28 15:55:12,065 [] [] [pool-2-thread-1] ERROR c.a.o.s.c.s.l.i.RdbDistributeLockServiceImpl - clean time out lock fail
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'openspg'

The error may exist in class path resource [mapper/SysLockDOMapper.xml]

The error may involve com.antgroup.openspg.server.infra.dao.mapper.SysLockDOMapper.selectByExample

The error occurred while executing a query

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'openspg'

    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:78)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
    at com.sun.proxy.$Proxy94.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57)
    at com.sun.proxy.$Proxy113.selectByExample(Unknown Source)
    at com.antgroup.openspg.server.infra.dao.repository.common.SysLockRepositoryImpl.queryAllLock(SysLockRepositoryImpl.java:38)
    at com.antgroup.openspg.server.infra.dao.repository.common.SysLockRepositoryImpl$$FastClassBySpringCGLIB$$cd96e635.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
    at com.antgroup.openspg.server.infra.dao.repository.common.SysLockRepositoryImpl$$EnhancerBySpringCGLIB$$f22c797f.queryAllLock(<generated>)
    at com.antgroup.openspg.server.common.service.lock.impl.RdbDistributeLockServiceImpl.removeTimeOutLock(RdbDistributeLockServiceImpl.java:73)
    at com.antgroup.openspg.server.common.service.lock.impl.RdbDistributeLockServiceImpl.lambda$init$0(RdbDistributeLockServiceImpl.java:48)
@qzbqzb
Copy link
Author

qzbqzb commented Dec 28, 2024

已解决,定位原因是mysql容器缺少/var/lib/mysql路径的权限,导致创建openspg数据库失败

@qzbqzb qzbqzb closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant