Chat2DB Web version server-side installation, deployment and startup process

Directory

  • Preface
  • Installation and deployment process
    • Download the installation package
    • Download JDK17
    • start up
    • Log in
  • Possible errors
    • Startup error: Java version is low
    • flyway bean creation failed
    • Login failed
    • Unable to execute binary file

Foreword

Chat2DB is a database connection tool. It mainly uses JDBC for database connection, and also connects to several chat AI websites to integrate the database and AI. It is more convenient than using the traditional tool Navicat and going to AI to check separately.
The official website can be used directly on the client, or it can be deployed on the server and accessed through a browser. However, I searched for a long time and couldn’t find the deployment method of the Web version. So I just wrote an article about the installation, deployment, and startup process of the Web version. It may not necessarily be It is suitable for everyone, because everyone’s environment, software and hardware are different, it is for reference only.

Installation and deployment process

Download the installation package

Official website address https://chat2db.ai/zh
Click web download, scan the pop-up QR code on WeChat, and the browser download will be triggered.

The downloaded package is called chat2db-server-start.zip

Upload to the Linux server and unzip it, mine is centos7

cd /home
mkdir chat2db
# Upload files in sftp window
unzip chat2db-server-start.zip
cd chat2db

Download JDK17

My system is x86_64, download the corresponding jdk117, otherwise an error will be reported at startup, saying that the jdk version is not working.
Download the location wherever you want. I want to save trouble and download to the current directory.

wget https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_linux-x64_bin.tar.gz
tar -xvf openjdk-17.0.1_linux-x64_bin.tar.gz

If you don’t want to change the original java environment variables, don’t change them. Just use /home/chat2db/jdk-17.0.1/bin/java -version to test

Start

Start, specify the lib folder
-Dchatgpt.apiKey is the key of chatgpt, but in actual use, it is found that filling it in is useless. It is better to get the gateway address of ChatDB. It may be possible to change the query behavior through out-of-warranty configuration. -Dchatgpt.apiKey can be deleted and done. If it is configured outside the package, just write the key directly into the configuration file.

nohup /home/chat2db/jdk-17.0.1/bin/java -jar -Dloader.path=lib -Dchatgpt.apiKey=This needs to be replaced with the chatgpt key chat2db-server-start.jar & amp;

Started successfully

The final directory structure is as follows

Login

The beginning of the log prints The startup port is: 10821

Enter ip:10821 in the browser and enter the page

Possible errors

Startup error: Java version is low

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/PropertiesLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)

The solution is to install jdk17. You don’t have to change the environment variables. Just specify the path to 17 when starting.

Flyway bean creation failed

2023-10-31 13:36:39.468 INFO 18584 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration .88 : | H2 console available at '/h2'. Database available at 'jdbc:h2:~ /.chat2db/db/chat2db_dev'

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Validate failed: Migrations have failed validation
Migration checksum mismatch for migration version 1.0.0
->Applied to database: 1103295346
-> Resolved locally : -1991637693
Either revert the changes to the migration, or run repair to update the schema history.
Detected applied migration not resolved locally: 1.0.0.1.
If you removed this migration intentionally, run repair to mark the migration as deleted.
Detected applied migration not resolved locally: 1.0.1.
If you removed this migration intentionally, run repair to mark the migration as deleted.
Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294)
        at ai.chat2db.server.start.Application.main(Application.java:72)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)
Caused by: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation
Migration checksum mismatch for migration version 1.0.0
->Applied to database: 1103295346
-> Resolved locally : -1991637693
Either revert the changes to the migration, or run repair to update the schema history.
Detected applied migration not resolved locally: 1.0.0.1.
If you removed this migration intentionally, run repair to mark the migration as deleted.
Detected applied migration not resolved locally: 1.0.1.
If you removed this migration intentionally, run repair to mark the migration as deleted.
Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE
        at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:146)
        at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:190)
        at org.flywaydb.core.Flyway.migrate(Flyway.java:140)
        at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
        ... 26 common frames omitted


One of the possible reasons is that the script that was half initialized before affects subsequent initialization. You can delete the existing content and start again.

The file location of h2 in the log is ~/.chat2db/db/chat2db_dev. You can delete the file in this path and restart it.

cd ~/.chat2db/db/
ll
rm -rf chat2db_dev.mv.db

Login failed

