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

Bot does not play nice with HTTP2

Status
Not open for further replies.

ClaytonF

Member
I am currently proxying SinusBot through Apache and recently enabled HTTP/2. After doing so I noticed that resources (icons, thumbnails, etc) would fail to load and command requests such as status, files, play would either stay pending or get cancelled with no error code.


https://i.imgur.com/fC8B34K.png


I noticed that if I were to open it in incognito mode and log in for the first time everything would work correctly, until I hit the refresh button after which the same problems listed above would start to happen.

I do realize that the http2 module for Apache is still in beta but just wanted to post this here just in case it's a bug in SinusBot.

I also tried this in FireFox and experienced the same problems.
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Whether it's a browser that requests stuff or a reverse proxy really should not matter as long as it speaks valid http/1.1 with the bot.
So it's more likely an error in your apache config, I guess.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Can you show us your Apache config? My bot works fine w/ a nginx reverse-proxy and http2 enabled.
 

ClaytonF

Member
Can you show us your Apache config? My bot works fine w/ a nginx reverse-proxy and http2 enabled.

I'm not exactly sure why it would work fine on the first try but not after.

Code:
<VirtualHost *:80>
    ServerName music.domain.com
 
    Protocols h2c http/1.1
 
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://music.domain.com%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>
    ServerName music.domain.com
    DocumentRoot /var/www/music.domain.com/public_html

    ErrorLog /var/www/music.domain.com/logs/error.log
    CustomLog /var/www/music.domain.com/logs/access.log combined
 
    Protocols h2 http/1.1
 
    Header set X-XSS-Protection "1; mode=block"
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
 
    ProxyPreserveHost on
    ProxyPass /.well-known/acme-challenge !
    ProxyPass / http://localhost:8087/
 
    SSLEngine on
    SSLCertificateChainFile /root/simp_le/chain.pem
    SSLCertificateKeyFile /root/simp_le/key.pem
    SSLCertificateFile /root/simp_le/cert.pem
</VirtualHost>
 

Patschi

Head of troll department / Xuxe dominator
Tier III
is awesome!
V.I.P.
is uber awesome!
Insider
The communication works like:
  • User <=> Reverse proxy: Encypted connection with HTTP/2
  • Reverse proxy <=> Sinusbot: Unencrypted connection with HTTP/1.1
I guess that it's a problem of Apache2, not of the Sinusbot. Something is not correctly configured...
Sadly I'm not that fimilar with Apache2 anymore, as I'm using nginx for years now.

May you remove the "Header" configuration settings and try it again?
 
Status
Not open for further replies.
Top