SynapseProject / synapse.server.net

Synapse is a lightweight execution engine for unifying federated data sources and processes. Synapse.Server is the API/daemon for launching/controlling/executing Synapse Plans via Synapse.Controller and Synapse.Node.
http://synapse.readthedocs.io/en/latest/
GNU General Public License v2.0
6 stars 4 forks source link

Default port numbers conflict for Node and Controller #36

Closed mdkiefer closed 7 years ago

mdkiefer commented 7 years ago

Release download results in same port (20000) being used on both the Controller and Node, allowing only one of the two instances to start successfully. This conflicts with the Quick Start instructions

It actually looks like the "synapse.node.cli service run" is not starting in the proper mode (as Node):

c:\dev\Synapse\Node>synapse.node.cli service run
Starting Synapse.Server as Controller: Press Ctrl-C/Ctrl-Break to stop.
2017-06-22 02:02:58,333|INFO |(1)|Starting
2017-06-22 02:02:58,453|FATAL|(1)|System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://localhost:20000/' because it conflicts with an existing registration on the machine.

However, it also appears that this is a "release build" problem, in that if I pull the develop branch down and compile/run it works fine.

steveshortt commented 7 years ago

The service installer uses synapse.server.config.yaml if one is present, and it creates a default file if one is not. Synapse.Controller.Cli creates a Controller-specific file, and Synapse.Node.Cli creates a Node-specific file. Do you know if there was already a synapse.server.config.yaml present in the Node folder when you ran the installer? If that was the case, then minimally, that needs to be clearer in the install notes & runtime messages.

mdkiefer commented 7 years ago

This was a clean install. After cleaning up and starting over it seems I made the mistake of trying to run the node and controller out of the same folder and that foobars everything. It seems odd that you can't run two different CLIs out of the same folder without issues. So maybe the docs need more clarification or a troubleshooting section to tell you when you've done something stupid like this.

On Jun 26, 2017 12:50 AM, "Steve Shortt" notifications@github.com wrote:

The service installer uses synapse.server.config.yaml if one is present, and it creates a default file if one is not. Synapse.Controller.Cli creates a Controller-specific file, and Synapse.Node.Cli creates a Node-specific file. Do you know if there was already a synapse.server.config.yaml present in the Node folder when you ran the installer? If that was the case, then minimally, that needs to be clearer in the install notes & runtime messages.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SynapseProject/synapse.server.net/issues/36#issuecomment-310969286, or mute the thread https://github.com/notifications/unsubscribe-auth/AafqNQugEWgCdlsTiGRqf48uatKad92Nks5sH0azgaJpZM4OB4R3 .

steveshortt commented 7 years ago

I'll clarify the docs: if you want to run both from the same folder, use synapse.server.exe itself to create the dual-role synapse.server.config.yaml file. In the end, for server role, the only difference is in the "Service" section, where Name/DisplayName are used to configure the Windows Service during install/uninstall, and Role guides the function (Controller, Node, or Server [= both]). Additional differences come in the Controller & Node config sections.

Service:
  Name: Synapse.Server
  DisplayName: Synapse Server
  Role: Server | Controller | Node

See the "Configuration" section of this doc: Installation/Configuration