• 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.

Solved Sinusbot libswresample.so.2

SeverusM

Member
Hi,

Have a problem starting sinusbot after adding an SSL certificate for it. I always get this error:

Code:
* sinusbot.service - Sinusbot, the Teamspeak 3 and Discord music bot.
   Loaded: loaded (/lib/systemd/system/sinusbot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-11-01 12:42:22 CET; 1min 2s ago
Process: 103 ExecStartPre=/bin/rm -f /tmp/.sinusbot.lock (code=exited, status=0/SUCCESS)
Process: 125 ExecStart=/opt/sinusbot/sinusbot (code=exited, status=127)
Process: 132 ExecStopPost=/bin/rm -f /tmp/.sinusbot.lock (code=exited, status=0/SUCCESS)
Main PID: 125 (code=exited, status=127)

Nov 01 12:42:22 TS-MC01 systemd[1]: Starting Sinusbot, the Teamspeak 3 and Discord music bot....
Nov 01 12:42:22 TS-MC01 systemd[1]: Started Sinusbot, the Teamspeak 3 and Discord music bot..
Nov 01 12:42:22 TS-MC01 sinusbot[125]: /opt/sinusbot/sinusbot: error while loading shared libraries: libswresample.so.2: cannot open shared object file: No such file or directory
Nov 01 12:42:22 TS-MC01 systemd[1]: sinusbot.service: Main process exited, code=exited, status=127/n/a
Nov 01 12:42:22 TS-MC01 systemd[1]: sinusbot.service: Failed with result 'exit-code'.

The Bot was starting before adding the SSL certificate just fine. I only edited the SSL Details in config and changed the Port to 443, while allowing sinusbot binary to listen to lower-level ports.

I rechecked the dependencies x11vnc xvfb libxcursor1 ca-certificates curl bzip2 libnss3 libegl1-mesa x11-xkb-utils libasound2 libpci3 libxslt1.1 libxkbcommon0 libxss1 libxcomposite1 libglib2.0-0, but everything is installed. And even after reinstalling the packages and rebooting, it won't start.

Any expert here? My search unfortunately found no threads with a solution, besides checking the dependencies.

Part of my Config (Hostname is set to the correct value for the certificate, just changed it here due to privacy. Same for LicenseKey):
Code:
TS3Path = "/opt/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/sinusbot/data/"
ListenPort = 443
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
YoutubeDLPath = ""
EnableDebugConsole = false
EnableInternalCommands = false
AllowStreamPush = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
ExternalFileBase = ""
InstanceActionLimit = 6
UseSSL = true
SSLKeyFile = "/opt/sinusbot/ssl/privkey.pem"
SSLCertFile = "/opt/sinusbot/ssl/fullchain.pem"
Hostname = "subdomain.domain.de"
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
IsProxied = false
DenyStreamURLs = []
Pragma = 0
UserAgent = ""

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 6
  CacheStreamed = false
  TimeoutSingleDownloader = 0
  TimeoutMultiDownloader = 0
  ChunkSize = 3145728

[TS3]
  AvatarMaxWidth = 0
  AvatarMaxHeight = 0
  AllowGIF = false

[StreamRewrites]

[Scripts]
  Debug = false
  AllowReload = false
  EnableTimer = false
  DisableLegacyEvents = false
  DevMode = false
  ScriptTimeout = 5
 
Last edited:

olokos

Insider
Insider
You're either supposed to do reverse proxy so your webpanel would use https OR use http and ssl within sinusbot.
You cannot use both SSL in sinusbot and https.
SSL in sinusbot is an option for those who cannot get port 443 with proper https

If you still want to try though, you need this package ffmpeg-devel

so
sudo apt install ffmpeg-devel
 
Last edited:

SeverusM

Member
You're either supposed to do reverse proxy so your webpanel would use https OR use http and ssl within sinusbot.
You cannot use both SSL in sinusbot and https.
SSL in sinusbot is an option for those who cannot get port 443 with proper https.
How would then be the correct way? Is there any guide? I could not find a solution to that, that's why I tried as best as I could.

I don't want the Website to be reachable without HTTPS. HTTP is definitely a no go to use on a Server.

Have ffmpeg installed on my Server. ffmpeg-devel does not exist in Repos in Debian though, but if someone knows how to enable the SSL with Sinusbot, that would be appreciated.

Also when disabling SSL, in Config, the Error still persists. Since I have installed the dependencies, what could be the actual problem?

Code:
Nov 10 22:51:52 TS-MC01 systemd[1]: Starting Sinusbot, the Teamspeak 3 and Discord music bot....
Nov 10 22:51:52 TS-MC01 systemd[1]: Started Sinusbot, the Teamspeak 3 and Discord music bot..
Nov 10 22:51:53 TS-MC01 sinusbot[29071]: /opt/sinusbot/sinusbot: error while loading shared libraries: libswresample.so.2: cannot open shared object file: No such file or directory
Nov 10 22:51:53 TS-MC01 systemd[1]: sinusbot.service: Main process exited, code=exited, status=127/n/a
Nov 10 22:51:53 TS-MC01 systemd[1]: sinusbot.service: Failed with result 'exit-code'.
Nov 10 22:54:02 TS-MC01 systemd[1]: Starting Sinusbot, the Teamspeak 3 and Discord music bot....
Nov 10 22:54:02 TS-MC01 systemd[1]: Started Sinusbot, the Teamspeak 3 and Discord music bot..
Nov 10 22:54:02 TS-MC01 sinusbot[29129]: /opt/sinusbot/sinusbot: error while loading shared libraries: libswresample.so.2: cannot open shared object file: No such file or directory
Nov 10 22:54:02 TS-MC01 systemd[1]: sinusbot.service: Main process exited, code=exited, status=127/n/a
Nov 10 22:54:02 TS-MC01 systemd[1]: sinusbot.service: Failed with result 'exit-code'.
 
Last edited:

flyth

is reticulating splines
Staff member
Developer
Contributor
what could be the actual problem?
The libswresample.so.2 should be inside the bot directory, no need to install ffmpeg as dependency. If the binary can't find it, you've probably set the working dir to something else in your start script. Try using the default one if possible or make sure you cd into the bot directory (making it the pwd) before starting it.

The issue you have doesn't have anything to do with SSL btw. - you probably changed some things to be able to make the bot listen on a lower port (443), try to check what you did there first.
 

SeverusM

Member
The libswresample.so.2 should be inside the bot directory, no need to install ffmpeg as dependency. If the binary can't find it, you've probably set the working dir to something else in your start script. Try using the default one if possible or make sure you cd into the bot directory (making it the pwd) before starting it.

The issue you have doesn't have anything to do with SSL btw. - you probably changed some things to be able to make the bot listen on a lower port (443), try to check what you did there first.
Thanks. Somehow the file permissions were wrong. I fixed the permissions up now, it works again. Even with the SSL Communication. Thanks.
 
Top