简体   繁体   English

配置“WebSockets_Config”的连接测试失败。 在 Cloudhub 上的 Web Sockets 连接器部署

[英]Connectivity test failed for config 'WebSockets_Config'. on Web Sockets connector deployment on Cloudhub

I created an app with below global configuration:我创建了一个具有以下全局配置的应用程序:

<websocket:config name="WebSockets_Config" doc:name="WebSockets Config" doc:id="c252cefb-a74d-4f1c-a5f2-fd589ac692ed" >
    <websocket:connection >
        <websocket:server-settings listenerConfig="HTTP_Listener_config" idleSocketTimeout="60"/>
    </websocket:connection>
</websocket:config>
<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="d5e2b3f6-7485-474a-924d-71550194c0e7" basePath="/api">
    <http:listener-connection host="0.0.0.0" port="${http.port}" />
</http:listener-config>

With http.port = 8081使用 http.port = 8081

However, on Cloudhud logs I see an error:但是,在 Cloudhud 日志中我看到一个错误:

Connectivity test failed for config 'WebSockets_Config'. Application deployment will continue. Error was: Server on host 0.0.0.0 and port 8081 is stopped.
org.mule.runtime.api.connection.ConnectionException: Server stopped.
    at com.mulesoft.connectors.ws.internal.connection.FluxCapacitorProvider.validate(FluxCapacitorProvider.java:167)
    at com.mulesoft.connectors.ws.internal.connection.FluxCapacitorProvider.validate(FluxCapacitorProvider.java:60)
    

When I try to connect to it I get当我尝试连接到它时,我得到

Error during WebSocket handshake: Unexpected response code: 403
    

How can I fix this problem?我该如何解决这个问题? I couldn't find the root problem.我找不到根本问题。

That it works locally seems to indicate that the issue is infrastructure related.它在本地工作似乎表明该问题与基础设施相关。 The URL that you are using doesn't go through a Dedicated Load Balancer as the documentation recommends to use the WebSockets connector in CloudHub 1.0.您使用的 URL 没有通过专用负载均衡器 go,因为文档建议在 CloudHub 1.0 中使用 WebSockets 连接器。 The documentation says to use port 8091 which is expected when using a Dedicated Load Balancer.文档说使用专用负载均衡器时预期的端口 8091。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM