大维子 2020-05-07 18:47 采纳率: 0%
浏览 926

springboot+rabbitMQ+SSL整合,使用tls-gen生成证书,一直报如下错误!

想使用springboot+rabbitMQ+SSL整合,做一个demo,目前搭建环境是网上搜的tls-gen生成的证书,报错信息如下

报错展示1

2020-05-07 18:39:58.009  WARN 16696 --- [TaskExecutor-20] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2020-05-07 18:39:58.009  INFO 16696 --- [TaskExecutor-20] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer@13607d: tags=[{}], channel=null, acknowledgeMode=AUTO local queue size=0
2020-05-07 18:39:58.010  INFO 16696 --- [TaskExecutor-21] o.s.a.r.c.CachingConnectionFactory       : Attempting to connect to: [192.168.150.133:5671]

报错展示2

Failed to check/redeclare auto-delete queue(s). org.springframework.amqp.Amq

报错展示3

org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Co

好多种报错,一直没有找到原因

springboot配置类

server:
  port: 9002
spring:
  application:
    name: qt-mqServer-dev
  rabbitmq:
    host: 192.168.150.133
    port: 5671
    username: admin
    password: admin
    publisher-confirms: true
    ssl:
      enabled: true
      key-store: file:client_key.p12
      key-store-password: 123456
      trust-store: file:server.keystore
      trust-store-password: abcdef
#      algorithm: TLSv1.2
#      key-store-type: PKCS12
#      trust-store-type: JKS
#      validate-server-certificate: true
#      verify-hostname: true
logging.level.org.springframework.boot.autoconfigure: ERROR

由于项目中MQ要连接外网,安全考虑,添加SSL安全验证,所以在本地做了demo测试,但是一直都是报错.

找到答案了
将verify-hostname: true改为false就行了

  • 写回答

1条回答 默认 最新

  • dabocaiqq 2020-09-25 16:54
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
  • ¥15 找一个网络防御专家,外包的
  • ¥100 能不能让两张不同的图片md5值一样,(有尝)
  • ¥15 informer代码训练自己的数据集,改参数怎么改
  • ¥15 请看一下,学校实验要求,我需要具体代码
  • ¥50 pc微信3.6.0.18不能登陆 有偿解决问题
  • ¥20 MATLAB绘制两隐函数曲面的交线
  • ¥15 求TYPCE母转母转接头24PIN线路板图
  • ¥100 国外网络搭建,有偿交流
  • ¥15 高价求中通快递查询接口