2023-10-31 14:00:06.170 ERROR 4759 --- [io-10821-exec-5] a.c.s.s.e.EasyControllerExceptionHandler.164: 220e62ae44b043ec826cc3449ab48747 | An unknown exception occurred /api/oauth/login_a:ActionRe sult(success=false, errorCode=common.systemError, errorMessage=An exception occurs, you can view the exception details in the log in the help menu., errorDetail=cn.hutool.crypto.CryptoException: SecurityException: JCE cannot authenticate the provider BC
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:105)
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.<init>(DefaultHMacEngine.java:56)
        at cn.hutool.crypto.digest.mac.MacEngineFactory.createEngine(MacEngineFactory.java:42)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:86)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:74)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:63)
        at cn.hutool.jwt.signers.HMacJWTSigner.<init>(HMacJWTSigner.java:28)
        at cn.hutool.jwt.signers.JWTSignerUtil.createSigner(JWTSignerUtil.java:239)
        at cn.hutool.jwt.signers.JWTSignerUtil.hs256(JWTSignerUtil.java:36)
        at cn.hutool.jwt.JWT.setKey(JWT.java:126)
        at cn.dev33.satoken.jwt.SaJwtTemplate.generateToken(SaJwtTemplate.java:119)
        at cn.dev33.satoken.jwt.SaJwtTemplate.createToken(SaJwtTemplate.java:109)
        at cn.dev33.satoken.jwt.SaJwtUtil.createToken(SaJwtUtil.java:100)
        at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createTokenValue(StpLogicJwtForStateless.java:60)
        at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createLoginSession(StpLogicJwtForStateless.java:99)
        at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:331)
        at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:293)
        at cn.dev33.satoken.stp.StpUtil.login(StpUtil.java:135)
        at ai.chat2db.server.start.controller.oauth.OauthController.doLogin(OauthController.java:73)
        at ai.chat2db.server.start.controller.oauth.OauthController.login(OauthController.java:63)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at ai.chat2db.server.start.config.interceptor.CorsFilter.doFilter(CorsFilter.java:37)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:76)
        at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:32)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at ai.chat2db.server.start.log.LogOncePerRequestFilter.doFilterInternal(LogOncePerRequestFilter.java:32)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:144)
        at java.base/javax.crypto.Mac.getInstance(Mac.java:272)
        at cn.hutool.crypto.SecureUtil.createMac(SecureUtil.java:1086)
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:95)
        ... 80 more
Caused by: java.lang.IllegalStateException: zip file closed
        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:840)
        at java.base/java.util.zip.ZipFile.getManifestName(ZipFile.java:1066)
        at java.base/java.util.zip.ZipFile$1.getManifestName(ZipFile.java:1125)
        at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:464)
        at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:320)
        at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:263)
        at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:130)
        at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:190)
        at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:218)
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:140)
        ... 83 more
, solutionLink=https://github.com/chat2db/Chat2DB/wiki/Chat2DB, traceId=null), request parameters: {<!-- -->}

cn.hutool.crypto.CryptoException: SecurityException: JCE cannot authenticate the provider BC
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:105)
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.<init>(DefaultHMacEngine.java:56)
        at cn.hutool.crypto.digest.mac.MacEngineFactory.createEngine(MacEngineFactory.java:42)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:86)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:74)
        at cn.hutool.crypto.digest.HMac.<init>(HMac.java:63)
        at cn.hutool.jwt.signers.HMacJWTSigner.<init>(HMacJWTSigner.java:28)
        at cn.hutool.jwt.signers.JWTSignerUtil.createSigner(JWTSignerUtil.java:239)
        at cn.hutool.jwt.signers.JWTSignerUtil.hs256(JWTSignerUtil.java:36)
        at cn.hutool.jwt.JWT.setKey(JWT.java:126)
        at cn.dev33.satoken.jwt.SaJwtTemplate.generateToken(SaJwtTemplate.java:119)
        at cn.dev33.satoken.jwt.SaJwtTemplate.createToken(SaJwtTemplate.java:109)
        at cn.dev33.satoken.jwt.SaJwtUtil.createToken(SaJwtUtil.java:100)
        at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createTokenValue(StpLogicJwtForStateless.java:60)
        at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createLoginSession(StpLogicJwtForStateless.java:99)
        at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:331)
        at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:293)
        at cn.dev33.satoken.stp.StpUtil.login(StpUtil.java:135)
        at ai.chat2db.server.start.controller.oauth.OauthController.doLogin(OauthController.java:73)
        at ai.chat2db.server.start.controller.oauth.OauthController.login(OauthController.java:63)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at ai.chat2db.server.start.config.interceptor.CorsFilter.doFilter(CorsFilter.java:37)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:76)
        at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:32)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at ai.chat2db.server.start.log.LogOncePerRequestFilter.doFilterInternal(LogOncePerRequestFilter.java:32)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:144)
        at java.base/javax.crypto.Mac.getInstance(Mac.java:272)
        at cn.hutool.crypto.SecureUtil.createMac(SecureUtil.java:1086)
        at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:95)
        ... 80 common frames omitted
Caused by: java.lang.IllegalStateException: zip file closed
        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:840)
        at java.base/java.util.zip.ZipFile.getManifestName(ZipFile.java:1066)
        at java.base/java.util.zip.ZipFile$1.getManifestName(ZipFile.java:1125)
        at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:464)
        at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:320)
        at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:263)
        at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:130)
        at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:190)
        at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:218)
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:140)
        ... 83 common frames omitted


Use openjdk, don’t use oracle

Unable to execute binary file

-bash: /home/chat2db/jdk-17.0.1/bin/java: Unable to execute binary file

It may be that the jdk version is wrong, and it needs to correspond to the system.