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

Trying to use SSL with Let's encrypt

Zalati

Member
I follow the http->https redirection of this page https://wiki.sinusbot.com/en:guides:installation:reverse-proxy:apache2
but after doing this, connexion pannel of sinusbot give me a 503 error https://www.radiobot.zalati.fr/

Any way to help me ? :3

When starting sinusbot got this :
Code:
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin adpi_en_1.4.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin advertising.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin alonemode.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin bookmark.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin followme.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin nickCrashHelper.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin norecording.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin rememberChannel.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin rss2.js
2018/06/02 20:04:30 [GENERAL/SCRIPTS] INFO   Loading ScriptPlugin welcome.js
2018/06/02 20:04:30 2dfa9d3f          INFO   Loading instances
2018/06/02 20:04:30 2dfa9d3f          INFO   Loading instance://e88ba08f-7b61-4c3f-9b89-18c07021ebd0
2018/06/02 20:04:30 2dfa9d3f e88ba08f INFO   Loading script adpi_en_1.4
2018/06/02 20:04:30 2dfa9d3f e88ba08f INFO   Loading script nickCrashHelper
2018/06/02 20:04:30 2dfa9d3f e88ba08f INFO   Initialization complete
2018/06/02 20:04:30 2dfa9d3f e88ba08f INFO   Auto-Starting 2dfa9d3f-987e-4567-b3a6-989f4b0786d8/e88ba08f-7b61-4c3f-9b89-18c07021ebd0 in 500 ms...
2018/06/02 20:04:30 2dfa9d3f e88ba08f INFO   Last track was , will auto-play soon
2018/06/02 20:04:30 2dfa9d3f          INFO   Loading instance://63d7c243-7974-4991-9f8b-c5d4e84683e6
2018/06/02 20:04:30 2dfa9d3f 63d7c243 INFO   Loading script nickCrashHelper
2018/06/02 20:04:30 2dfa9d3f 63d7c243 INFO   Loading script adpi_en_1.4
2018/06/02 20:04:30 2dfa9d3f 63d7c243 INFO   Initialization complete
2018/06/02 20:04:30 2dfa9d3f 63d7c243 INFO   Auto-Starting 2dfa9d3f-987e-4567-b3a6-989f4b0786d8/63d7c243-7974-4991-9f8b-c5d4e84683e6 in 1000 ms...
2018/06/02 20:04:30 2dfa9d3f 63d7c243 INFO   Last track was , will auto-play soon
2018/06/02 20:04:30 [GENERAL/FFMPEG ] INFO   FFmpeg/avcodec v3741798; license: LGPL version 2.1 or later; 81 codecs
2018/06/02 20:04:30 [GENERAL/FFMPEG ] INFO   FFmpeg/avformat v3742052; license: LGPL version 2.1 or later; 143 formats
2018/06/02 20:04:30 [GENERAL/YTDL   ] INFO   youtube-dl checking...
2018/06/02 20:04:31 2dfa9d3f e88ba08f INFO   Auto-Playing last track
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Done playing
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Reseeding PRNG
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Done playing
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Prespawn.
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  About to run.
2018/06/02 20:04:31 2dfa9d3f e88ba08f WARN   Could not create Chat-Tabletable Chat already exists
2018/06/02 20:04:31 2dfa9d3f e88ba08f WARN   Could not create WhisperReceive-Tabletable WhisperReceive already exists
2018/06/02 20:04:31 2dfa9d3f e88ba08f WARN   Could not create Notifications-Tabletable Notifications already exists
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not delete from FileTransferno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Could not insert into FileTransfer-Tableno such table: FileTransfer
2018/06/02 20:04:31 2dfa9d3f e88ba08f INFO   Starting instance ts3server://ts.zalati.fr?port=9987&nickname=Radio%20%231&password=&cid=65&channelpassword=
2018/06/02 20:04:31 2dfa9d3f e88ba08f INFO   Playing next from playlist: ytdl://ytdl/?url=XuTc9mBgHjQ&album=&title=%E2%99%ABNightcore%E2%99%AB+We+Fall+Apart+%5BWe+As+Human%5D
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Done playing
2018/06/02 20:04:31 2dfa9d3f e88ba08f INFO   Playing next from playlist: ytdl://ytdl/?url=y0zBrJRIOB8&album=&title=%E2%99%ABNightcore%E2%99%AB+This+Time+It%27s+Different+%5BEvans+Blue%5D
2018/06/02 20:04:31 2dfa9d3f e88ba08f DEBUG  Done playing
2018/06/02 20:04:31 X [MAIN] New connection
2018/06/02 20:04:31 [GENERAL/YTDL   ] INFO   youtube-dl version compatible, support enabled
2018/06/02 20:04:31 [GENERAL/!!!!!!!] NOTICE You may now configure and launch the bots from the webinterface. http://localhost:8087

Bots won't connect to teamspeak and website is unreachable
 
Last edited:

Runningcore

Well-Known Member
Contributor
Error 503 means more or less like something like the address what you added to the apache config as proxy url (the one of the sinusbot panel) is not available.
Please make sure you are able to reach sinusbot web panel from the server the apache is running on.
 

Zalati

Member
Hummmm :/

Code:
root@vps509240:~# curl -I https://localhost:8087
curl: (7) Failed to connect to localhost port 8087: Connection refused
root@vps509240:~# curl -I localhost:8087
curl: (7) Failed to connect to localhost port 8087: Connection refused
root@vps509240:~# curl -I www.radiobot.zalati.fr
HTTP/1.1 301 Moved Permanently
Date: Sat, 02 Jun 2018 22:41:23 GMT
Server: Apache/2.4.10 (Debian)
Location: https://www.radiobot.zalati.fr/
Content-Type: text/html; charset=iso-8859-1
 

Runningcore

Well-Known Member
Contributor
Hummmm :/

Code:
root@vps509240:~# curl -I https://localhost:8087
curl: (7) Failed to connect to localhost port 8087: Connection refused
root@vps509240:~# curl -I localhost:8087
curl: (7) Failed to connect to localhost port 8087: Connection refused
root@vps509240:~# curl -I www.radiobot.zalati.fr
HTTP/1.1 301 Moved Permanently
Date: Sat, 02 Jun 2018 22:41:23 GMT
Server: Apache/2.4.10 (Debian)
Location: https://www.radiobot.zalati.fr/
Content-Type: text/html; charset=iso-8859-1
seems like you facing the issue as i expected it..
can you check what happens if you change your sinusbot config to match something like 127.0.0.1 on port 8087 and adjust your apache config?
 

Zalati

Member
Apache config :

Code:
<VirtualHost *:80>
    ServerName www.radiobot.zalati.fr
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    RewriteEngine on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

</VirtualHost>

<VirtualHost *:443>
    ServerName www.radiobot.zalati.fr
    
    SSLEngine On
    SSLCertificateFile    /etc/letsencrypt/live/www.radiobot.zalati.fr/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/www.radiobot.zalati.fr/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/www.radiobot.zalati.fr/fullchain.pem
    
    ProxyPass / https://127.0.0.1:8087/
    ProxyPassReverse / https://127.0.0.1:8087/
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Sinusbot config part :

Code:
TS3Path = "/opt/sinusbot/teamspeak3-client/ts3client_linux_amd64"
ListenHost = "127.0.0.1"
DataDir = "/opt/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 10
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = true
SSLKeyFile = "/etc/letsencrypt/live/www.radiobot.zalati.fr/privkey.pem"
SSLCertFile = "/etc/letsencrypt/live/www.radiobot.zalati.fr/cert.pem"
Hostname = "www.radiobot.zalati.fr"
HostnameMask = "www.radiobot.zalati.fr"
SampleInterval = 60
StartVNC = false
EnableWebStream = true
LogFile = "/opt/sinusbot/log"
LicenseKey = "Generated license key"
IsProxied = true
DenyStreamURLs = []
Pragma = 0

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  CacheStreamed = false

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

[StreamRewrites]

[Scripts]
  AllowReload = false
  EnableTimer = false
  DisableLegacyEvents = false
  ScriptTimeout = 5

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (0.11.0-8e5f1a2)"

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

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

[RadioStations]
  URL = ""
  UpdateInterval = 0
 

Runningcore

Well-Known Member
Contributor
Please put
UseSSL = false
and these can be blank:
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
 

Zalati

Member
Now I need to fix this link to use ssl https://radio.zalati.fr/ because actually got this :/

Code:
Mixed Content: The page at 'https://radio.zalati.fr/' was loaded over HTTPS, but requested an insecure video 'http://91.134.135.223:8087/api/v1/b/bot/i/92d8b3aa-3733-41b1-b396-d8c0b752b997/stream/uQHwuHsiaSI6Ijg2NTk2Y2E0LWIxOTYtNDU2Yy05NmYzLWM5ZGFlNzA1Y2E0ZSIsImIiOiI3ZWY1NjIyMC0yYjNlLTQ3ZmQtYTk5MC02YzI5NGJmOWVhMDQiLCJ1IjoiYWRtaW4iLCJ0IjoxNTI3OTgzNDE3LCJzIjoiMWY1Nzc3Nzk2NmVkMjBjMjVhODJkNjNlMDQyZjUxMGVhMzVjMjFhYTUzM2I0MzdjYWFlMDU1ZmU1NTdkZTEzYSJ9'. This content should also be served over HTTPS.
 

Zalati

Member
Thank you so much !
With this it's working !
Code:
#------Do NOT modify the following (without good reason):------#
$sinusbotURL = "https://www.radiobot.zalati.fr";

?>

I really love you so much :D
 

Runningcore

Well-Known Member
Contributor
Thank you so much !
With this it's working !
Code:
#------Do NOT modify the following (without good reason):------#
$sinusbotURL = "https://www.radiobot.zalati.fr";

?>

I really love you so much :D
No problem, I'm glad you appreciate my help. :)
 
Top