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

Is there really Linux/Mono support ? Beacon/Bus demo crashes #553

Closed
mabra opened this issue May 21, 2016 · 7 comments
Closed

Is there really Linux/Mono support ? Beacon/Bus demo crashes #553

mabra opened this issue May 21, 2016 · 7 comments
Labels

Comments

@mabra
Copy link

mabra commented May 21, 2016

Hi !

I am not sure, if zeromq should run on linux/mono, but as beeing native net, it should.
After I made the beacon/bus sample running, I tried it on mono [4.0.4/debian 8.4]
but got the following error message:

`
Bus subscriber is bound to tcp://0.0.0.0:51764
Beacon is being configured to UDP port 9999
Beacon is publishing the Bus subscriber port 51764
Beacon is subscribing to all beacons on UDP port 9999

Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: remote_end
at System.Net.Sockets.Socket.SendTo (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint remote_end) [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.SendUdpFrame (NetMQ.NetMQFrame frame) [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.OnPipeReady (System.Object sender, NetMQ.NetMQSocketEventArgs e) [0x00000] in :0
at NetMQ.NetMQSocket.InvokeEvents (System.Object sender, PollEvents events) [0x00000] in :0
at NetMQ.NetMQPoller.Run () [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.Run (NetMQ.Sockets.PairSocket shim) [0x00000] in :0
at NetMQ.NetMQActor.RunShim () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null.
Parameter name: remote_end
at System.Net.Sockets.Socket.SendTo (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint remote_end) [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.SendUdpFrame (NetMQ.NetMQFrame frame) [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.OnPipeReady (System.Object sender, NetMQ.NetMQSocketEventArgs e) [0x00000] in :0
at NetMQ.NetMQSocket.InvokeEvents (System.Object sender, PollEvents events) [0x00000] in :0
at NetMQ.NetMQPoller.Run () [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.Run (NetMQ.Sockets.PairSocket shim) [0x00000] in :0
at NetMQ.NetMQActor.RunShim () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
`
This was with --debug, but was not compiled on linux, so linenumbers are absent.
In reality, something like this happens all the time to me, if I start using
networking and use more then open/close something ...

Tips and hints are really welcome!
Thanks anyway,

Manfred

@somdoron
Copy link
Member

It should work, try to specify the interface IP of the beacon.
On May 21, 2016 21:52, "mabra" notifications@github.com wrote:

Hi !

I am not sure, if zeromq should run on linux/mono, but as beeing native
net, it should.
After I made the beacon/bus sample running, I tried it on mono
[4.0.4/debian 8.4]
but got the following error message:

`
Bus subscriber is bound to tcp://0.0.0.0:51764
Beacon is being configured to UDP port 9999
Beacon is publishing the Bus subscriber port 51764
Beacon is subscribing to all beacons on UDP port 9999

Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: remote_end
at System.Net.Sockets.Socket.SendTo (System.Byte[] buffer, Int32 offset,
Int32 size, SocketFlags flags, System.Net.EndPoint remote_end) [0x00000] in
:0
at NetMQ.NetMQBeacon+Shim.SendUdpFrame (NetMQ.NetMQFrame frame) [0x00000]
in :0
at NetMQ.NetMQBeacon+Shim.OnPipeReady (System.Object sender,
NetMQ.NetMQSocketEventArgs e) [0x00000] in :0
at NetMQ.NetMQSocket.InvokeEvents (System.Object sender, PollEvents
events) [0x00000] in :0
at NetMQ.NetMQPoller.Run () [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.Run (NetMQ.Sockets.PairSocket shim) [0x00000] in
:0
at NetMQ.NetMQActor.RunShim () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument
cannot be null.
Parameter name: remote_end
at System.Net.Sockets.Socket.SendTo (System.Byte[] buffer, Int32 offset,
Int32 size, SocketFlags flags, System.Net.EndPoint remote_end) [0x00000] in
:0
at NetMQ.NetMQBeacon+Shim.SendUdpFrame (NetMQ.NetMQFrame frame) [0x00000]
in :0
at NetMQ.NetMQBeacon+Shim.OnPipeReady (System.Object sender,
NetMQ.NetMQSocketEventArgs e) [0x00000] in :0
at NetMQ.NetMQSocket.InvokeEvents (System.Object sender, PollEvents
events) [0x00000] in :0
at NetMQ.NetMQPoller.Run () [0x00000] in :0
at NetMQ.NetMQBeacon+Shim.Run (NetMQ.Sockets.PairSocket shim) [0x00000] in
:0
at NetMQ.NetMQActor.RunShim () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
`
This was with --debug, but was not compiled on linux, so linenumbers are
absent.
In reality, something like this happens all the time to me, if I start
using
networking and use more then open/close something ...

