TiddlyServer on Raspberry Pi 3 with Stretch Raspbian and host 0.0.0.0

145 views
Skip to first unread message

Ron Sharp

unread,
Nov 18, 2017, 11:24:42 AM11/18/17
to TiddlyWiki
I ran into a snag following instructions for installing TiddlyServer on a Pi:

https://www.didaxy.com/tiddlyserver-on-the-raspberry-pi

Running for localhost works fine, but trying put it on the LAN generates an EADDRINUSE exception, no matter which port is used, which was a head-scratcher because a single Tiddlywiki server works fine.

The problem is probably that Raspbian Stretch changed a lot of networking behavior, and node.js is in fast-moving state of flux. (v8.9.1)

Stretch generates interfaces for lo, eth0 and wlan0, even if the wifi isn't being used.
Listening for host 0.0.0.0 tries all the interfaces, and goes boom.

The solution/workaround is to use the exact IP address of the correct interface. (I've assigned fixed IP addresses on the LAN, so that isn't a problem for me.) It's working fine now, thanks!

{ Error: listen EADDRINUSE 0.0.0.0:8888
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:678:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8888 }
caught process uncaughtException

TonyM

unread,
Nov 19, 2017, 2:23:49 AM11/19/17
to TiddlyWiki
Ron,

Thanks for keeping the community updated. I suppose this is an example of the system giving you exactly what you asked for (hosting on all IP Addresses) and as a result not working. Asking a more specific question to host it on this address solves the problem.

I have a PCDuino, running Ubuntu but not had the time to play. Have you found a way to use tiddlywiki to interact with the RasperyPi's inputs and outputs? I imaging using tiddlywiki to kick off code on a microcomputer could be very powerful. Or are you simply using the Pi as a server platform?

Regards
Tony

RichardWilliamSmith

unread,
Nov 19, 2017, 11:47:20 PM11/19/17
to TiddlyWiki
Thanks Ron, I'll look at updating the docs when I get a chance.

Regards,
Richard

PMario

unread,
Nov 20, 2017, 3:04:49 AM11/20/17
to TiddlyWiki
Hi Ron,

Did you try different ports?

-m
Reply all
Reply to author
Forward
0 new messages