You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
# check port usage
for port in HOST_PORTS_USED[build_config]:
if is_port_open(port):
print("Cannot install, as it appears a process is already listening on host port {}".format(port))
sys.exit(1)
If I for example have lighttpd at eth0:80, the script will stop, although fednode actually doesn't need that port (it may actually need just br0:80, for example).
This check also makes the --mongodb-interface tweak ineffective. Say my mongodb is listening on 127.0.0.1:27017. Now --mongodb-interface 127.0.0.2 can't help me because the script will still stop anyway. At this point I need to stop mongodb and then run fednode --mongodb-interface 127.0.0.2 to get anywhere but even then this can be dangerous because what if my pre-existing mongodb binds 0.0.0.0:27017? It doesn't by default, but some people may have it configured that way.
But although this check doesn't work very well, I wouldn't change it (to make it check ports on federatednode_default:* bridge, for example) because that would make the script less flexible.
For now I'm just creating this issue to document some workarounds in case people (again) run into this problem (for time being those who know what they're doing can edit the fednode or tweak existing app configs) and for the purpose of brainstorming for later development.
In https://github.com/CounterpartyXCP/federatednode/blob/master/fednode.py#L36 we look for service ports (and not interfaces):
In https://github.com/CounterpartyXCP/federatednode/blob/2.2.2/fednode.py#L221 we stop if we detect a conflict.
If I for example have lighttpd at eth0:80, the script will stop, although fednode actually doesn't need that port (it may actually need just br0:80, for example).
This check also makes the
--mongodb-interface
tweak ineffective. Say my mongodb is listening on 127.0.0.1:27017. Now--mongodb-interface 127.0.0.2
can't help me because the script will still stop anyway. At this point I need to stop mongodb and then runfednode --mongodb-interface 127.0.0.2
to get anywhere but even then this can be dangerous because what if my pre-existing mongodb binds 0.0.0.0:27017? It doesn't by default, but some people may have it configured that way.But although this check doesn't work very well, I wouldn't change it (to make it check ports on
federatednode_default:*
bridge, for example) because that would make the script less flexible.For now I'm just creating this issue to document some workarounds in case people (again) run into this problem (for time being those who know what they're doing can edit the fednode or tweak existing app configs) and for the purpose of brainstorming for later development.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: