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

When I install an executable jar package, it doesn't start properly #214

Open
wanglizheng opened this issue Dec 17, 2024 · 2 comments
Open

Comments

@wanglizheng
Copy link

Which Component
spring-ai-alibaba-chat-example -->ChatModel

Describe what problem you have encountered
Add the following information to the pom.xml file, and mavn install a jar package.

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<version>${spring.boot.version}</version>
					<configuration>
						<fork>true</fork>
						<finalName>${project.build.finalName}</finalName>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>repackage</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>

Describe what information you have read
An error occurs when I start the jar package with the following command

nohup java -jar Chat-Model.jar  --spring.config.additional-location=/opt/app/lib/config/application.yml &

Error message:
2024-12-17T20:43:47.983+08:00 WARN 29897 --- [spring-ai-alibaba-dashscope-chat-model-example] [ Thread-1] c.a.n.common.executor.ThreadPoolManager : [ThreadPoolManager] Start destroying ThreadPool
2024-12-17T20:43:47.983+08:00 WARN 29897 --- [spring-ai-alibaba-dashscope-chat-model-example] [ Thread-16] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Start destroying Publisher
2024-12-17T20:43:47.983+08:00 WARN 29897 --- [spring-ai-alibaba-dashscope-chat-model-example] [ Thread-14] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient
2024-12-17T20:43:47.984+08:00 WARN 29897 --- [spring-ai-alibaba-dashscope-chat-model-example] [ Thread-16] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Destruction of the end
2024-12-17T20:43:47.984+08:00 WARN 29897 --- [spring-ai-alibaba-dashscope-chat-model-example] [ Thread-1] c.a.n.common.executor.ThreadPoolManager : [ThreadPoolManager] Destruction of the end
2024-12-17T20:43:53.625+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.nacos.client.logging.NacosLogging : Nacos Logging Adapter Builder: com.alibaba.nacos.logger.adapter.logback12.Log
backNacosLoggingAdapterBuilder
2024-12-17T20:43:53.641+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.nacos.client.logging.NacosLogging : Nacos Logging Adapter Builder: com.alibaba.nacos.logger.adapter.logback14.Log
backNacosLoggingAdapterBuilder
2024-12-17T20:43:53.642+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.nacos.client.logging.NacosLogging : Nacos Logging Adapter: com.alibaba.nacos.logger.adapter.logback14.LogbackNaco
sLoggingAdapter match ch.qos.logback.classic.Logger success.
2024-12-17T20:43:53.662+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.nacos.client.logging.NacosLogging : Nacos Logging Adapter Builder: com.alibaba.nacos.logger.adapter.log4j2.Log4j2
NacosLoggingAdapterBuilder

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \
( ( )__ | '_ | '| | ' / ` | \ \
/ )| |)| | | | | || (| | ) ) ) )
' || .__|| ||| |_, | / / / /
=========||==============|/=////

:: Spring Boot :: (v3.4.0)

2024-12-17T20:43:54.041+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] .c.a.e.c.d.DashScopeChatModelApplication : Starting DashScopeChatModelApplication using Java 17.0.0.1 with PID 12370 (/o
pt/app/lib/Chat-Model.jar started by root in /opt/app/lib)
2024-12-17T20:43:54.044+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] .c.a.e.c.d.DashScopeChatModelApplication : No active profile set, falling back to 1 default profile: "default"
2024-12-17T20:43:55.303+08:00 WARN 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.cloud.nacos.NacosConfigAutoConfiguration' of type [com.alib
aba.cloud.nacos.NacosConfigAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [nacosAnnotationProcessor] is declar
ed through a non-static factory method on that class; consider declaring it as static instead.
2024-12-17T20:43:55.313+08:00 WARN 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] trationDelegate$BeanPostProcessorChecker : Bean 'nacosConfigProperties' of type [com.alibaba.cloud.nacos.NacosConfigProp
erties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [nacosAnnotationProcessor]?
Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE.
2024-12-17T20:43:55.449+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.aut
h.impl.NacosClientAuthServiceImpl success.
2024-12-17T20:43:55.450+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.aut
h.ram.RamClientAuthServiceImpl success.
2024-12-17T20:43:55.453+08:00 WARN 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] trationDelegate$BeanPostProcessorChecker : Bean 'nacosConfigManager' of type [com.alibaba.cloud.nacos.NacosConfigManager
] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [nacosAnnotationProcessor]? Check
the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE.
2024-12-17T20:43:55.733+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 10000 (http)
2024-12-17T20:43:55.748+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-12-17T20:43:55.748+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.33]
2024-12-17T20:43:55.796+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-12-17T20:43:55.797+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1690 ms
2024-12-17T20:43:58.226+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.c.a.AbstractAbilityControlManager : Ready to get current node abilities...
2024-12-17T20:43:58.232+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.c.a.AbstractAbilityControlManager : Ready to initialize current node abilities, support modes: [SDK_CLIENT]
2024-12-17T20:43:58.233+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.c.a.AbstractAbilityControlManager : Initialize current abilities finish...
2024-12-17T20:43:58.235+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] c.a.n.c.a.d.NacosAbilityManagerHolder : [AbilityControlManager] Successfully initialize AbilityControlManager
2024-12-17T20:43:58.708+08:00 WARN 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh atte
mpt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurablePromptTemplateFactory' defined in class path resource [com/alibaba/cloud/ai/autoconfigure/prompt/PromptTemplateAutoConfiguration
.class]: ErrCode:403, ErrMsg:http error, code=403,msg=user not found!,dataId=spring.ai.alibaba.configurable.prompt,group=DEFAULT_GROUP,tenant=
2024-12-17T20:43:58.715+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2024-12-17T20:43:58.746+08:00 INFO 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-12-17T20:43:58.777+08:00 ERROR 12370 --- [spring-ai-alibaba-dashscope-chat-model-example] [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurablePromptTemplateFactory' defined in class path resource [com/alibaba/cloud/ai/autoconfigure/prompt/PromptTemplateAutoConfiguration.clas
s]: ErrCode:403, ErrMsg:http error, code=403,msg=user not found!,dataId=spring.ai.alibaba.configurable.prompt,group=DEFAULT_GROUP,tenant=
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:288) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1122) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1093) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1030) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) ~[spring-context-6.2.0.jar!/:6.2.0]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.0.jar!/:6.2.0]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.0.jar!/:3.4.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.0.jar!/:3.4.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.0.jar!/:3.4.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.0.jar!/:3.4.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.0.jar!/:3.4.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.0.jar!/:3.4.0]
at com.alibaba.cloud.ai.example.chat.dashscope.DashScopeChatModelApplication.main(DashScopeChatModelApplication.java:33) ~[!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[Chat-Model.jar:na]
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[Chat-Model.jar:na]
at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[Chat-Model.jar:na]
Caused by: java.lang.RuntimeException: ErrCode:403, ErrMsg:http error, code=403,msg=user not found!,dataId=spring.ai.alibaba.configurable.prompt,group=DEFAULT_GROUP,tenant=
at com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor.handleMethodNacosConfigListener(NacosAnnotationProcessor.java:298) ~[spring-alibaba-nacos-config-2023.0.1.3.jar!/:2023.0.1.3]
at com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor.handleMethodAnnotation(NacosAnnotationProcessor.java:606) ~[spring-alibaba-nacos-config-2023.0.1.3.jar!/:2023.0.1.3]
at com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor.postProcessAfterInitialization(NacosAnnotationProcessor.java:108) ~[spring-alibaba-nacos-config-2023.0.1.3.jar!/:2023.0.1.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:439) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1805) ~[spring-beans-6.2.0.jar!/:6.2.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.2.0.jar!/:6.2.0]
... 24 common frames omitted
Caused by: com.alibaba.nacos.api.exception.NacosException: http error, code=403,msg=user not found!,dataId=spring.ai.alibaba.configurable.prompt,group=DEFAULT_GROUP,tenant=
at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfigInner(ClientWorker.java:1194) ~[nacos-client-2.4.2.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:1153) ~[nacos-client-2.4.2.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:474) ~[nacos-client-2.4.2.jar!/:na]
at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:188) ~[nacos-client-2.4.2.jar!/:na]
at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:99) ~[nacos-client-2.4.2.jar!/:na]
at com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor.getGroupKeyContent(NacosAnnotationProcessor.java:71) ~[spring-alibaba-nacos-config-2023.0.1.3.jar!/:2023.0.1.3]
at com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor.handleMethodNacosConfigListener(NacosAnnotationProcessor.java:207) ~[spring-alibaba-nacos-config-2023.0.1.3.jar!/:2023.0.1.3]
... 29 common frames omitted

[root@bogon lib]#

@wanglizheng
Copy link
Author

@yuluo-yx
Thinks for help~

@yuluo-yx
Copy link
Collaborator

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

2 participants