'Error: Could not bind'
See original GitHub issueExpected Behaviour:
Using the dat-sdk in two different instances of node should allow for cross-process swarming
Actual behaviour:
Requiring the dat-sdk while it is open in another node instance produces a traceback, and replication does not occur between processes
Environment:
Ubuntu on Windows Subsystem for Linux, node v10.16.0
Traceback:
> const {Hypercore} = require('dat-sdk')();
undefined
> Thrown:
{ Error: Could not bind
at UTP.bind (/mnt/c/Users/Delta/Documents/hyperchat/node_modules/discovery-swarm/node_modules/utp-native/index.js:178:18)
at UTP.listen (/mnt/c/Users/Delta/Documents/hyperchat/node_modules/discovery-swarm/node_modules/utp-native/index.js:190:32)
at Server.ontcplisten (/mnt/c/Users/Delta/Documents/hyperchat/node_modules/discovery-swarm/index.js:510:15)
at Server.emit (events.js:198:13)
at Server.EventEmitter.emit (domain.js:466:23)
at emitListeningNT (net.js:1313:10)
at process._tickCallback (internal/process/next_tick.js:63:19)
domainEmitter:
Hyperdiscovery {
domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} },
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_opts: { extensions: [] },
id:
<Buffer 9e f9 c7 ea 7f a1 1a ff d1 7c 0e c3 45 95 06 44 15 e5 d0 e8 8c f8 32 8a bf 56 e4 38 d6 e3 98 8a>,
_port: 3282,
_portAlts: [ 3000, 3002, 3004, 2001, 2003, 2005 ],
_swarm:
Swarm {
domain: [Domain],
_events: [Object],
_eventsCount: 13,
_maxListeners: undefined,
maxConnections: 0,
totalConnections: 0,
connections: [],
id:
<Buffer 9e f9 c7 ea 7f a1 1a ff d1 7c 0e c3 45 95 06 44 15 e5 d0 e8 8c f8 32 8a bf 56 e4 38 d6 e3 98 8a>,
destroyed: false,
_stream: [Function: bound _createReplicationStream],
_options: [Object],
_whitelist: [],
_discovery: null,
_tcp: [Server],
_utp: [UTP],
_tcpConnections: [EventEmitter],
_adding: [],
_listening: true,
_peersIds: {},
_peersSeen: {},
_peersQueued: [] },
_replicatingFeeds: Map {} },
domain:
Domain {
domain: null,
_events:
[Object: null prototype] {
removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} },
domainThrown: false }
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Apache Network Error AH00072: make_sock: could not bind ...
The error is derived from the underlying operating system system's network stack. The issue is that only a single process can be bound...
Read more >CouldNotBindToAddress - Apache Software Foundation
When trying to bind to an IP and port not present on the host system, apache httpd will fail to start. For example,...
Read more >'could not bind socket' error - Google Groups
Hello,. I have an application which frequently fails to start with the message: "Could not bind socket. Address and port are already in...
Read more >What does "Could not bind socket. Address and port are ...
"Could not bind socket. Address and port are already in use" usually appears if PRTG can't find any free ports between 1024-5000. This...
Read more >Could not bind socket. Address and port are already in use.
To do so, open the program options by going to Edit -> Options -> Browsers and change the value of the WebSockets port....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It could be that up-native failed in your machine. Can you try node 8? And in the first few lines of discovery-swarm there is a try catch around the requiring of up-native and it doesn’t print anything… try printing there.
Gonna close this for now since it’s not reproducing.