• Zookeeper、Nginx错误集


    一、Zookeeper

    1. LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation
      原因:jar包冲突.
      解决方法:将zookeeper向上移,我使用的是zkClient,将该依赖移到父项目即可。

    2. No application config found or it‘s not a valid config! Please add <dubbo:application name=“…“ />
      解决方法:
      我使用的jdk是11版本的,dubbo需要用2.71;若是1.8版本,则使用2.7.5

      <dependency>
          <groupId>org.apache.dubbo</groupId>
          <artifactId>dubbo-spring-boot-starter</artifactId>
          <version>2.7.1</version>
      </dependency>
      
      • 1
      • 2
      • 3
      • 4
      • 5

      但是此时又出现一个新错误:
      java.lang.NoClassDefFoundError: org/apache/dubbo/common/Version
      解决方法:将dubbo依赖改为:

      <dependency>
      	<groupId>com.alibaba.boot</groupId>
      	<artifactId>dubbo-spring-boot-starter</artifactId>
      	<version>0.1.0</version>
      </dependency>
      
      • 1
      • 2
      • 3
      • 4
      • 5
    3. 服务启动成功,但是dubbo-admin没有发现服务,后面发现业务层@Service注解导入的包不是dubbo的
      解决方法:@Service注解导dubbo的包

    4. Caused by: java.io.IOException: invalid constant type: 18
      解决方案:
      引入依赖

      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.20.0-GA</version>
      </dependency>
      
      • 1
      • 2
      • 3
      • 4
      • 5
    5. LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Reload4jLoggerFactory loaded from file
      这以下俩个包放在一起就会起冲突

      <!-- 整合dubbo -->
              <dependency>
                  <groupId>io.dubbo.springboot</groupId>
                  <artifactId>spring-boot-starter-dubbo</artifactId>
                  <version>1.0.0</version>
              </dependency>
              <!-- zookeeper -->
              <dependency>
                  <groupId>com.101tec</groupId>
                  <artifactId>zkclient</artifactId>
                  <version>0.11</version>
              </dependency>
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12

      解决方法:将zkClient向上移;而dubbo向消费者和生产者分别注入、向下移均可。

    二、Nginx

    1.错误:‘ngx_http_upstream_srv_conf_t’没有名为‘default_port’的成员
    解决方法:sed -i 's/default_port/no_port/g' /opt/nginx-upstream-fair-master/ngx_http_upstream_fair_module.c
    然后再次make

    2.ERROR - file: process_ctrl.c, line: 288
    原因:配置文件后面不能加注释
    解决方法:去掉注释

  • 相关阅读:
    基于电商平台的商品的关键词文本匹配任务 有代码有数据
    2022年11月华南师范大学计算机信息管理-专科-计算机信息管理课程实验(一)
    Codeforces Round #816 (Div. 2) A - D
    动态负载均衡
    MySQL JDBC编程
    如何在大数据集群中手工增加一个节点
    实现文档AI搜索,提高问题解决效率
    开源两个月总结
    城商行两地三中心存储架构设计实践分享
    【C】自定义类型(二)位段,枚举,联合
  • 原文地址:https://blog.csdn.net/weixin_49076273/article/details/126557198