Closed RandomUsN closed 3 years ago
did you run bashbot.sh init? are the commands and possible errors shown in the log files?
to get also bash error messages in debuglog run bashbot in debug mode https://github.com/topkecleon/telegram-bot-bash/blob/master/doc/7_develop.md
Yes, run bashbot.sh init.
I started the bot with debug:
./bashbot.sh start debug
The log file logs/DEBUG.log now contains records about several of my messages, but after 2 minutes they are no longer written to the log, only getUpdates: ... Sat Nov 28 09:57:16 UTC 2020: getJson (wget) URL=getUpdates?offset=1 Sat Nov 28 09:57:16 UTC 2020: getJson (wget) URL=getUpdates?offset=340212372 Sat Nov 28 09:57:17 UTC 2020: getJson (wget) URL=getUpdates?offset=1 ... Sat Nov 28 09:58:38 UTC 2020: getJson (wget) URL=getUpdates?offset=1 Sat Nov 28 09:58:38 UTC 2020: getJson (wget) URL=getUpdates?offset=340212373 Sat Nov 28 09:58:39 UTC 2020: getJson (wget) URL=getUpdates?offset=1 ... Sat Nov 28 10:19:17 UTC 2020: getJson (wget) URL=getUpdates?offset=1
ok, I see bashbot is using wget, did you configure it this way? if not, bashbot does not find curl or curl is not installed
in case you have installed curl, what's the output of:
type -t curl
which curl
I didn't have installed curl. I installed it.
curl --version
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3 Release-Date: 2019-02-06 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
type -t curl
file
which curl
/usr/bin/curl
The logs/DEBUG.log stopped writing records about wget, but the situation did not change.
Sat Nov 28 13:26:41 UTC 2020: debug_checks: start SOURCE=no: bashbot.sh start debug: debug_checks: : bashbot.sh Sat Nov 28 13:26:41 UTC 2020: debug_checks: start SOURCE=no: bashbot.sh startbot debug: debug_checks: BOT_bot-startbot: bashbot.sh Sat Nov 28 13:26:41 UTC 2020: Start BASHBOT updates in Mode "debug" ========== Sat Nov 28 13:26:42 UTC 2020: debug_checks: end start: bashbot.sh start debug: debug_checks: : bashbot.sh
ok, so it's not wget related ... hm ...
as curl wasn't installed, is iconv installed? this is not mentioned as prerequisite but used in the get_updates loop ...
Yes, iconv installed:
iconv --version
iconv (Debian GLIBC 2.28-10) 2.28 Copyright (C) 2018 Free Software Foundation, Inc.
ok, on Ubuntu it's working, I have to try a Debian installation.
pls try if the dev version version for 1.2 fix your problem https://github.com/topkecleon/telegram-bot-bash/releases/tag/v1.2-dev
use the v1.2-dev files for installation/update, see https://github.com/topkecleon/telegram-bot-bash/blob/master/doc/0_install.md
I downloaded and checked dev version 1.2, but the problem is not fixed.
grep "VERSION" README.md
$$VERSION$$ v1.1-0-ge835bbc
bashbot is running several hours on my virtual debian, so far no problems
did you run bashbot with "./bashbot.sh startbot" in the terminal or did you try to run it with "bashbot.rc" example script in background??
I only started bashbot with ./bashbot.sh start
and ./bashbot.sh start debug
. I expected this to be enough. Do I need to do this with "bashbot.rc"?
Process is active:
/bin/bash ./bashbot.sh startbot debug BOT_bot-startbot
OK, no this is corrrect, will the bot also stop working if you use the undocumented startbot command? In this case the bot will not be disconnected from terminal ...
./bashbot.sh startbot
I testet it in a fresh VM with Debian Buster and tried it several times, but can not reproduce your problem, it was working in all cases.
If you know bash well, you can set log level to debugx
then every executed bash command is logged to DEBUG.log
.
May be you can find the offending problem there ...
For now I set the issue to invalid, as I can't reproduce it.
I created a new bot in telegram and the bashbot works with it correctly.
After starting the bot, it does not work all the time. It stops processing commands after 1-2 minutes, but the process is active. Please check and let me know how I can fix this.
root@test:/home/utest/telegram-bot-bash# ps aux | grep bot root 2512 0.0 0.0 6080 884 pts/1 S+ 22:02 0:00 grep bot root 21710 0.0 0.4 9772 4640 pts/0 S 20:59 0:00 /bin/bash ./bashbot.sh startbot BOT_bot-startbot
root@test:/home/utest/telegram-bot-bash# ./bashbot.sh status Bot is running with UID root.