Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SW-2503] Tried using port 54321 for Flow proxy, but port was already occupied #2425

Merged
merged 1 commit into from
Dec 23, 2020
Merged

Conversation

dzlab
Copy link
Contributor

@dzlab dzlab commented Dec 16, 2020

Updated ProxyStarter.scala. so that when tries to bind on a port it uses the address 0.0.0.0

The problem description: #2414

Copy link
Collaborator

@mn-mikke mn-mikke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Pscheidl Pscheidl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already used for the Jetty to start anyway, so checking all local interfaces is more appropriate anyway.

See SparklingWaterJettyHelper.scala class.

  def startServer(port: Int): Server = {
    val jettyServer = createJettyServer("0.0.0.0", port)
    val context = createServletContextHandler()
    if (h2oHttpView.getConfig.loginType != LoginType.NONE) {
      context.setSecurityHandler(authWrapper(jettyServer).asInstanceOf[SecurityHandler])
    }
    jettyServer.setHandler(context)
    jettyServer.start()
    jettyServer
  }

@mn-mikke
Copy link
Collaborator

@dzlab Thanks for you contribution! Merging...

@mn-mikke mn-mikke merged commit 04fa465 into h2oai:master Dec 23, 2020
mn-mikke pushed a commit that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants