@Freelancer Is this you? https://github.com/NodeBB/NodeBB/issues/10632
Disable the admin timeout and that should resolve it.
@exodo said in [sockbot] I wanted a robot, So I made one:
i work on synology so actually i think its not posible to update it
hmm... interesting. don't think i've worked with them before. I've got a QNAP NAS myself and use an Intel NUC, or a Raspberry Pi, as my test box....
still NVM should work for you, it installs to your home directory so it doesn't interfere with other users or the system.
@exodo said in [sockbot] I wanted a robot, So I made one:
thanks for the support
no worries. it's what i do. let me know if i can do anything more to help.
When i install bot ant try to run it i get error
"nodebb A-derp! Fatal Startup Error: Unexpected token < " HELP?
@Domas-Vileikis interesting error...
could you post the configuration file you are using for the bot (with password redacted for security) so i can take a look at it? most errors like this are simple typos in configuration and should be easy to solve.
Eh, usually unexpected token < is encountered when you're trying to parse JSON and you received HTML instead...
@julian true, but as this is a startup error it's highly likely to be caused by a misconfiguration in the config file (usually the wrong URL for the forum)
I want to know if people use it for malicious perpose? For instance, some could run a script that frequently post ADs to our forum, thus cause our forum unable to run normally? Is it possible to use it without administrative permission?
@jiangcaiyang They can do that without a bot, so any restrictions on the bot would be superfluous.
@yariplus So what is typical use of a bot?
Automation. It does what a human could do only faster/easier. For instance, the bot could post my messages to twitter, facebook, g+, etc. for me. It frequently also runs scripts such as this one, for playing games or funny messages, role-playing, etc..
@yariplus Maybe I will use it when I realize that it is truly useful for me. At present, I'll just see it without use 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.
@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.
oki tks
i'm use nginx proxy and host forum & sockbot in same webserver