Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1043

NettyConnector not working with IPv6 address

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.3
    • 1.5.5, 2.1.0
    • Broker
    • None

    Description

      Artemis client doesn't correctly enclose IPv6 address when sending HTTP upgrade packet.

      According to RFC2732 , section 2. Literal IPv6 Address Format in URL's Syntax and HTTP header field definition specification, correct request URL should be enclosed like following one: http://[fe80::56ee:75ff:fe47:c83e]

      Following code snippet creates request for URL http://fe80::56ee:75ff:fe47:c83e

       
      HashMap<String, Object> map = new HashMap<String, Object>(); 
      map.put("host", "fe80::56ee:75ff:fe47:c83e"); 
      map.put("port", "8080"); 
      map.put(TransportConstants.HTTP_UPGRADE_ENABLED_PROP_NAME, true); 
      
      TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), map); 
      ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration); 
       connection = cf.createConnection(); 
      

      This works fine when client connects directly to the server. However it may cause problems when Artemis connects to proxy which expects IPv6 address correctly enclosed.
      Artemis client should detect IPv6 address and enclose it, so it conforms to specification.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmesnil Jeff Mesnil
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: