centos 7下安装配置dubbo-admin

1、安装好tomcat之后,

下载并且编译最新的dubbo-admin 如图:

1、修改WEB-INF中的dubbo.properties

dubbo.registry.address=zookeeper://192.168.1.87:2181//zookeeper的地址

dubbo.admin.root.password=root
dubbo.admin.guest.password=guest

2、删除原tomcat/webapps/ROOT目录下的所有文件,同时复制dubbo-admin解压后的内容到tomcat/webapps/ROOT中

3、启动tomcat

4、访问对应的ip地址

如果出现:

 INFO context.InheritableListableBeanFactory - Destroying singletons in com.alibaba.[email protected]55af05cd: defining beans [org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,com.alibaba.citrus.service.configuration.support.PropertyPlaceholderConfigurer#0,templateService,mappingRuleService,dataResolverService,exceptionPipeline,resourceLoadingService,messageSource,uriBrokerService,restfulRewrite,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dubbo-admin,com.alibaba.dubbo.config.RegistryConfig,registryService,configService,consumerService,overrideService,ownerService,providerService,routeService,userService,governanceCache,productionModeSensiblePostProcessor,webxConfiguration,requestContexts,com.alibaba.citrus.service.requestcontext.impl.RequestContextBeanFactoryPostProcessor#0,uploadService,pullService,formService,module.screen.Error404,module.screen.ErrorOther,moduleLoaderService,messageResourceService,com.alibaba.citrus.webx.context.WebxComponentsLoader$WebxComponentsCreator]; root of factory hierarchy
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 exception 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.factory.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)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: 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.factory.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:117)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:479)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
    ... 34 more
Caused by: org.springframework.beans.factory.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.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
    ... 44 more
Caused by: 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.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801)

这些错误

原来是我用的jdk版本太高,jdk8, dubbo默认用的spring版本比较旧,冲突导致,作如下修改即可

1、webx的依赖改为3.1.6版;

<dependency>
        <groupId>com.alibaba.citrus</groupId>
        <artifactId>citrus-webx-all</artifactId>
        <version>3.1.6</version>
    </dependency>

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

 <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
    </dependency>

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

<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>${project.parent.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

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

  <!--<dependency>-->
        <!--<groupId>org.springframework</groupId>-->
        <!--<artifactId>spring</artifactId>-->
    <!--</dependency>-->

重新编译dubbo放tomcat运行,成功启动!

时间: 2024-08-29 21:16:25

centos 7下安装配置dubbo-admin的相关文章

centos 7下安装配置zookeeper

一.安装好java 二.配置 zookeeper: 1.创建 /usr/local/services/zookeeper 文件夹:     mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/services/zookeeper 目录中:     cd /usr/local/services/zookeeper 3.下载 zookeeper-3.4.9.tar.gz:     wget https://mirrors.tuna.tsin

CentOS系统下安装配置ftp服务

安装配置步骤: rpm -ivh /opt/bak/vsftpd-2.2.2-11.el6.x86_64.rpm --本地安装vsftpd ll /etc/vsftpd/  --查看vsftpd的配置文件 里面一共有四个配置文件: vsftpd.conf 为主配置文件, ftpusers为黑名单用户配置文件,通常我们的系统用户还有根用户都是放在这个配置文件里面的,因为这些用户的权限很大,如果使用ftp服务可能造成一些问题, user_list为用户列表文件(可以通过在配置文件vsftpd.con

centos 7下安装配置nginx

安装所需环境 Nginx 是 C语言 开发,建议在 Linux 上运行,当然,也可以安装 Windows 版本,本篇则使用 CentOS 7 作为安装环境. 一. gcc 安装安装 nginx 需要先将官网下载的源码进行编译,编译依赖 gcc 环境,如果没有 gcc 环境,则需要安装: yum install gcc-c++ 二. PCRE pcre-devel 安装PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表

CentOS 7下安装配置proftpd搭建ftp服务器

proftpd全称:Professional FTP daemon,是针对Wu-FTP的弱项而开发的,除了改进的安全性,还具备许多Wu-FTP没有的特点,能以Stand-alone.xinetd模式运行等.ProFTP已经成为继Wu-FTP之后最为流行的FTP服务器软件,越来越多的站点选用它构筑安全高效的FTP站点,ProFTP配置方便,并有MySQL和Quota模块可供选择,利用它们的完美结合可以实现非系统账号的管理和用户磁盘的限制.<摘抄百度百科> 本章通过下载源码的方式安装,可以到官网下

Centos服务器下安装配置SSL

https是一个安全的访问方式,数据在传输过程中是加密的,https基于ssl. 一.安装apache和ssl模块 1.安装apache #yum install httpd 2.安装ssl模块 #yum install mod_ssl 重启apache: #service httpd restart 安装完mod_ssl会创建一个默认的SSL证书,路径位于/etc/pki/tls,此时可以立即通过https访问服务器了: https://X.X.X.X/ 如果不使用默认的证书,也可以使用ope

CentOS 7下安装配置FTP

安装vsftpd yum install -y vsftpd 编辑ftp配置文件 vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO #anonymous_enable=YES chroot_local_user=YES #去掉前面的注释 #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd/chroot_list #不受限制的用户列表,用不用都OK allow_writeable_chroot=YE

Linux centos 下安装配置SVN服务器

centos服务器上安装配置SVN(subversion),其实是很简单的,只是有些时候在配置的过程中有个别细节如果不注意,会容易造成访问不了的情况. 网上这类的讲解很多,下面的步骤整体上都是不变的,会加一点自己遇到的问题的解决过程和方法. ------------------------------------------------------------------------------------- 在线安装方法: 1,查看当前是否已经安装了SVN: #rpm -qa | grep s

阿里云服务器centos下安装配置svn服务器

阿里云服务器centos下安装配置svn服务器 1.安装svn服务器端 yum install subversion      从镜像下载安装svn服务器端中间会提示是否ok,输入y,确认安装成功提示:.....complete!依次执行如下命令:cd /usr/local/              //进入目录,准备创建svn目录 mkdir svnRepo                   //创建一个svn目录 chmod -R 777 svnRepo            //修改目

Linux下安装配置Nexus

一.安装和运行nexus 1.下载nexus:http://www.sonatype.org/nexus/go 可选择tgz和zip格式,以及war,选择tgz或zip时不同版本可能在启动时存在一定问题,可能是因为jdk版本问题,若无法启动请选择2.5或更早的版本 注:nexus 2.6版本之后不再支持jdk1.6 2.安装nexus 若下载war,则将其放置tomcat下的webapp目录中,改名为nexus,运行tomcat服务,即可访问http://localhost:8081/nexus