0

I have a sonarqube 5.1.2 server that is working OK when bound to the primary IP address on my Windows server.

However, I want to bind sonarqube to an alternate IP address on a Windows server and get a problem (or all IP addresses on the server)

In the sonar.properties I have set the alternate address

sonar.web.host=10.10.9.51

This fails with the error

2015.08.18 15:13:06 ERROR web[o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-10.10.9.51-9000"] java.net.BindException: Cannot assign requested address: bind

  • If I set the value to my primary IP address the server works.
  • If I don't set the value, or use 0.0.0.0, the primary IP address works but the alternate does not.

I assume I am missing some other configuration file that allow binding to any secondary IP addresses on my server.

Any ideas where it might be set?

A clarification

  • 10.10.1.93 is the PCs default IP address. Sonarqube binds to this OK if use the sonar.web.host=10.10.1.93 or sonar.web.host=0.0.0.0 or just don't set sonar.web.host.
  • 10.10.9.51 is an secondary IP address on the server, which is bound OK and I can ping it. However if I set sonar.web.host=10.10.9.51 I get the error shown above
Richard Fennell
  • 150
  • 1
  • 11
  • you say you set sonar.web.host to 10.10.1.93, but error log states it tries and fails to bind to 10.10.9.51. What's 10.10.9.51? quick googling, maybe [this thead](http://stackoverflow.com/questions/8965155/cannot-assign-requested-address-jvm-bind) could help you troobleshoot – Seb - SonarSource Team Aug 19 '15 at 13:15
  • Sorry I should have been clearer 10.10.1.93 is the PCs default IP address. sonarqube binds to this OK if use the sonar.web.host=10.10.1.93 or sonar.web.host=0.0.0.0 or just don't set sonar.web.host. 10.10.9.51 is an secondary IP address on the server, which is bound OK and I can ping it. However if I set sonar.web.host=10.10.9.51 I get the error shown – Richard Fennell Aug 20 '15 at 15:54
  • pinging 10.10.9.51 doesn't prove port 9000 is open on this IP. Maybe you should check your firewall configuration. – Seb - SonarSource Team Aug 21 '15 at 07:31
  • I tried disabling the firewall fully, had no effect. But this is as expected as it the connection is within the OS not the via a network connections – Richard Fennell Aug 22 '15 at 16:38
  • I installed the IIS feature on WIndows and it has the same issue, only sees the primary IP address not the alternates. So looks to be an OS issue. I will keep digging – Richard Fennell Aug 23 '15 at 09:33

1 Answers1

1

Found the issue, the secondary IP address I was trying to use had been used on another machine in the network. Hence the ping worked.

Windows let me assign the IP address as secondary IP address on an adapter, but it never it seems actually bound due to it already being in use. When I checked the Windows System event I did find an error

The system detected an address conflict for IP address 10.10.9.51 with the system having network hardware address 00-15-5D-01-3E-02. Network operations on this system may be disrupted as a result.

Note I did not get the 'IP address conflict' dialog I would have seen if there are a clash on the primary IP address

Once I used an unused IP address, it bound OK for both IIS and the Apache/SonarQube stack.

Richard Fennell
  • 150
  • 1
  • 11