• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

could not contact update server

Seolh

New Member
Hello,

My Bot crashes on boot, but it can be started after boot with systemctl start sinusbot after boot.


Code:
 sinusbot.service - Sinusbot, the Teamspeak 3 and Discord music bot.
   Loaded: loaded (/lib/systemd/system/sinusbot.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since Tue 2018-07-03 23:53:38 CEST; 24min
  Process: 855 ExecStopPost=/bin/rm -f /tmp/.sinusbot.lock (code=exited, status=
  Process: 767 ExecStart=/opt/sinusbot/sinusbot (code=exited, status=255)
  Process: 745 ExecStartPre=/bin/rm -f /tmp/.sinusbot.lock (code=exited, status=
 Main PID: 767 (code=exited, status=255)

Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: 2018/07/03 23:53:38 [GENERAL/SCR
Jul 03 23:53:38 Server.seolh.net sinusbot[767]: could not contact update server
Jul 03 23:53:38 Server.seolh.net systemd[1]: sinusbot.service: Main process exit
Jul 03 23:53:38 Server.seolh.net systemd[1]: sinusbot.service: Failed with resul


diagSinusbot.sh output:




Code:
==========================================================
SINUSBOT RELATED
SYSTEM INFORMATION
 - Operating System: Ubuntu 18.04 LTS
 - Kernel: Linux 4.15.0-24-generic x86_64
 - Load Average: 1.44 1.13 0.64
 - Uptime: 0 days, 0 hours, 10 minutes, 38 seconds
 - OS x64 check: OK
 - OS Updates: 0 (well done!)
 - OS Missing Packages: None
 - OS APT Last Update: 03.07.2018 23:38:17 CEST +02:00:00
 - SHELL LOCALE LANG: en_GB.UTF-8
 - Bot Start Script: not found
 - DNS resolution check: www.sinusbot.com resolved to 104.18.41.220 -> OK
 - HTTPS check with IPv4 mode: SUCCESS [Connection was established to www.sinusbot.com, CODE #200]
 - HTTPS check with IPv6 mode: IGNORE
 - CPU:
    Architecture:        x86_64
    CPU(s):              2
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Model name:          Intel(R) Celeron(R) CPU 1007U @ 1.50GHz
    CPU MHz:             1496.567
 - RAM: 634.42 MB/7.47 GB in use (8%)
 - SWAP: 0 B/1.99 GB in use (0%)
 - DISK: 187.27 GB/467.95 GB in use (40%)
 - Package versions:
   + libglib: 2.56.1-2ubuntu1

BOT INFORMATION
 - Status: not running
 - Webinterface: port locally not reachable (Port: 8087)
 - Binary: /opt/sinusbot/sinusbot
 - Binary Info: MD5 Hash: f42a573b7435a8ff04da446d5ccbe754, Perms: 755, User: sinusbot
 - Version: 0.13.37-9791176
 - TS3 Plugin: installed (md5 hash match)
   - Bot Plugin: 26551adc40e47c6d5d02517b8575d375
   - TS3 Client: 26551adc40e47c6d5d02517b8575d375
 - Config:
   - LogLevel = 3
   - TS3Path = /opt/sinusbot/teamspeak3-client/ts3client_linux_amd64 (Version 3.1.9)
   - YoutubeDLPath = /usr/local/bin/youtube-dl (does exist, version: 2018.06.25)
 - Installed scripts: advertising.js; alonemode.js; bookmark.js; followme.js; norecording.js; rememberChannel.js; welcome.js

TIME INFORMATION
 - Time (local): 04.07.2018 00:04:13 CEST +02:00:00
 - Time (remote): 04.07.2018 00:04:13 CEST +02:00:00
 - Time (difference): 0 secs (Time diff less than 2 secs. Good.)
 - Timezone: Europe/Berlin

OTHER INFORMATION
 - TeamSpeak 3 Version: 3.1.9
 - youtube-dl Version: 2018.06.25
 - DiagScript Version: 0.7.1
==========================================================
 

flyth

is reticulating splines
Staff member
Developer
Contributor
That's no crash. Make sure the bot starts after network connectivity has been established and not before.
 

Seolh

New Member
Hmm, this doesn't seems to be the issue here. Sinusbot still fails after boot if Type=Idle is set in the script.

Code:
[Unit]
Description=Sinusbot, the Teamspeak 3 and Discord music bot.
After=syslog.target network.target ts3.service

[Service]
User=sinusbot
ExecStartPre=/bin/rm -f /tmp/.sinusbot.lock
ExecStopPost=/bin/rm -f /tmp/.sinusbot.lock
ExecStart=/opt/sinusbot/sinusbot
WorkingDirectory=/opt/sinusbot
Type=Idle
KillSignal=2
SendSIGKILL=yes
Environment=QT_XCB_GL_INTEGRATION=none

[Install]
WantedBy=multi-user.target
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Sinusbot still fails after boot if Type=Idle is set in the script
<sarcasm>What a surprise!</sarcasm>
The type has nothing to do with this. I don't know why you would expect something to change.

network.target doesn't necessarily ensure that a network device is ready so try changing
After=syslog.target network.target ts3.service to After=syslog.target network.target network-online.target ts3.service

Edit:
Now that I've read the systemd docs I somewhat understand why you tried setting the type to Idle but it's still not a solution since it only runs as the last service and doesn't wait for the last target (as far as I understand this at least). Furthermore the docs also state the following:
Note that this type is useful only to improve console output, it is not useful as a general unit ordering tool, and the effect of this service type is subject to a 5s time-out, after which the service program is invoked anyway.
 
Last edited:
Top