Files
happy-life-star/backend/logs/emotion-ai-local.log
T
peanut c77352877d feat: 完成Nacos配置优化和WebSocket集成
主要更新:
1. 统一所有微服务端口配置(19000-19008)
2. 为所有服务创建本地/测试/生产三套环境配置
3. 配置Nacos认证密码(本地:Peanut2817*#, 测试/生产:EmotionMuseum2025)
4. 优化网关路由配置,支持负载均衡和WebSocket
5. 新增emotion-websocket模块,支持实时聊天
6. 前端集成WebSocket,替代HTTP轮询
7. 添加配置验证和管理工具脚本

技术特性:
- 完整的环境隔离和服务发现
- WebSocket实时通信支持
- 负载均衡路由配置
- 跨域和安全配置
- 自动重连和心跳检测
2025-07-17 18:10:45 +08:00

103 lines
15 KiB
Plaintext

2025-07-16T09:03:31.799+08:00 WARN 20008 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: Could not initialize Logback Nacos logging from classpath:nacos-logback.xml
2025-07-16T09:03:31.889+08:00 WARN 20008 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: Could not initialize Logback Nacos logging from classpath:nacos-logback.xml
2025-07-16T09:03:32.194+08:00 WARN 20008 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: Could not initialize Logback Nacos logging from classpath:nacos-logback.xml
2025-07-16T09:03:32.196+08:00 INFO 20008 --- [ main] c.alibaba.nacos.client.utils.ParamUtil : [settings] [req-serv] nacos-server port:8848
2025-07-16T09:03:32.196+08:00 INFO 20008 --- [ main] c.alibaba.nacos.client.utils.ParamUtil : [settings] [http-client] connect timeout:1000
2025-07-16T09:03:32.198+08:00 INFO 20008 --- [ main] c.alibaba.nacos.client.utils.ParamUtil : PER_TASK_CONFIG_SIZE: 3000.0
2025-07-16T09:03:32.254+08:00 INFO 20008 --- [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success.
2025-07-16T09:03:32.254+08:00 INFO 20008 --- [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success.
2025-07-16T09:03:32.277+08:00 INFO 20008 --- [ main] c.a.n.c.a.r.identify.CredentialWatcher : null No credential found
2025-07-16 09:03:32 [main] WARN [com.alibaba.nacos.client.logging.NacosLogging] - Load Logback Configuration of Nacos fail, message: Could not initialize Logback Nacos logging from classpath:nacos-logback.xml
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.2)
2025-07-16 09:03:32 [main] INFO [c.a.n.client.config.impl.LocalConfigInfoProcessor] - LOCAL_SNAPSHOT_PATH:/Users/huazhongmin/nacos/config
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [RpcClientFactory] create a new rpc client of 90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda/0x00000001342dba98
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda/0x00000001342dbea8
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Registry connection listener to current client:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$1
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] RpcClient init, ServerListFactory = com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$2
2025-07-16 09:03:32 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Try to connect to server on start up, server: {serverIp = '127.0.0.1', server main port = 8848}
2025-07-16 09:03:32 [main] INFO [c.a.nacos.common.remote.client.grpc.GrpcClient] - grpc client connection server:127.0.0.1 ip,serverPort:9848,grpcTslConfig:{"sslProvider":"OPENSSL","enableTls":false,"mutualAuthEnable":false,"trustAll":false}
2025-07-16 09:03:33 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Success to connect to server [127.0.0.1:8848] on start up, connectionId = 1752627813368_127.0.0.1_62143
2025-07-16 09:03:33 [com.alibaba.nacos.client.remote.worker] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Notify connected event to listeners.
2025-07-16 09:03:33 [com.alibaba.nacos.client.remote.worker] INFO [com.alibaba.nacos.client.config.impl.ClientWorker] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Connected,notify listen context...
2025-07-16 09:03:33 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler
2025-07-16 09:03:33 [main] INFO [com.alibaba.nacos.common.remote.client] - [90a9ad1e-7bf0-4f56-9d87-36c72dbc1d26_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda/0x000000013443efc8
2025-07-16 09:03:33 [main] INFO [com.alibaba.nacos.client.config.impl.Limiter] - limitTime:5.0
2025-07-16 09:03:33 [main] WARN [c.a.cloud.nacos.client.NacosPropertySourceBuilder] - Ignore the empty nacos configuration and get it based on dataId[emotion-ai] & group[DEFAULT_GROUP]
2025-07-16 09:03:33 [main] WARN [c.a.cloud.nacos.client.NacosPropertySourceBuilder] - Ignore the empty nacos configuration and get it based on dataId[emotion-ai.properties] & group[DEFAULT_GROUP]
2025-07-16 09:03:33 [main] WARN [c.a.cloud.nacos.client.NacosPropertySourceBuilder] - Ignore the empty nacos configuration and get it based on dataId[emotion-ai-local.properties] & group[DEFAULT_GROUP]
2025-07-16 09:03:33 [main] INFO [o.s.c.b.c.PropertySourceBootstrapConfiguration] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-emotion-ai-local.properties,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-emotion-ai.properties,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-emotion-ai,DEFAULT_GROUP'}]
2025-07-16 09:03:33 [main] WARN [com.alibaba.nacos.client.logging.NacosLogging] - Load Logback Configuration of Nacos fail, message: Could not initialize Logback Nacos logging from classpath:nacos-logback.xml
2025-07-16 09:03:33 [main] INFO [com.emotionmuseum.ai.AiApplication] - The following 1 profile is active: "local"
2025-07-16 09:03:34 [main] INFO [o.s.d.r.config.RepositoryConfigurationDelegate] - Multiple Spring Data modules found, entering strict repository configuration mode
2025-07-16 09:03:34 [main] INFO [o.s.d.r.config.RepositoryConfigurationDelegate] - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2025-07-16 09:03:34 [main] INFO [o.s.d.r.config.RepositoryConfigurationDelegate] - Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
2025-07-16 09:03:34 [main] INFO [o.springframework.cloud.context.scope.GenericScope] - BeanFactory id=75ad894c-a831-3fef-8183-57bf629af884
2025-07-16 09:03:35 [main] INFO [o.s.boot.web.embedded.tomcat.TomcatWebServer] - Tomcat initialized with port(s): 19002 (http)
2025-07-16 09:03:35 [main] INFO [org.apache.catalina.core.StandardService] - Starting service [Tomcat]
2025-07-16 09:03:35 [main] INFO [org.apache.catalina.core.StandardEngine] - Starting Servlet engine: [Apache Tomcat/10.1.5]
2025-07-16 09:03:35 [main] INFO [o.a.c.core.ContainerBase.[Tomcat].[localhost].[/]] - Initializing Spring embedded WebApplicationContext
2025-07-16 09:03:35 [main] INFO [o.s.b.w.s.c.ServletWebServerApplicationContext] - Root WebApplicationContext: initialization completed in 1976 ms
2025-07-16 09:03:35 [main] DEBUG [o.s.web.filter.ServerHttpObservationFilter] - Filter 'serverHttpObservationFilter' configured for use
2025-07-16 09:03:36 [main] INFO [com.emotionmuseum.common.config.SnowflakeConfig] - 使用MAC地址生成的机器ID: 669
2025-07-16 09:03:36 [main] INFO [com.emotionmuseum.common.config.SnowflakeConfig] - 雪花算法配置完成,使用机器ID: 669
2025-07-16 09:03:36 [main] INFO [c.emotionmuseum.common.util.SnowflakeIdGenerator] - 雪花算法ID生成器初始化完成,机器ID: 669
2025-07-16 09:03:36 [main] DEBUG [c.b.m.e.spring.MybatisSqlSessionFactoryBean] - Registered plugin: 'com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor@422b8438'
2025-07-16 09:03:36 [main] DEBUG [c.b.m.e.spring.MybatisSqlSessionFactoryBean] - Property 'mapperLocations' was not specified.
_ _ |_ _ _|_. ___ _ | _
| | |\/|_)(_| | |_\ |_)||_|_\
/ |
3.5.3.1
2025-07-16 09:03:37 [main] DEBUG [o.s.w.s.m.m.a.RequestMappingHandlerAdapter] - ControllerAdvice beans: 0 @ModelAttribute, 0 @InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2025-07-16 09:03:37 [main] DEBUG [o.s.w.s.m.m.a.RequestMappingHandlerMapping] - 25 mappings in 'requestMappingHandlerMapping'
2025-07-16 09:03:37 [main] DEBUG [o.s.web.servlet.handler.SimpleUrlHandlerMapping] - Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2025-07-16 09:03:37 [main] DEBUG [o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver] - ControllerAdvice beans: 0 @ExceptionHandler, 1 ResponseBodyAdvice
2025-07-16 09:03:38 [main] INFO [o.s.b.actuate.endpoint.web.EndpointLinksResolver] - Exposing 4 endpoint(s) beneath base path '/actuator'
2025-07-16 09:03:38 [main] INFO [o.s.boot.web.embedded.tomcat.TomcatWebServer] - Tomcat started on port(s): 19002 (http) with context path ''
2025-07-16 09:03:38 [main] INFO [com.emotionmuseum.ai.AiApplication] - Started AiApplication in 7.184 seconds (process running for 7.854)
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [o.a.c.core.ContainerBase.[Tomcat].[localhost].[/]] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [org.springframework.web.servlet.DispatcherServlet] - Initializing Servlet 'dispatcherServlet'
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Detected StandardServletMultipartResolver
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Detected AcceptHeaderLocaleResolver
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Detected FixedThemeResolver
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Detected org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@eb62a4b
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Detected org.springframework.web.servlet.support.SessionFlashMapManager@323186f9
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [org.springframework.web.servlet.DispatcherServlet] - Completed initialization in 3 ms
2025-07-16 09:03:58 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - GET "/actuator/health", parameters={}
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [com.zaxxer.hikari.HikariDataSource] - HikariPool-1 - Starting...
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [com.zaxxer.hikari.pool.HikariPool] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@41120a95
2025-07-16 09:03:58 [http-nio-19002-exec-1] INFO [com.zaxxer.hikari.HikariDataSource] - HikariPool-1 - Start completed.
2025-07-16 09:03:59 [http-nio-19002-exec-1] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Using 'application/vnd.spring-boot.actuator.v3+json', given [*/*] and supported [application/vnd.spring-boot.actuator.v3+json, application/vnd.spring-boot.actuator.v2+json, application/json]
2025-07-16 09:03:59 [http-nio-19002-exec-1] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Writing [org.springframework.boot.actuate.health.SystemHealth@5be85732]
2025-07-16 09:03:59 [http-nio-19002-exec-1] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Completed 200 OK
2025-07-16 09:04:12 [http-nio-19002-exec-2] DEBUG [org.springframework.web.servlet.DispatcherServlet] - GET "/actuator/health", parameters={}
2025-07-16 09:04:12 [http-nio-19002-exec-2] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Using 'application/vnd.spring-boot.actuator.v3+json', given [*/*] and supported [application/vnd.spring-boot.actuator.v3+json, application/vnd.spring-boot.actuator.v2+json, application/json]
2025-07-16 09:04:12 [http-nio-19002-exec-2] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Writing [org.springframework.boot.actuate.health.SystemHealth@2065d61c]
2025-07-16 09:04:12 [http-nio-19002-exec-2] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Completed 200 OK
2025-07-16 09:04:31 [http-nio-19002-exec-4] DEBUG [org.springframework.web.servlet.DispatcherServlet] - GET "/ai/actuator/health", parameters={}
2025-07-16 09:04:31 [http-nio-19002-exec-4] DEBUG [o.s.web.servlet.handler.SimpleUrlHandlerMapping] - Mapped to ResourceHttpRequestHandler [classpath [META-INF/resources/], classpath [resources/], classpath [static/], classpath [public/], ServletContext [/]]
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [c.e.common.interceptor.UserContextInterceptor] - 设置用户上下文: userId=guest_1901232820, requestUri=/ai/actuator/health
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [o.s.w.servlet.resource.ResourceHttpRequestHandler] - Resource not found
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [c.e.common.interceptor.UserContextInterceptor] - 清除用户上下文: requestUri=/ai/actuator/health
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Completed 404 NOT_FOUND
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [org.springframework.web.servlet.DispatcherServlet] - "ERROR" dispatch for GET "/error", parameters={}
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [o.s.w.s.m.m.a.RequestMappingHandlerMapping] - Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest)
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Using 'application/json', given [*/*] and supported [application/json, application/*+json]
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [o.s.w.s.m.m.annotation.HttpEntityMethodProcessor] - Writing [{timestamp=Wed Jul 16 09:04:32 CST 2025, status=404, error=Not Found, path=/ai/actuator/health}]
2025-07-16 09:04:32 [http-nio-19002-exec-4] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Exiting from "ERROR" dispatch, status 404
2025-07-16 09:46:47 [Thread-1] WARN [c.alibaba.nacos.common.http.HttpClientBeanHolder] - [HttpClientBeanHolder] Start destroying common HttpClient
2025-07-16 09:46:47 [Thread-7] WARN [com.alibaba.nacos.common.notify.NotifyCenter] - [NotifyCenter] Start destroying Publisher
2025-07-16 09:46:47 [Thread-7] WARN [com.alibaba.nacos.common.notify.NotifyCenter] - [NotifyCenter] Destruction of the end
2025-07-16 09:46:47 [Thread-1] WARN [c.alibaba.nacos.common.http.HttpClientBeanHolder] - [HttpClientBeanHolder] Destruction of the end
2025-07-16 09:46:48 [SpringApplicationShutdownHook] INFO [com.zaxxer.hikari.HikariDataSource] - HikariPool-1 - Shutdown initiated...
2025-07-16 09:46:48 [SpringApplicationShutdownHook] INFO [com.zaxxer.hikari.HikariDataSource] - HikariPool-1 - Shutdown completed.