我一直在尝试使用wso2 esb配置一个简单的pass through代理,它指向https端口中的REST服务。
我曾尝试使用我的开发机器(Windows 7)做同样的事情,但它很成功。
但是当我尝试在生产服务器中重复相同的操作时,在RHEL中,我在系统日志中出现The system cannot infer the transport information
错误。
尝试的事情
CURL
至https://some.domain.in/something/something,并正确显示回复<parameter name="HostnameVerifier">AllowAll</parameter>
醇>
错误消息
test
时,收到以下消息:无效地址
CURL
代理服务网址,并获得Empty response
检查系统日志并查看以下日志
我错过了什么吗?
答案 0 :(得分:2)
我可以在wso2-error-logs中看到消息
ERROR {org.apache.synapse.transport.passthru.TargetHandler} - I/O
error: handshake alert: unrecognized_name
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
然后我意识到我在本地使用 java 1.6 但在生产中使用 1.7 。 在 Java 1.7 中,SSL处理有一些变化
The JDK 7 release supports
the Server Name Indication (SNI) extension in the JSSE client. SNI,
described in RFC 4366 enables TLS clients to connect to virtual
servers.
为了绕过这个,我在wso2server.sh中添加了JAVA_OPTS="-Djsse.enableSNIExtension=false"
并重新启动。
这解决了我的问题。 不确定这是否是正确的方法
This url终于帮助了我