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

socket exception starting kernel (Ubuntu 16.04.1, Mono 4.6.0) #90

Closed
jonschoning opened this issue Sep 29, 2016 · 2 comments
Closed

socket exception starting kernel (Ubuntu 16.04.1, Mono 4.6.0) #90

jonschoning opened this issue Sep 29, 2016 · 2 comments

Comments

@jonschoning
Copy link

Unhandled Exception:
System.Net.Sockets.SocketException (0x80004005): Operating system sockets do not support ReuseAddress.
If your socket is not intended to bind to the same address and port multiple times remove this option, otherwise you should ignore this exception inside a try catch and check that ReuseAddress is true before binding to the same address and port multiple times.
  at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Int32 optionValue) [0x0003d] in <affe4060066c42de8cdd6027cdb92b56>:0 
  at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Boolean optionValue) [0x0000e] in <affe4060066c42de8cdd6027cdb92b56>:0 
  at NetMQ.Core.Utils.Signaler..ctor () [0x0002e] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.Core.Mailbox..ctor (System.String name) [0x00012] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.Core.Ctx..ctor () [0x00035] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.NetMQContext.Create () [0x00000] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at IfSharp.Kernel.IfSharpKernel..ctor (IfSharp.Kernel.ConnectionInformation connectionInformation) [0x00010] in <573639321b085d3da745038332393657>:0 
  at IfSharp.Kernel.App.Start (System.String[] args) [0x00068] in <573639321b085d3da745038332393657>:0 
  at IfSharpConsole.Program.Main (System.String[] args) [0x00014] in <f9ae360469824df8a0dac21608d2a080>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException (0x80004005): Operating system sockets do not support ReuseAddress.
If your socket is not intended to bind to the same address and port multiple times remove this option, otherwise you should ignore this exception inside a try catch and check that ReuseAddress is true before binding to the same address and port multiple times.
  at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Int32 optionValue) [0x0003d] in <affe4060066c42de8cdd6027cdb92b56>:0 
  at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Boolean optionValue) [0x0000e] in <affe4060066c42de8cdd6027cdb92b56>:0 
  at NetMQ.Core.Utils.Signaler..ctor () [0x0002e] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.Core.Mailbox..ctor (System.String name) [0x00012] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.Core.Ctx..ctor () [0x00035] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at NetMQ.NetMQContext.Create () [0x00000] in <f8f8aec48f4a460eb0ff15702f5ff345>:0 
  at IfSharp.Kernel.IfSharpKernel..ctor (IfSharp.Kernel.ConnectionInformation connectionInformation) [0x00010] in <573639321b085d3da745038332393657>:0 
  at IfSharp.Kernel.App.Start (System.String[] args) [0x00068] in <573639321b085d3da745038332393657>:0 
  at IfSharpConsole.Program.Main (System.String[] args) [0x00014] in <f9ae360469824df8a0dac21608d2a080>:0 

@sylvanc
Copy link
Collaborator

sylvanc commented Oct 18, 2016

This appears to be a Mono 4.6.* issue with NetMQ.

For reference:

zeromq/netmq#592

zeromq/netmq#623

I installed Mono 4.6.1 and I now have the same issue.

sylvanc added a commit to sylvanc/mono that referenced this issue Oct 31, 2016
SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

zeromq/netmq#623
zeromq/netmq#592
fsprojects/IfSharp#90
luhenry pushed a commit to mono/mono that referenced this issue Nov 1, 2016
SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

zeromq/netmq#623
zeromq/netmq#592
fsprojects/IfSharp#90
luhenry pushed a commit to luhenry/mono that referenced this issue Nov 2, 2016
SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

zeromq/netmq#623
zeromq/netmq#592
fsprojects/IfSharp#90
luhenry added a commit to mono/mono that referenced this issue Nov 3, 2016
SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

zeromq/netmq#623
zeromq/netmq#592
fsprojects/IfSharp#90
@sylvanc
Copy link
Collaborator

sylvanc commented Nov 15, 2016

I've submitted a Mono patch that will ship with Mono 4.8. Meanwhile, Mono 4.4 does work, but Mono 4.6 does not. I'm closing this issue here since it's a Mono bug. Thanks very much for the report!

@sylvanc sylvanc closed this as completed Nov 15, 2016
luhenry pushed a commit to luhenry/mono that referenced this issue Dec 6, 2016
SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

zeromq/netmq#623
zeromq/netmq#592
fsprojects/IfSharp#90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants