@Freelancer Is this you? https://github.com/NodeBB/NodeBB/issues/10632
Disable the admin timeout and that should resolve it.
@accalia ---
@Domas-Vileikis hmm... well other than nodebb being very confused with the formatting that looks okay.
can you run the bot as follows and post the results to me via chat? This command will be very verbose with debugging information and may contain sensitive information so please do not post the results publically.
DEBUG=* sockbot config.yml
that command should provide me with additional information to figure out what's happening so we can sort you out.
@jiangcaiyang said in [sockbot] I wanted a robot, So I made one:
I want to know if people use it for malicious perpose?
yes, that's possible.
@jiangcaiyang said in [sockbot] I wanted a robot, So I made one:
For instance, some could run a script that frequently post ADs to our forum, thus cause our forum unable to run normally?
yes, but sockbot is incapable of that, it needs a manually registered account so would be far too quickly banned. there are other bots that run the spam.
@jiangcaiyang said in [sockbot] I wanted a robot, So I made one:
Is it possible to use it without administrative permission?
yes, but i hereby formally declare that anyone doing so with sockbot is a total poopy pants.
sockbot is meant for fun, not malice.
@accalia said in [sockbot] I wanted a robot, So I made one:
DEBUG=* sockbot config.yml
@Domas-Vileikis okay..... that's strange as heck.....
that's not where i expected that failure to occur.
however i do know what the cause is. and i can help you fix it.
the error occurs trying to load the configuration settings for the forum in order to get the CSRF token to log in. this is done by loading /api/config
on your forum.
so, for example, if you were running a bot for this forum the value you would have put in core.forum would be https://community.nodebb.org
and so the configuration would be at https://community.nodebb.org/api/config
can you check to make sure that when you visit the URL in your configuration for core.forum
you arrive at your forum's home page and that when loading /api/config
relative to that URL in the manner i described above your browser loads a JSON document.
if one or both of these manual checks fail then the value you put in the configuration for core.forum
is incorrect and needs to be updated. if both checks pass when tried in a browser then it is most likely your forum has some sort of security in place that is preventing sockbot's user agent access to the REST API of the forum. you will need to update the firewall rules in this case to allow sockbot access, or if you are not the administrator of the webserver your forum runs on you will need to ask your server admin to update the firewall rules for you.
hoping this gets you off and running with sockbot,
-Accalia
hi
I have an error when I run sockbot config.yml
sockbot config.yml
[2017-10-08T19:56:35.508Z] Starting Sockbot 6.3.6
[2017-10-08T19:56:35.517Z] Loaded configuration file: config.yml
[2017-10-08T19:56:35.517Z] Activating logon: LdM
[2017-10-08T19:56:35.704Z] Using provider nodebb for LdM
[2017-10-08T19:56:35.707Z] Loading plugin echo for LdM
[2017-10-08T19:56:35.708Z] LdM ready for login
[2017-10-08T19:56:36.391Z] A-derp! Fatal Startup Error: [[error:invalid-login-credentials]]
$ DEBUG=* sockbot config.yml
[2017-10-08T20:01:29.716Z] Starting Sockbot 6.3.6
[2017-10-08T20:01:29.725Z] Loaded configuration file: config.yml
[2017-10-08T20:01:29.725Z] Activating logon: LdM
sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
[2017-10-08T20:01:29.918Z] Using provider nodebb for LdM
[2017-10-08T20:01:29.922Z] Loading plugin echo for LdM
sockbot requiring plugins echo as /usr/lib/node_modules/sockbot/lib/../plugins/echo +196ms
[2017-10-08T20:01:29.923Z] LdM ready for login
sockbot:provider:nodebb begin configuration fetch for CSRF token +0ms
sockbot:provider:nodebb completed configuration fetch for CSRF token +467ms
sockbot:provider:nodebb begin post login data +0ms
sockbot:provider:nodebb Login failed for reason: [[error:invalid-login-credentials]] +267ms
sockbot Error: [[error:invalid-login-credentials]]
sockbot at errorify (/usr/lib/node_modules/sockbot/providers/nodebb/index.js:211:23)
sockbot at Request.request.post [as _callback] (/usr/lib/node_modules/sockbot/providers/nodebb/index.js:239:39)
sockbot at Request.self.callback (/usr/lib/node_modules/sockbot/node_modules/request/request.js:186:22)
sockbot at emitTwo (events.js:125:13)
sockbot at Request.emit (events.js:213:7)
sockbot at Request.<anonymous> (/usr/lib/node_modules/sockbot/node_modules/request/request.js:1163:10)
sockbot at emitOne (events.js:115:13)
sockbot at Request.emit (events.js:210:7)
sockbot at IncomingMessage.<anonymous> (/usr/lib/node_modules/sockbot/node_modules/request/request.js:1085:12)
sockbot at Object.onceWrapper (events.js:314:30) +737ms
[2017-10-08T20:01:30.659Z] A-derp! Fatal Startup Error: [[error:invalid-login-credentials]]
my password and login are ok
Namely my database is not on the server
@TheWorms
Assuming you're absolutely 100% certain the login credentials are correct in the configuration file, the only two things that come to mind are:
forum
key. are you sure you've set it correctly. If you havent set it it will default to https://what.thedailywtf.com
which is almost certainly not what you want.sockbot config.yml
[2017-10-09T17:54:15.156Z] Starting Sockbot 6.3.6
[2017-10-09T17:54:15.165Z] Loaded configuration file: config.yml
[2017-10-09T17:54:15.165Z] Activating logon: LdM
[2017-10-09T17:54:15.357Z] Using provider nodebb for LdM
[2017-10-09T17:54:15.361Z] Loading plugin echo for LdM
[2017-10-09T17:54:15.362Z] LdM ready for login
[2017-10-09T17:54:15.404Z] A-derp! Fatal Startup Error: connect ECONNREFUSED 1xx.1xx.1xx.2xx:443
DEBUG=* sockbot config.yml
[2017-10-09T18:04:37.268Z] Starting Sockbot 6.3.6
[2017-10-09T18:04:37.277Z] Loaded configuration file: config.yml
[2017-10-09T18:04:37.278Z] Activating logon: LdM
sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
[2017-10-09T18:04:37.469Z] Using provider nodebb for LdM
[2017-10-09T18:04:37.473Z] Loading plugin echo for LdM
sockbot requiring plugins echo as /usr/lib/node_modules/sockbot/lib/../plugins/echo +195ms
[2017-10-09T18:04:37.474Z] LdM ready for login
sockbot:provider:nodebb begin configuration fetch for CSRF token +0ms
sockbot:provider:nodebb failed configuration fetch for CSRF token +38ms
sockbot Error: connect ECONNREFUSED 192.168.1.2:443
sockbot at Object._errnoException (util.js:1019:11)
sockbot at _exceptionWithHostPort (util.js:1041:20)
sockbot at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1175:14) +40ms
[2017-10-09T18:04:37.513Z] A-derp! Fatal Startup Error: connect ECONNREFUSED 1xx.1xx.1xx.2xx:443
huh. connection refused, that's a new one, and not something I can help with. You'll have to contact the one running the forum you're connecting to and find out from them why your bot is being refused connection.
Sorry, but that error really isn't something i can sort out on my end. it's on the server side.