Tips and hints are really welcome!
Thanks anyway,

Manfred


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#553

@mabra
Copy link
Author

mabra commented May 22, 2016

Giving the beacon an address changes nothing.
Looking deeper, using MonoDevelop, I found two interesting errors on the socket to use:
DualMode - System.NotSupportedException: This protocol version is not supported
NoDelay - System.Net.Sockets.SocketException: Protocol option not supported

Today, I upgtaded from my 4.0.4 version and got mono 4.2.3 and I got the same error message.

Then I went to a non-development machine [same Debian Jessie, 8.4, mono 4.2.3]
and found something new:

Unhandled Exception:
System.NotImplementedException: The method or operation is not implemented.
at System.Net.NetworkInformation.NetworkInterfaceFactory+LinuxNetworkInterfaceAPI.GetNetMask (System.Net.IPAddress address) <0x411c7af0 + 0x00017> in :0

Note, that "GetNetmask" is not present in Net/Windows.
The networkstack on mono looks like a random generator - I am seeing errors too often.
Probably mono 27.9 will solve this.

A similar thing is the actor example. Runs fine on windows - never terminates on mono, looks like a threading problem.

@somdoron
Copy link
Member

Yes I remember something like this, so I guess Beacon is not supported on Linux

@k5jae
Copy link

k5jae commented Jul 22, 2016

I'm doing a crossplatform test with Ubuntu 16.04/Mono and Windows 10. The Beacon demo is almost working except that I don't receive beacons in Linux. The Windows 10 side sees the beacons from Linux and does its thing. Looking at wireshark everything seems to be correct.

In Linux/Mono, if you bind the socket to the local IP address you will not receive any broadcasts. However, if you bind to the broadcast address you will get broadcasts, but you will need to use the Socket.SendTo method in order to send messages without throwing an exception. In this case, the SendTo is already used.

In: NetMQBeacon.cs from commit: 4d6b5b5

I think if Line 112:
bindTo = @interface.Address;

was changed to:
bindTo = @interface.BroadcastAddress;

The demo might start working.

@somdoron
Copy link
Member

Can you make a Pull Request? Will it work on both windows and linux?

On Jul 23, 2016 01:29, "jaebird" notifications@github.com wrote:

I'm doing a crossplatform test with Ubuntu 16.04/Mono and Windows 10. The
Beacon demo is almost working except that I don't receive beacons in Linux.
The Windows 10 side sees the beacons from Linux and does its thing. Looking
at wireshark everything seems to be correct.

In Linux/Mono, if you bind the socket to the local IP address you will not
receive any broadcasts. However, if you bind to the broadcast address you
will get broadcasts, but you will need to use the Socket.SendTo method in
order to send messages without throwing an exception. In this case, the
SendTo is already used.

In: NetMQBeacon.cs from commit: 4d6b5b5
4d6b5b5

I think if Line 112:
bindTo = @interface.Address;

was changed to:
bindTo = @interface.BroadcastAddress;

The demo might start working.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#553 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AClv9tnF5XamM67jrnl7u3JAzMjIxmFWks5qYURhgaJpZM4Ij1jP
.

@adminnz
Copy link

adminnz commented Mar 24, 2017

If you implement the beacon demo and run on windows its fine, multiple instances say hello/welcome to each other.
But if you run multiple instances on Ubuntu 16.04 (dotnet Core) none of the instances receive hello/welcome messages.

Is there something different that needs to be done to get the demo working on linux ?

@stale
Copy link

stale bot commented May 15, 2020

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.

@stale stale bot added the stale label May 15, 2020
@stale stale bot closed this as completed Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants