• 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 Webinterface not loading after configuring reverseproxy

OS: Linux Kernel 5.0.12.a-1-hardened (Arch based)
Sinusbot version: 1.0.0-beta.1-06a54d7
Webserver: Apache2

What does work:
Sinusbot correctly starts, connects to the teamspeak3 server, seems to be functional. The domain srv.example.tld/sinusbot is reachable using https and does display the loading page of the webinterface.

Before I configured the reverse proxy following the documentation, the bot worked as expected, with the webinterface being useable on srv.example.tld:8087 as expected.

What does not work:
The webinterface is now stuck in an endless loading screen, as seen here. Otherwise, the bot seems to run fine.
I am not exactly sure why the bot is still reachable but suddenly stuck at the loading screen. All other topics with a similar problem seemed to have other underlying problems. Any help is greatly appreciated.

In the following, some private or security relevant data is [censored].
The bot starts without error messages:

Code:
Jun 17 19:36:05 earth systemd[1]: Starting Sinusbot, the Teamspeak 3 and Discord music bot....
Jun 17 19:36:05 earth systemd[1]: Started Sinusbot, the Teamspeak 3 and Discord music bot..
Jun 17 19:36:05 earth sinusbot[16713]:  ___ ___ _  _ _   _ ___ ___  ___ _____
Jun 17 19:36:05 earth sinusbot[16713]: / __|_ _| \| | | | / __| _ )/ _ \_   _|
Jun 17 19:36:05 earth sinusbot[16713]: \__ \| || .` | |_| \__ \ _ \ (_) || |
Jun 17 19:36:05 earth sinusbot[16713]: |___/___|_|\_|\___/|___/___/\___/ |_|
Jun 17 19:36:05 earth sinusbot[16713]: Version: 1.0.0-beta.1-06a54d7
Jun 17 19:36:05 earth sinusbot[16713]: (C) 2013-2019 Michael Friese. All rights reserved.
Jun 17 19:36:05 earth sinusbot[16713]: Using Logfile logs/logfile

I don't see anything directly relating to the error in the logfiles:
Code:
2019/06/17 19:36:05 1ba6de6c          INFO   Loading instances
2019/06/17 19:36:05 1ba6de6c          INFO   Loading instance://3cb227f0-3e46-4fc1-9c4f-7f625e62caaf
2019/06/17 19:36:05 1ba6de6c 3cb227f0 DEBUG  executing script command
2019/06/17 19:36:05 1ba6de6c 3cb227f0 INFO   Initialization complete
2019/06/17 19:36:05 1ba6de6c 3cb227f0 INFO   Auto-Starting 1ba6de6c-d5c8-40cd-8ac2-cd4676356000/3cb227f0-3e46-4fc1-9c4f-7f625e62caaf in 500 ms...
2019/06/17 19:36:05 [GENERAL/FFMPEG ] INFO   FFmpeg/avcodec v3741798; license: LGPL version 2.1 or later; 81 codecs
2019/06/17 19:36:05 [GENERAL/FFMPEG ] INFO   FFmpeg/avformat v3742052; license: LGPL version 2.1 or later; 143 formats
2019/06/17 19:36:05 [GENERAL/YTDL   ] INFO   youtube-dl checking...
2019/06/17 19:36:05 1ba6de6c 3cb227f0 DEBUG  registered callback for event chat
2019/06/17 19:36:05 1ba6de6c 3cb227f0 DEBUG  module registered as command
2019/06/17 19:36:05 1ba6de6c 3cb227f0 INFO   script command loaded
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Prespawn.
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  About to run.
2019/06/17 19:36:06 1ba6de6c 3cb227f0 WARN   Could not create Chat-Tabletable Chat already exists
2019/06/17 19:36:06 1ba6de6c 3cb227f0 WARN   Could not create WhisperReceive-Tabletable WhisperReceive already exists
2019/06/17 19:36:06 1ba6de6c 3cb227f0 WARN   Could not create Notifications-Tabletable Notifications already exists
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not delete from FileTransferno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2019/06/17 19:36:06 1ba6de6c 3cb227f0 INFO   Starting instance [CENSORED]
2019/06/17 19:36:06 X [MAIN] New connection
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  TS>Crashdump ENABLED,  directory is: /mnt/data/sinusbot/ts3/1ba6de6c-d5c8-40cd-8ac2-cd4676356000/3cb227f0-3e46-4fc1-9c4f-7f625e62caaf/crashdumps
2019/06/17 19:36:06 1ba6de6c 3cb227f0 DEBUG  TS>DUMP defined! Dumpdir is: /mnt/data/sinusbot/ts3/1ba6de6c-d5c8-40cd-8ac2-cd4676356000/3cb227f0-3e46-4fc1-9c4f-7f625e62caaf/crashdumps
2019/06/17 19:36:06 X [MAIN] New connection
2019/06/17 19:36:06 X [MAIN] New connection
2019/06/17 19:36:06 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |TeamSpeak 3 Client 3.2.5 (2019-04-17 16:07:33)
2019/06/17 19:36:06 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |SystemInformation: Linux 5.0.12.a-1-hardened #1 SMP PREEMPT Sun May 5 13:10:07 CEST 2019 x86_64 Binary: 64bit
2019/06/17 19:36:06 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |Using hardware aes
2019/06/17 19:36:06 X [MAIN] New connection
2019/06/17 19:36:06 [GENERAL/YTDL   ] INFO   youtube-dl version compatible, support enabled
2019/06/17 19:36:06 [GENERAL/!!!!!!!] NOTICE You may now configure and launch the bots from the webinterface. http://localhost:8087
2019/06/17 19:36:06 [GENERAL/RADIO  ] INFO   RadioStation data loaded
2019/06/17 19:36:06 [GENERAL/RADIO  ] INFO   Imported radio stations
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |ERROR   |SoundBckndIntf|   |/opt/teamspeak3/soundbackends/libpulseaudio_linux_amd64.so error: NOT_CONNECTED
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |ERROR   |SoundBckndIntf|   |/opt/teamspeak3/soundbackends/libpulseaudio_linux_amd64.so error: NOT_CONNECTED
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |ClientUI      |   |Unable to create an Open GL context.
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |ERROR   |RevocationListCache|   |Failed to import revocation list from cache
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |Addons        |   |Checking for addon updates...
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |Plugins       |   |Loading plugin: libsoundbot_plugin.so
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |Plugins       |   |Loading plugin: libclientquery_plugin_linux_amd64.so
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |Plugins       |   |Failed to load plugin: /mnt/data/sinusbot/ts3/1ba6de6c-d5c8-40cd-8ac2-cd4676356000/3cb227f0-3e46-4fc1-9c4f-7f625e62caaf/plugins/libclientquery_plugin_linux_amd64.so
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |Plugins       |   |dlopen error: /mnt/data/sinusbot/ts3/1ba6de6c-d5c8-40cd-8ac2-cd4676356000/3cb227f0-3e46-4fc1-9c4f-7f625e62caaf/plugins/libclientquery_plugin_linux_amd64.so: failed to map segment from shared object
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |successfully downloaded revocation list for accounting
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |successfully downloaded revocation list for myteamspeak id
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |*** Time [MAINWINDOW]: 138
2019/06/17 19:36:07 1ba6de6c 3cb227f0 INFO   TS |INFO    |              |   |*** Time [INIT]: 138
[TS3-client connection infos omitted]
2019/06/17 19:36:09 1ba6de6c 3cb227f0 INFO   New connection status 4; Error 0
2019/06/17 19:36:09 1ba6de6c 3cb227f0 DEBUG  2568/insufficient client permissions/b_virtualserver_servergroup_client_list
2019/06/17 19:36:09 1ba6de6c 3cb227f0 DEBUG  2568/insufficient client permissions/b_virtualserver_servergroup_client_list
2019/06/17 19:36:09 1ba6de6c 3cb227f0 DEBUG  2568/insufficient client permissions/b_virtualserver_servergroup_client_list
2019/06/17 19:36:35 1ba6de6c 3cb227f0 DEBUG  Storing configuration.
config.ini: (only the license key was censored)
Code:
TS3Path = "/opt/teamspeak3/ts3client_linux_amd64"
ListenHost = "localhost"
DataDir = "/mnt/data/sinusbot/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 10
EnableProfiler = false
YoutubeDLPath = "./youtube-dl"
EnableDebugConsole = false
AllowStreamPush = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
ExternalFileBase = ""
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = "logs/logfile"
LicenseKey = "[CENSORED]"
IsProxied = true
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

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (1.0.0-beta.1-06a54d7)"
  WaitTime = 0

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

[SHMem]
  Enable = false
  Size = 0
  Delay = 0
  Interval = 0

[RadioStations]
  URL = ""
  UpdateInterval = 0

[TTS]
  Enabled = false

Contents of the relevant apache .conf-file:
Code:
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin [My mail address]
    DocumentRoot [The document root]
    ServerName [srv.example.tld]
    ErrorLog /var/log/httpd/[example.info-error_log]
    CustomLog /var/log/httpd/[example.info-access_log common]

    ProxyPass /sinusbot http://localhost:8087/
    ProxyPassReverse /sinusbot http://localhost:8087/

SSLCertificateFile /etc/letsencrypt/live/[rest of path]
SSLCertificateKeyFile /etc/letsencrypt/live/[rest of path]
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
 

flyth

is reticulating splines
Staff member
Developer
Contributor
The webinterface won't run from inside a subdirectory, so you'd have to rather choose a subdomain to use it, sorry.
 

olokos

Insider
Insider
Instead of
Code:
  ProxyPass /sinusbot http://localhost:8087/
    ProxyPassReverse /sinusbot http://localhost:8087/

Try
Code:
  ProxyPass / http://YourWebsite.com:8087/
    ProxyPassReverse / http://YourWebsite:8087/

also ServerName as "yoursubdomain.YourWebsite.com" would be a good thing to have
 
Top