Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2681

Malformed URL exception while deploying Samza on a pure IPv6 VM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Pure IPv6 deployment

    Description

      In our product we are expanding our support for IPv6 environment. 
      We earlier tested deploying Samza in a dual stack environment, and it worked fine.
      Recently we got our hands on a pure IPv6 lab, and while testing we came across an issue when starting Samza.
       
      Looking at the stack trace it seems like the url is not formed correctly for IPv6 deployment. The IPv6 address should have been decorated inside '[ ]’, but that isn’t the case.
      Here is the stack trace. The ip of the VM where Samza is deployed is 'fc00:192:168:22::14’.
       
      2021-08-26T07:28:52.232Z INFO jetty.server.AbstractConnector main doStart:331 Started ServerConnector@6c1cfa53{HTTP/1.1, (http/1.1)}{[0.0.0.0:44843|http://0.0.0.0:44843/]}
      2021-08-26T07:28:52.232Z INFO jetty.server.Server main doStart:415 Started @5524ms
      2021-08-26T07:28:52.235Z ERROR samza.clustermanager.ClusterBasedJobCoordinator main run:314 Exception thrown in the JobCoordinator loop
      java.net.MalformedURLException: Error at index 3 in: "192:168:22:0:0:0:14:44843"
              at java.base/java.net.URL.<init>(URL.java:679)
              at java.base/java.net.URL.<init>(URL.java:541)
              at java.base/java.net.URL.<init>(URL.java:488)
              at org.apache.samza.coordinator.server.HttpServer.getUrl(HttpServer.scala:134)
              at org.apache.samza.coordinator.server.HttpServer.$anonfun$start$4(HttpServer.scala:113)
              at org.apache.samza.util.Logging.info(Logging.scala:63)
              at org.apache.samza.util.Logging.info$(Logging.scala:61)
              at org.apache.samza.coordinator.server.HttpServer.info(HttpServer.scala:39)
              at org.apache.samza.coordinator.server.HttpServer.start(HttpServer.scala:113)
              at org.apache.samza.job.yarn.SamzaYarnAppMasterService.onInit(SamzaYarnAppMasterService.scala:53)
              at org.apache.samza.job.yarn.YarnClusterResourceManager.start(YarnClusterResourceManager.java:212)
              at org.apache.samza.clustermanager.ContainerProcessManager.start(ContainerProcessManager.java:230)
              at org.apache.samza.clustermanager.ClusterBasedJobCoordinator.run(ClusterBasedJobCoordinator.java:289)
              at org.apache.samza.clustermanager.ClusterBasedJobCoordinator.runClusterBasedJobCoordinator(ClusterBasedJobCoordinator.java:547)
              at org.apache.samza.clustermanager.ClusterBasedJobCoordinator.main(ClusterBasedJobCoordinator.java:473)
      Caused by: java.lang.NumberFormatException: Error at index 3 in: "192:168:22:0:0:0:14:44843"
              at java.base/java.lang.NumberFormatException.forCharSequence(NumberFormatException.java:81)
              at java.base/java.lang.Integer.parseInt(Integer.java:735)
              at java.base/java.net.URLStreamHandler.parseURL(URLStreamHandler.java:223)
       
      This is the problematic line of code: ~l/.m2/repository/org/apache/samza/samza-core_2.12/1.5.1-arkin-jdk11/samza-core_2.12-1.5.1-arkin-jdk11-sources.jar!/org/apache/samza/coordinator/server/HttpServer.scala:134
       new URL("http://" + Util.getLocalHost.getHostName + ":" + runningPort + rootPath)
       
       

      Attachments

        Activity

          People

            viran Vishal Ranjan
            viran Vishal Ranjan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: