Mule HTTPS侦听器不会响应 [英] Mule HTTPS Listener won't respond

查看:137
本文介绍了Mule HTTPS侦听器不会响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mule中的HTTPS设置遇到麻烦.我已经在工作和家庭中尝试了全新的Anypoint Installs.我已经检查了每个StackOverflow的每个帖子,每个博客的每个教程,但没有做任何事情.我也尝试过EE和CE运行时.我使用的是最新版的Mule,并且还尝试执行HTTPS入站终结点,但结果相同.这是在我的项目的重要组成部分和刚刚失去了一天试图弄清楚这一点,它的驾驶我疯了...

I have trouble with the HTTPS setup in Mule. I have tried both at work and at home with fresh Anypoint Installs. I have checked every StackOverflow posts every tutorial every blogposts but nothing is doing it. I have also tried EE and CE runtimes. I am using the lastest edition of Mule and also tried doing the HTTPS inbound endpoint but with the same result. This is a major part in my project and have just lost a day trying to figure this out and it's driving me crazy...

我一开始尝试使用自签名证书,但最终我想使用我们购买的SSL证书.

I am trying to use the self signed certificate at first but ultimately I would like to use an SSL certificate we purchased.

我将JRE放在anypoint目录中,并且还从程序文件JRE中尝试过.

I put the JRE in the anypoint directory and also tried from Program Files JRE.

这是我第一次做SSL事情,所以也许我丢失了一些东西,但是这里有:

This is my first time doing SSL stuff so maybe I'm missing something but here goes :

我首先在Admin模式下使用CMD进入我的Jre bin目录.

I first go into my Jre bin directory using CMD in Admin mode.

我按照HTTPS传输参考文档中的描述运行此命令:

I run this command as described in the HTTPS Transport Reference documentation:

keytool -genkey -alias mule -keyalg RSA -keystore keystore.jks

我正确输入了所有信息,并保持两个密码相同以简化所有操作.密码为changeit.

I enter all the informations correctly and keep both passwords the same to simplify everything. The password is changeit.

我还尝试使用FirstName(姓氏)代替输入我在其上运行Anypoint的服务器的IP.

I have also tried instead of FirstName LastName to enter the IP of my server I'm running my Anypoint on.

拥有keystore.jks之后,我将其复制到src/main/resources文件夹中.

After having the keystore.jks, I copy it in my src/main/resources folder.

这是我在Mule中简化的流程.通常,我随后将调用SOAP Web服务或REST Web服务,但我试图将其保持为最简单的方式:

Here is my simplified flow in Mule. Normally I would then call a SOAP webservice or a REST webservice but I am trying to keep this the simplest possible :

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:tls="http://www.mulesoft.org/schema/mule/tls" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/current/mule-tls.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" protocol="HTTPS" host="localhost" port="8080" doc:name="HTTP Listener Configuration">
        <tls:context>
            <tls:key-store path="keystore.jks" password="changeit" keyPassword="changeit"/>
        </tls:context>
    </http:listener-config>
    <flow name="omgHttpsPlzWorkFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <set-payload value="#['Hello']" doc:name="Set Payload"/>
    </flow>
</mule>

然后我使用DHC或Postman(Google Chrome扩展程序)或浏览器直接调用我的监听器 https://localhost:8080/

I then use DHC or Postman (Google Chrome Extensions) or the browser directly to call my listener https://localhost:8080/

我总是得到500或没有响应.在Chrome中,我得到

I always get 500 or no response. In Chrome I get

您的连接不是私有的

Attackers might be trying to steal your information from localhost (for example, passwords, messages, or credit cards). NET::ERR_CERT_AUTHORITY_INVALID

我尝试添加记录器,但控制台中未显示任何内容.

I tried adding loggers but nothing is showing up in the console.

我认为问题可能出在工作中的端口或代理,但现在我在家中尝试同样的结果.

I thought the problem could be with the ports or proxies at work but now I try from home with the same results.

我尝试将端口设置为443,将我的IP作为主机.添加信任库等.什么也没做.我想我只是缺少一些非常简单的东西.

I've tried putting port to 443 putting my ip as host. Adding truststores etc..Nothing is doing it. I think I am simply missing something very small and simple.

我希望有人可以帮助我,因为这是我项目的最后一步,如果它不起作用,我将无法部署它,因为它包含了我想保护的敏感信息.

I hope someone can help me as this is the final step to my project and if it doesn't work I cannot deploy it as it contains sensible information that I want to be secured.

谢谢您的时间

推荐答案

您所做的一切正确.只需首先从浏览器中单击链接 https://localhost:8080/,即可将未签名的证书添加到您的浏览器中本地机器,一切都会正常.之后,您可以使用Postman或DHC来访问您的服务.

You are doing everything correctly. Just click on the link https://localhost:8080/ from your browser first so that you add the unsigned certificate to your local machine and everything will work fine. You can use Postman or DHC to access your service afterwards.

在Chrome中,点击高级"->进入本地主机(不安全)") 在Firefox中,单击我了解风险"->添加例外...

in Chrome click on Advanced -> Proceed to localhost (unsafe)) in Firefox click on I understand the risks -> Add Exception...

这篇关于Mule HTTPS侦听器不会响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