-
Notifications
You must be signed in to change notification settings - Fork 47
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
DEATH LOOP: when using mesh with isbase:true and multiple pins! #97
Comments
Any luck with this?? I have the same problem |
@rjrodger we have the same problem but we don't have isBase and multiple pins in the same place. Our base is simpler:
Our current packages are seneca: 3.4.2, seneca-balance-client: 0.6.1 and seneca-mesh: 0.11.0 |
Are you using Docker containers? This seems like a networking issue we are having here when using Docker containers. |
I'm not using docker, just starts seneca with isbase true and multiple pins in listen options leads to the DEATH LOOP |
@jeromevalentin Do you have other bases listed in |
I have the same problem. The base wasn't using the host option and the network didn't support multicast
… On Sep 10, 2017, at 10:13, Rodrigo Mazzilli ***@***.***> wrote:
@jeromevalentin Do you have other bases listed in seneca_bases?
Does the error occur when you remove bases: seneca_bases?
Usually these DEATH_LOOPs occur when your client cannot communicate with your base due to networking limitations (no multicast support, ports blocked etc).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@rodmaz No other bases, no other mesh process is running, just trying to start a 'base' mesh process supporting multiple microservices. In testmesh.es6, write import Seneca from 'seneca'
let seneca = Seneca({ tag: 'mesh' })
seneca.add({ role: 'A' }, (args, done) => done(null, { A: args }))
seneca.add({ role: 'B' }, (args, done) => done(null, { B: args }))
seneca.use('mesh', {
isbase: true,
listen: [
{ pin: 'role:A' },
{ pin: 'role:B' }
]
})
seneca.ready(() => {
console.log('Ready')
seneca.act({ role: 'A', param: 'foobar' }, (err, resp) => console.log(err, resp))
}) then transpiles it with babel, and execute:
The error lets thinking mesh is trying to start the base listening on 39999 multiple times. |
@jeromevalentin This error ( |
@rodmaz The error is clear, but no other process is using that port on my computer:
|
I was able to get this working after seeing similar issues. Below code throws death loop error:
Instead, I used- which worked:
Also, I found myself camelCasing |
I agree, like this, it works ... but this is just a workaround which is not always applicable. {
isbase: true,
pin: 'role:*'
} and with such configuration, that process will receive all role requests .... while it is only able to address A & B So this is not a solution |
Good point. It appears the documentation may be wrong. After reading over the code, I found this piece which iterates over the starting at line 171:
But
Fortunately, there is an undocumented
However, if I use this configuration and try to call a service that does not exist, the mesh client crashes, for example
results in:
Perhaps this is because I'm using this with Hapi/Chairo, but definitely did not expect this to take down my entire API server if a microservice is found to be unavailable. |
This might belong as a separate issue, but it seems like a DEATH LOOP should be something that can be voluntarily handled by a service. My services do more than just Seneca call-and-response, and should be allowed to remain running even if seneca-mesh is having a bad time. I'd rather be able to periodically retry finding and joining the mesh than have to constantly restart my service on a DEATH LOOP. |
Agree with @RyanFields. Death Loop should be an error code different from act_execute and handleable |
Building off of @karn09's post above: I was recently having this problem too in an app, and finally figured out that the seneca-mesh
but the following does not:
I put together a stripped down test project that uses |
to me the error vanish if I set the isbase to lower case. If I remove the isbase then the error comes out, but that may be due to being one single node without any other base around. In any case, I can confirm that defining the pin as a string and using isbase all lower case it works: const initialSenecaConfig = {
auto: true,
isbase:true,
listen: [
{ pin: "role:profile,command:*", model: "consume" }
],
discover: {
rediscover: true,
custom: {
active: true,
find: dnsSeed
}
}
}; |
The error reported by @jeromevalentin about the listen [
{ pin: {role:'stuff', cmd:'a'} }
{ pin: {role:'stuff', cmd:'b'} }
] Then seneca-mesh tries to start several times, hence the error of |
With versions:
The following code
leads to the following error:
The text was updated successfully, but these errors were encountered: