有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

在CentOS的Spring boot中创建bean时发生java错误

我试图在centos中使用cuebot (opencue),无法在服务器上部署cuebot,出现以下错误:

java -jar build/libs/cuebot.jar --datasource.cue-data-source.jdbc-url=jdbc:postgresql://$DB_HOST/$DB_NAME --datasource.cue-data-source.username=$DB_USER --datasource.cue-data-source.password=$DB_PASS --log.frame-log-root="${CUE_FS_ROOT}/logs"
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.2.1.RELEASE)
    
    Jan 25, 2021 8:42:54 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service [Tomcat]
    Jan 25, 2021 8:42:54 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet engine: [Apache Tomcat/9.0.27]
    Jan 25, 2021 8:42:54 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring embedded WebApplicationContext
    2021-01-25 20:42:58,968 WARN main org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageGrpcServer' defined in class path resource [conf/spring/applicationContext-grpcServer.xml]: Invocation of init method failed; nested exception is java.io.IOException: Failed to bind
    Jan 25, 2021 8:42:59 PM org.apache.catalina.core.StandardService stopInternal
    INFO: Stopping service [Tomcat]
    2021-01-25 20:42:59,043 ERROR main org.springframework.boot.SpringApplication - Application run failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageGrpcServer' defined in class path resource [conf/spring/applicationContext-grpcServer.xml]: Invocation of init method failed; nested exception is java.io.IOException: Failed to bind
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1803)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
            at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
            at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
            at com.imageworks.spcue.CuebotApplication.main(CuebotApplication.java:30)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
            at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
    Caused by: java.io.IOException: Failed to bind
            at io.grpc.netty.NettyServer.start(NettyServer.java:252)
            at io.grpc.internal.ServerImpl.start(ServerImpl.java:163)
            at io.grpc.internal.ServerImpl.start(ServerImpl.java:78)
            at com.imageworks.common.spring.remoting.GrpcServer.start(GrpcServer.java:104)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.j

applicationContext grpcServer。xml


-<beans xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans">


-<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" id="propertyConfigurer">


-<property name="location">

<value>opencue.properties</value>

</property>

</bean>

<!--Run -->



-<bean class="com.imageworks.common.spring.remoting.GrpcServer" id="manageGrpcServer" destroy-method="shutdown" init-method="start">


-<constructor-arg type="java.lang.String" index="0">

<value>cueBotGrpc</value>

</constructor-arg>


-<constructor-arg type="java.lang.String" index="1">

<value>${grpc.cue_port}</value>

</constructor-arg>


-<constructor-arg index="2">


-<props>

<prop key="cue_">com.imageworks.common</prop>

</props>

</constructor-arg>


-<constructor-arg type="java.lang.Integer" index="3">

<value>${grpc.max_message_bytes}</value>

</constructor-arg>

</bean>

</beans>



共 (0) 个答案