I'm trying to install flood for the first time, but I get this error:
realnot@jupiter ~/flood $ npm start
[email protected] start /home/realnot/flood
node ./server/bin/www
removed 0 entries from weekSnapshot
removed 0 entries from monthSnapshot
removed 0 entries from fiveMinSnapshot
removed 0 entries from hourSnapshot
removed 0 entries from daySnapshot
removed 0 entries from thirtyMinSnapshot
GET /api/history?snapshot=fiveMin 304 27.870 ms - -
GET /api/client/torrents 304 21.549 ms - -
GET /api/stats 500 30.772 ms - 59
GET /api/client/torrents/taxonomy 304 1.648 ms - -
GET /api/notifications?limit=10&start=0 304 1.213 ms - -
GET /api/history?snapshot=fiveMin 304 5.246 ms - -
GET /api/client/torrents 304 12.512 ms - -
GET /api/stats 500 13.749 ms - 59
GET /api/client/torrents/taxonomy 304 2.328 ms - -
GET /api/notifications?limit=10&start=0 304 3.629 ms - -
GET /api/history?snapshot=fiveMin 304 1.384 ms - -
GET /api/stats 500 3.971 ms - 59
GET /api/client/torrents 304 1.429 ms - -
GET /api/client/torrents/taxonomy 304 0.679 ms - -
GET /api/notifications?limit=10&start=0 304 0.831 ms - -
GET /api/history?snapshot=fiveMin 304 2.660 ms - -
GET /api/stats 500 5.198 ms - 59
GET /api/client/torrents 304 0.788 ms - -
GET /api/client/torrents/taxonomy 304 0.711 ms - -
GET /api/notifications?limit=10&start=0 304 1.455 ms - -

Sorry you're experiencing this @realnot. What version of Node are you running?
I just pushed a commit that will help debug this. Can you git pull the master branch and then run NODE_ENV=development npm start to start Flood? After that try to access the UI, the error trace will show up in the node server's output with more details as to what triggered the error.
As it is right now, it's hard to tell what's going on because I removed the error traces. The commit I just pushed will show the error trace when the NODE_ENV environment variable is development.
Hi @jfurrow, thanks for you reply. I follow your suggestion, here the output:
realnot@jupiter ~/flood $ NODE_ENV=development npm start
> [email protected] start /home/realnot/flood
> node ./server/bin/www
removed 0 entries from fiveMinSnapshot
removed 0 entries from hourSnapshot
removed 0 entries from thirtyMinSnapshot
removed 0 entries from daySnapshot
removed 0 entries from weekSnapshot
removed 0 entries from monthSnapshot
Trace: { Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:569:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
at ClientRequest.onCompleteFn (/home/realnot/flood/server/util/ajaxUtil.js:8:19)
at ClientRequest.handleError (/home/realnot/flood/server/models/ClientRequest.js:77:12)
at _rejected (/home/realnot/flood/node_modules/q/q.js:844:24)
at /home/realnot/flood/node_modules/q/q.js:870:30
at Promise.when (/home/realnot/flood/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/home/realnot/flood/node_modules/q/q.js:788:41)
at /home/realnot/flood/node_modules/q/q.js:604:44
at runSingle (/home/realnot/flood/node_modules/q/q.js:137:13)
at flush (/home/realnot/flood/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
GET /api/stats 500 82.937 ms - 59
GET /api/client/torrents 304 78.805 ms - -
GET /api/history?snapshot=fiveMin 304 96.511 ms - -
GET /api/notifications?limit=10&start=0 304 60.452 ms - -
GET /api/client/torrents/taxonomy 304 1.268 ms - -
Currently I'm running NodeJS 6.9.4 stable on my Linux server 3.14.14-gentoo #3 SMP Wed Mar 18 23:14:17 CET 2015 x86_64 Intel(R) Pentium(R) CPU G3220 @ 3.00GHz GenuineIntel GNU/Linux
Update:
Tried also with NodeJS 7.5, still the same error.
I have the same issue.
Sorry guys, I'll fix this ASAP.
@kkszysiu @realnot I'm still having trouble reproducing this... I have some questions:
config.js? Are you using sockets? If not, are you connecting to an instance of rTorrent that is running on the same machine as Flood?It looks like the ECONNRESET error is due to the Node server being unable to connect to rTorrent at all and is failing immediately. Still trying to reproduce...
@jfurrow here the info:
1) As you can see, rtorrent is compiled with xmlrpc, ipv6 and daemon support.
[I] net-p2p/rtorrent
Available versions: 0.9.3 (~)0.9.4-r1 0.9.6 {daemon debug ipv6 selinux test xmlrpc}
Installed versions: 0.9.6(06:00:36 PM 02/09/2017)(daemon ipv6 xmlrpc -debug -selinux -test)
Homepage: https://rakshasa.github.io/rtorrent/
Description: BitTorrent Client using libtorrent
2) Never tried.
3) The config.js is really basic, I didn't changed so much, just to test the UI:
const CONFIG = {
baseURI: '/',
dbCleanInterval: 1000 * 60 * 60,
dbPath: './server/db/',
floodServerPort: 3000,
maxHistoryStates: 30,
pollInterval: 1000 * 5,
secret: 'flood',
scgi: {
host: 'localhost',
port: 6969,
socket: false,
socketPath: '/tmp/rtorrent.sock'
},
ssl: false,
sslKey: '/absolute/path/to/key/',
sslCert: '/absolute/path/to/certificate/'
};
module.exports = CONFIG;
I removed everything, cloned the repo again and downloaded dependencies and
it's working again for me.
Weird.
@kkszysiu may you share your config please? are you using the socket to communicate with rtorrent?
Is the same, except for the port. In my rtorrent config I have a range of ports, but this doesn't matter, because if you set the wrong port you get the error:
Connection refused at 127.0.0.1:<port>. Check these values in config.js and ensure that rTorrent is running.
@realnot Can you post your rtorrent.rc config? What's the value of scgi_port?
The value of scgi.host and scgi.port in config.js need to be match the hostname and port exposed by rTorrent.
@jfurrow yes, here the config: https://gist.github.com/realnot/e7fe17cf7e2192bd852aa80e6fae8c81
@realnot Add the following to rtorrent.rc: scgi_port = 127.0.0.1:5000. Then restart rTorrent and Flood and post results.
Now it works, but I don't get why rtorrent on Gentoo is not shipped with scgi_port. Here the default rtorrent config: https://gist.github.com/realnot/8884245be4410ff867c4ee067f40df22
And whatss the different between port_range and scgi_port? the cgi on scgi_port is for common gateway interface? may you explain this please?
I filled a bug to ask if is possible to add the parameter scgi_port by default in the doc. If an user decide to go with xmlrpc this should be reported in the doc. Is not weird that an official configuration template is shipped without all parameters?
I'm glad it's working for you.
I don't think it's that weird because not everyone wants to control rTorrent remotely. There are a huge number of config options. I'm going to close this as it's not an issue with Flood.
Most helpful comment
@realnot Add the following to
rtorrent.rc:scgi_port = 127.0.0.1:5000. Then restart rTorrent and Flood and post results.