سؤال

I have a basic kaazing setup for stomp and its working fine with my webpage which is served up using http. Now I want to connect using SSL (HTTPS) and I've changed all the settings on my web server to do so. Since I did that, browser was not happy making a HTTP (unsecured) connection to Kaazing (I'm fine if there is way around it to just make kaazing work without https as well) and now I'm trying to setup ssl for Kaazing as well. I just appended an 's' to everything and changed tcp: to ssl:. also, generated a keystorefile with my servername. Still in the browser I'm able to reach

https://servername:8000/jms/;e/ct?.kn=6433810530520803

this is the first file Kaazing libraries are trying to reach and the response to this is

https://servername:8000/jms/;e/ut/qJA49SDjQEHLINJVoWe5fHGZqpUYqe6e?.kn=6433810530520803
https://servername:8000/jms/;e/dt/qJA49SDjQEHLINJVoWe5fHGZqpUYqe6e?.kn=6433810530520803

2 more javascript files I'm assuming. But these files are not reachable, getting 404

I understand the question is little vague, please feel free to ask more details if you need. But if anybody has any idea whats going on and whats wrong, please let me know. I would really appreciate the help.

Have no clue how to debug this Kazzing thing nor Websocket connections. Also Not that I'm trying to setup a internal ip-hop based on this document.

Here is my complete gateway-config.xml

هل كانت مفيدة؟

المحلول

Anand,

You have configuration issue. Let me explain it here:

<service>
    <accept>wss://servername:8000/jms</accept>
    <type>stomp.jms</type>
    <properties>
        <connect>tcp://localhost:61613</connect>
        <connection.factory.name>ConnectionFactory</connection.factory.name>
        <context.lookup.topic.format>dynamicTopics/%s</context.lookup.topic.format>
        <context.lookup.queue.format>dynamicQueues/%s</context.lookup.queue.format>
        <env.java.naming.factory.initial>org.apache.activemq.jndi.ActiveMQInitialContextFactory</env.java.naming.factory.initial>
    </properties>
    <accept-options>
        <wss.bind>10.171.131.100:8000</wss.bind>
    </accept-options>
    <cross-site-constraint>
        <allow-origin>https://23.23.23.23:80</allow-origin>
    </cross-site-constraint>
    <cross-site-constraint>
        <allow-origin>https://servername:80</allow-origin>
    </cross-site-constraint>
</service>

Note the last cross-site-constraint, it is https://servername:80 . This won't work. it should be http:servername:80 or https://servername:443 (if you have configured ssl correctly). This explains "2 more javascript files I'm assuming. But these files are not reachable, getting 404".

Alternately, you can relax the cross-site-constraint by putting the following:

   <cross-site-constraint>
    <allow-origin>*</allow-origin>
  </cross-site-constraint>

Once you have it working and your deployment scenario is solid, limit the access by putting a tighter cross-site-constraint.

Hope that helps. Give it a try and update this thread.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top