omar-haris / nginx-rtmp-monitoring

real-time monitoring statistics dashboard for nginx rtmp module
MIT License
293 stars 92 forks source link

i got this error #2

Open petrichbg opened 7 years ago

petrichbg commented 7 years ago

node server.js buffer.js:74 throw new Error( ^

Error: If encoding is specified then the first argument must be a string at new Buffer (buffer.js:74:13) at new FetchStream (/var/www/galaxy.net-plus.bg/html/node_modules/fetch/lib/fetch.js:41:27) at fetchUrl (/var/www/galaxy.net-plus.bg/html/node_modules/fetch/lib/fetch.js:386:23) at Timeout._onTimeout (/var/www/galaxy.net-plus.bg/html/server.js:80:3) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5)

can u help me ?

omar-haris commented 7 years ago

@petrichbg what is config file you using share it with me?

petrichbg commented 7 years ago

{ "site_title":"RTMP Monitoring", "http_server_port":9991, "rtmp_server_refresh":3000, "rtmp_server_timeout":15000, "rtmp_server_url":"http://galaxy.net-plus.bg:8000/stat.xml", "rtmp_server_stream_url":"rtmp://http://galaxy.net-plus.bg:1935/live/", "language":"en", "template":"default", "version":"1.0.0" }

omar-haris commented 7 years ago

maybe you need to add stream to your sever your config is ok

maddygoround commented 7 years ago

Any solution on this ?

Max01010101010101 commented 7 years ago

same here

GinRyan commented 7 years ago

yes ,same error here. The url exists, but always showing me buffer.js:74 throw new Error( ^

Error: If encoding is specified then the first argument must be a string at new Buffer (buffer.js:74:13) at new FetchStream (M:\nginx-rtmp-monitoring\node_modules\fetch\lib\fetch.js:41:27) at fetchUrl (M:\nginx-rtmp-monitoring\node_modules\fetch\lib\fetch.js:386:23) at Timeout._onTimeout (M:\nginx-rtmp-monitoring\server.js:80:3) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

My config file is :

{ "site_title":"RTMP Monitoring", "http_server_port":9991, "rtmp_server_refresh":3000, "rtmp_server_timeout":15000, "rtmp_server_url":"http://localhost/stat.xml", "rtmp_server_stream_url":"rtmp://localhost/live/", "language":"en", "template":"default", "version":"1.0.0" }

url http://localhost/stat.xml and rtmp://localhost/live/ acceptable.

RickyRatchet1 commented 7 years ago

petrichbg you have rtmp://html://

RickyRatchet1 commented 7 years ago

from monitor folder check for versions # npm -v # node -v I did not show node however i did show nodejs so nodejs server.js worked for me