centos7 安装dubbo-admin管理遇到的问题总结

具体的安装过程,网上一堆。这里说明一下我安装过程中遇到的问题。

一、dubbo-admin-2.5.4-SNAPSHOT.war包的问题,由于linux系统下安装的是jdk1.8版本,所以要解决jdk1.8版本的问题。

如果嫌麻烦,只好将linux下的jdk环境配置成1.7的,错误内容如下:

ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com.alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exception is org.springframework.beans.fact
ory.BeanCreationException: Error creating bean with name 'server': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType'
is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)


如果非要使用jdk1.8,那么网络上提供的办法是修改dubbo-admin  的pom配置文件


1、webx的依赖改为3.1.6版;

    
        com.alibaba.citrus
        citrus-webx-all
        3.1.6
    

2、添加velocity的依赖,我用了1.7;

    
        org.apache.velocity
        velocity
        1.7
    

3、对依赖项dubbo添加exclusion,避免引入旧spring

    
        com.alibaba
        dubbo
        ${project.parent.version}
        
            
                org.springframework
                spring
            
        
    

4、webx已有spring 3以上的依赖,因此注释掉dubbo-admin里面的spring依赖

    
        
        
    

确定war包解压后lib目录没有spring 3 以下的依赖就行。然后运行正常了。



二、映射配置错误,在启动tomcat的时候,会出现这样的错误。

 INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : initialization starting.
 INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : set path '/templates/common/'
 INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : initialization complete.
 INFO rule.ExtensionMappingRule - Initialized extension.input:ExtensionMappingRule with cache disabled
 INFO rule.ExtensionMappingRule - Initialized extension.output:ExtensionMappingRule with cache disabled
 INFO rule.DirectModuleMappingRule - Initialized action:DirectModuleMappingRule with cache disabled
 INFO rule.DirectModuleMappingRule - Initialized screen.notemplate:DirectModuleMappingRule with cache disabled
 INFO rule.FallbackModuleMappingRule - Initialized screen:FallbackModuleMappingRule with cache enabled
 INFO rule.DirectTemplateMappingRule - Initialized screen.template:DirectTemplateMappingRule with cache disabled
 INFO rule.FallbackTemplateMappingRule - Initialized layout.template:FallbackTemplateMappingRule with cache enabled
 INFO rule.DirectModuleMappingRule - Initialized control.notemplate:DirectModuleMappingRule with cache disabled
 INFO rule.FallbackModuleMappingRule - Initialized control:FallbackModuleMappingRule with cache enabled
 INFO rule.DirectTemplateMappingRule - Initialized control.template:DirectTemplateMappingRule with cache disabled
 INFO zkclient.ZkEventThread - Starting ZkClient event thread.

解决办法:

root账户  修改  vi /etc/hosts 配置文件,查看IP映射的别名是否错误。

到tomcat 的webapps 的ROOT/WEB-INF/dubbo.properties文件,查看配置的IP是否一致

最后查看zoo.cfg里面配置的server.1=jet-02:2888:3888(红色映射的别名是否与hosts配置文件的别名对应上)。


三、设置duboo-admin-tomcat与zookeeper开机启动


root账户  vi /ect/rc.local  添加(jet为你的用户名称)

su - jet -c '/home/jet/softfix/zookeeper/zookeeper-3.4.9/bin/zkServer.sh start'
su - jet -c '/home/jet/softfix/dubbo-admin-tomcat/bin/startup.sh'
  


你可能感兴趣的:(socket编程)