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

Start Elastic Node without network link #842

Closed
dadoonet opened this issue Apr 8, 2011 · 9 comments
Closed

Start Elastic Node without network link #842

dadoonet opened this issue Apr 8, 2011 · 9 comments

Comments

@dadoonet
Copy link
Member

dadoonet commented Apr 8, 2011

When I try to launch an ES instance from scratch for test purpose without any network link up, it fails.

[2011-04-08 08:54:06,866][INFO ][node                     ] [White Fang] {elasticsearch/0.15.2}[1991]: initializing ...
[2011-04-08 08:54:06,877][INFO ][plugins                  ] [White Fang] loaded []
[2011-04-08 08:54:11,336][INFO ][node                     ] [White Fang] {elasticsearch/0.15.2}[1991]: initialized
[2011-04-08 08:54:11,337][INFO ][node                     ] [White Fang] {elasticsearch/0.15.2}[1991]: starting ...
[2011-04-08 08:54:11,559][INFO ][transport                ] [White Fang] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[dpilato-laptop/127.0.1.1:9300]}
[2011-04-08 08:54:11,614][ERROR][bootstrap                ] [White Fang] {elasticsearch/0.15.2}: Startup Failed ...
- DiscoveryException[Failed to setup multicast socket]
    SocketException[bad argument for IP_MULTICAST_IF: address not bound to any interface]

I have to connect at least one network card.

It would be nice if ES can start without a network (standalone mode) with the default parameters.

By the way, is there a network configuration to start ES without network signal ?

@kimchy
Copy link
Member

kimchy commented Apr 9, 2011

What do you get when you set monitor.network to TRACE in the logging file?

@dadoonet
Copy link
Member Author

Sure !

