Graylog unable to startup

Hi,

I set up graylog using this documentation: docs.graylog.org/en/2.3/pages/installation/os/ubuntu.html

Everything went smoothly (mongodb and elastic search running fine) except that after I set up graylog itself, it crashes on startup with this error:

2017-12-20T16:35:24.165Z ERROR [ServiceManager] Service JerseyService [FAILED] has failed in the STARTING state.
java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_151]
at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_151]
at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_151]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_151]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_151]
at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131) ~[graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88) ~[graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:238) ~[graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:218) ~[graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:209) ~[graylog.jar:?]
at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:723) ~[graylog.jar:?]
at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:277) ~[graylog.jar:?]
at org.graylog2.shared.initializers.JerseyService.startUpApi(JerseyService.java:236) ~[graylog.jar:?]
at org.graylog2.shared.initializers.JerseyService.startUp(JerseyService.java:141) ~[graylog.jar:?]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) [graylog.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:122) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]

Context:
This is on a Microsoft Azure VM, which has a public IP and an internal IP (seen in ifconfig).
I’ve set the publicIP in these two parameters:

rest_listen_uri = http://40.71.203.22:9000/api/
web_listen_uri = {same endpoint}/web/

What else can I try?

the most common cause of “java.net.BindException: Cannot assign requested address” is that there is already something running on port 9000 creating a conflict or the user issuing the command does not have permission to bind the port (port 80 can only be bound by root). If you run “sudo netstat -tulpn | grep LISTEN” and there is a line that contains :::9000 you can see what PID is using the port.

Hi @jcspino ,

I already tried that, and there is nothing listening on 9000.

I am using Azure so I assigned the public ip of the VM not the one seen by ifconfig.
I’ve tried the other way too.

There might be something funky I need to do because the public IP is not the one seen within the VM ?
I remember having headaches with cassandra because of this too.

You can only bind Graylog to one IP that is available on the VM. You can’t bind a service to one IP that is not local available.

Documentation says it must be public IP.

public in this terms refers to a ip that is reachable by your browser and not a public ip. I’ll change the documentation.

Well, even that’s not necessarily true.

In many cloud systems, the IP you use to connect to the VM is not the IP you see inside the VM.
The cloud provider accomplishes this using various firewall/nat functionality in their infrastructure.

In fact, “private ip” is more appropriate I think (because that literally means the IP local to the VM - i.e., ifconfig)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.