[2011-04-11 09:13:50,789][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: initializing ...
[2011-04-11 09:13:50,800][INFO ][plugins                  ] [Richards, Susan] loaded []
[2011-04-11 09:13:55,019][DEBUG][monitor.network          ] [Richards, Susan] Using probe [org.elasticsearch.monitor.network.SigarNetworkProbe@1a1bc40] with refresh_interval [5s]
[2011-04-11 09:13:55,059][DEBUG][monitor.network          ] [Richards, Susan] net_info
host [dpilato-laptop]
lo  display_name [lo]
        address [/0:0:0:0:0:0:0:1%1] [/127.0.0.1] 
        mtu [16436] multicast [false] ptp [false] loopback [true] up [true] virtual [false]

[2011-04-11 09:13:55,067][TRACE][monitor.network          ] [Richards, Susan] ifconfig

lo  Link encap:Local Loopback
    inet addr:127.0.0.1  Mask:255.0.0.0
    UP LOOPBACK RUNNING  MTU:16436  Metric:1
    RX packets:280 errors:0 dropped:0 overruns:0 frame:0
    TX packets:280 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0
    RX bytes:35713 ( 35K)  TX bytes:35713 ( 35K)
eth0    Link encap:Ethernet HWaddr 00:0A:E4:F7:B0:41
    inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:0.0.0.0
    UP BROADCAST MULTICAST  MTU:1500  Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0
    RX bytes:0 (  0 )  TX bytes:0 (  0 )
wlan0   Link encap:Ethernet HWaddr 00:13:02:09:10:B1
    inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:0.0.0.0
    UP BROADCAST MULTICAST  MTU:1500  Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0
    RX bytes:0 (  0 )  TX bytes:0 (  0 )

[2011-04-11 09:13:55,292][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: initialized
[2011-04-11 09:13:55,292][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: starting ...
[2011-04-11 09:13:55,511][INFO ][transport                ] [Richards, Susan] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[dpilato-laptop/127.0.1.1:9300]}
[2011-04-11 09:13:55,575][ERROR][bootstrap                ] [Richards, Susan] {elasticsearch/0.15.2}: �[31mStartup Failed ...�[0m
- DiscoveryException[Failed to setup multicast socket]
    SocketException[bad argument for IP_MULTICAST_IF: address not bound to any interface]
[2011-04-11 09:13:55,576][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: stopping ...
[2011-04-11 09:13:55,593][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: stopped
[2011-04-11 09:13:55,593][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: closing ...
[2011-04-11 09:13:55,616][INFO ][node                     ] [Richards, Susan] {elasticsearch/0.15.2}[2009]: closed

Cheers...

@dadoonet
Copy link
Member Author

BTW, it only fails on my Linux (Ubuntu). On Windows, it starts perfectly with or without the Network link.
May be an OS issue ?
As it's a really small issue without importance (you never use ES without a Network, so spending time on it is not useful), I suggest to close the issue as a WontBeFix issue.

What do you think ?

@kimchy
Copy link
Member

kimchy commented Aug 10, 2011

I think that it should be fixed for better OOB usage. I think it fails on the multicast discovery, we can warn then and still continue... . I need to get the full stack trace for the exception, can you check the log file itself (not the console output) with TRACE logging enabled? You should see the exception there...

@gsf
Copy link

gsf commented Aug 16, 2011

I ran into the same issue. Log output with monitor.network set to TRACE:

[2011-08-16 12:41:48,209][WARN ][bootstrap                ] jvm uses the client vm, make sure to run `
java` with the server vm for best performance by adding `-server` to the command line
[2011-08-16 12:41:48,246][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: i
nitializing ...
[2011-08-16 12:41:48,269][INFO ][plugins                  ] [Neurotap] loaded [], sites []
[2011-08-16 12:41:52,765][DEBUG][monitor.network          ] [Neurotap] Using probe [org.elasticsearch.
monitor.network.SigarNetworkProbe@1e3cc77] with refresh_interval [5s]
[2011-08-16 12:41:52,783][DEBUG][monitor.network          ] [Neurotap] net_info
host [lizard]
lo      display_name [lo]
                address [/0:0:0:0:0:0:0:1%1] [/127.0.0.1]
                mtu [16436] multicast [false] ptp [false] loopback [true] up [true] virtual [false]

[2011-08-16 12:41:52,791][TRACE][monitor.network          ] [Neurotap] ifconfig

lo      Link encap:Local Loopback
        inet addr:127.0.0.1  Mask:255.0.0.0
        UP LOOPBACK RUNNING  MTU:16436  Metric:1
        RX packets:182 errors:0 dropped:0 overruns:0 frame:0
        TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0
        RX bytes:13984 ( 14K)  TX bytes:13984 ( 14K)
eth0    Link encap:Ethernet HWaddr 00:23:8B:B6:14:B8
        inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:0.0.0.0
        UP BROADCAST MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0
        RX bytes:0 (  0 )  TX bytes:0 (  0 )
eth1    Link encap:Ethernet HWaddr 00:24:2C:E5:57:EB
        inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:0.0.0.0
        BROADCAST MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0
        RX bytes:0 (  0 )  TX bytes:0 (  0 )
vboxnet0        Link encap:Ethernet HWaddr 0A:00:27:00:00:00
        inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:0.0.0.0
        BROADCAST MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0
        RX bytes:0 (  0 )  TX bytes:0 (  0 )

[2011-08-16 12:41:53,490][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: initialized
[2011-08-16 12:41:53,491][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: starting ...
[2011-08-16 12:41:53,720][INFO ][transport                ] [Neurotap] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[lizard/127.0.1.1:9300]}
[2011-08-16 12:41:53,772][ERROR][bootstrap                ] [Neurotap] {elasticsearch/0.17.5}: ESC[31mStartup Failed ...ESC[0m
- DiscoveryException[Failed to setup multicast socket]
        SocketException[bad argument for IP_MULTICAST_IF: address not bound to any interface]
[2011-08-16 12:41:53,775][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: stopping ...
[2011-08-16 12:41:53,812][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: stopped
[2011-08-16 12:41:53,813][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: closing ...
[2011-08-16 12:41:53,846][INFO ][node                     ] [Neurotap] {elasticsearch/0.17.5}[2444]: closed

This is from the log file, but looks quite a bit like dadoonet's paste above... should something else be set to TRACE as well?

@kimchy
Copy link
Member

kimchy commented Aug 16, 2011

@gsf can you set bootstrap to DEBUG in the logging and check the log file for the full exception failure and paste it here?

@gsf
Copy link

gsf commented Aug 16, 2011

Gotcha. The relevant stack trace is as follows:

[2011-08-16 14:29:46,858][ERROR][bootstrap                ] [Recorder] {elasticsearch/0.17.5}: �[31mStartup Failed ...�[0m
- DiscoveryException[Failed to setup multicast socket]
    SocketException[bad argument for IP_MULTICAST_IF: address not bound to any interface]
[2011-08-16 14:29:46,860][DEBUG][bootstrap                ] [Recorder] Exception
org.elasticsearch.discovery.DiscoveryException: Failed to setup multicast socket
    at org.elasticsearch.discovery.zen.ping.multicast.MulticastZenPing.doStart(MulticastZenPing.java:174)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:80)
    at org.elasticsearch.discovery.zen.ping.ZenPingService.doStart(ZenPingService.java:92)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:80)
    at org.elasticsearch.discovery.zen.ZenDiscovery.doStart(ZenDiscovery.java:146)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:80)
    at org.elasticsearch.discovery.DiscoveryService.doStart(DiscoveryService.java:59)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:80)
    at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:184)
    at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:121)
    at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:191)
    at org.elasticsearch.bootstrap.ElasticSearch.main(ElasticSearch.java:28)
Caused by: java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface
    at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)
    at java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:299)
    at java.net.MulticastSocket.setInterface(MulticastSocket.java:448)
    at org.elasticsearch.discovery.zen.ping.multicast.MulticastZenPing.doStart(MulticastZenPing.java:165)
    ... 11 more
[2011-08-16 14:29:46,869][INFO ][node                     ] [Recorder] {elasticsearch/0.17.5}[2361]: stopping ...

@kimchy
Copy link
Member

kimchy commented Aug 16, 2011

@gsf: cool, thanks!. Will push an enhancement so it will warn in this case that multicast discovery is disable, but still startup.

@kimchy kimchy closed this as completed in 20ff04f Aug 16, 2011
@dadoonet
Copy link
Member Author

I'm coming too late to give the trace ! Shame on me :-(
Thanks @gsf to have provided it. Thanks @kimchy to close this issue.

martijnvg pushed a commit to martijnvg/elasticsearch that referenced this issue Jan 31, 2018
…lastic#842)

Refactors NodePersistentTask and RunningPersistentTask into a single AllocatedPersistentTask. Makes it possible to update Persistent Task Status via AllocatedPersistentTask.
martijnvg pushed a commit that referenced this issue Feb 5, 2018
…842)

Refactors NodePersistentTask and RunningPersistentTask into a single AllocatedPersistentTask. Makes it possible to update Persistent Task Status via AllocatedPersistentTask.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants