Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#880195: apache2: Trying to use ws:// in proxy results in "No protocol handler was valid for the URL /ws .... "

175 views
Skip to first unread message

Libor Klepáč

unread,
Oct 30, 2017, 10:10:04 AM10/30/17
to
Package: apache2
Version: 2.4.25-3+deb9u3
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

i'm trying to enable websocket proxy for customer on web server running Stretch.

After enabling module
# a2enmod proxy_wstunnel
Considering dependency proxy for proxy_wstunnel:
Module proxy already enabled
Enabling module proxy_wstunnel.
To activate the new configuration, you need to run:
systemctl restart apache2

and restarting apache, i try to use this snippet in vhost configuration
<IfModule mod_proxy_wstunnel.c>
ProxyPass "/ws" "ws://127.0.0.1:9000/"
ProxyPassReverse "/ws" "ws://127.0.0.1:9000/"
ProxyPass "/wss" "ws://127.0.0.1:9000/"
ProxyPassReverse "/wss" "ws://127.0.0.1:9000/"
</IfModule>

it ends with internal server error and log says
AH01144: No protocol handler was valid for the URL /ws. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

Acording to
# apache2ctl -M | grep proxy
proxy_module (shared)
proxy_http_module (shared)
proxy_wstunnel_module (shared)

all modules are loaded.

This apache runs MPM prefork+itk, I also tried on another host, running same version but with MPM event, to eliminate influence of itk (I know, it cannot be run with mod_http2 for example), with same result.

Don't know, what to test next

With regards,
Libor

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEPGZVVU37tFmB0TQv8O+MbsKfR44FAln3LiAVHGxpYm9yLmts
ZXBhY0BiY29tLmN6AAoJEPDvjG7Cn0eO8dYP/0yAJD0qdpJsxsgNA2XPsNRIJV0x
eNtppVBVkNH29Nvapa+Cq1RheU79rNJhcUHldOb1iNz0u06G0OzmAuRrDk9tR5b8
yoVtb2N8EDYuyFmr4Nw1MhMVBgNf1tNXIfmMBLF3Ol0DysvtpEQeZMDpm9bkStfg
oWbq/YLECDNy9xT0IH+Mt8VoD4EiPSHFjB46iZ0Lvjj/ftsG0rJMUayyzCZ/s4Us
lGy6JYuMtdF53wZuGGFZTt935TblhUfWTEOypeJ/Sm56Zucnd6TXQBGeqh5F1WKk
Sn9G6w4KSyZNLZb93gkDJVrRBbLZe7HV6IktmIB5egj0k5o5DgnbG+IEr5vqPbid
7ZbTZz4w5UGJ/y3RC1MDjrTz0wX6taw3TocBQJpq1Ov0VZ9UkSjq3lNgL+oSwV0m
yWChI2ZNOrx8FTdQJXL7Ok7Yw4e6fYySgcyl7ahg+RUEZqDAvU5xxvVP74cFYWxB
uIzXZtKLBKI5X0HIDAXJ+pYmkCIxuHfBxKFKP2PE/CMw2C0UI+RM838t07tyUfnE
gV2e9KIG/WOTvGsUiRnmSN6020sE5MzyUSXmLmIeTkZoFpI5E3DXfkijN1nau4kA
2b3NymnfvqXx/eSd2Iu2zAQAApR7PoNmLwPaZYlYryY7hQqNk45YscQKnq91xM45
MLYYponhG9jT/W1p
=GrvM
-----END PGP SIGNATURE-----

Libor Klepáč

unread,
Nov 2, 2017, 7:10:03 AM11/2/17
to
Hi,
just tried it on Sid with apache2 2.4.29-1, it shows same error

With regards,
Libor

Hans-Willi Werres

unread,
Dec 3, 2017, 6:10:03 AM12/3/17
to

Dear Maintainer,


I've the same problem to proxy the Proxmox weg gui. My configuration is:


 SSLProxyEngine on
  ProxyRequests off
  <Location "/">
    ProxyPass https://127.0.0.1:8006/ flushpackets=On connectiontimeout=300 timeout=300
    ProxyPassReverse ${DESTINATION}
  </Location>
  ProxyTimeout 600
  
  #SSL Connect
  SSLProxyVerify none
  SSLProxyCheckPeerCN off
  SSLProxyCheckPeerName off
  SSLProxyCheckPeerExpire off

  # Encoded slashes need to be allowed
  AllowEncodedSlashes     NoDecode

  <location "/api2/json/nodes/">
  </location>


I've found a workaround by copy the the module /usr/lib/apache2/modules/mod_proxy_wstunnel.so from debian jessie (Apache 2.4.10), but this is only a workaround for time.


I hope you fix it soon :)


best regards


Hans-Willi Werres

Hans-Willi Werres

unread,
Dec 3, 2017, 10:40:03 AM12/3/17
to

Sorry,


I use mod_macro und forget to replace the ${DESTINATION} variable.

please change 

    ProxyPassReverse ${DESTINATION}

to

    ProxyPassReverse https://127.0.0.1:8006/


best regards

    Hans-Willi Werres


 

Libor Klepáč

unread,
Dec 4, 2017, 7:50:02 AM12/4/17
to
Hi,
i can confirm, that with module from jessie, WS proxy works for us too
(without changing my configuration sent in initial bug report).

Thanks for tip

Libor

Vincent Caron

unread,
Sep 11, 2018, 7:50:03 AM9/11/18
to
The error message is misleading. It happens if a client try to contact
the proxy entrypoint with the HTTP protocol without requesting an
upgrade to Websocket : only websocket requests can be tunneled to a
websockend endpoint, thus the proxy complains.

Your web application should have a subset of paths which use Websockets
and all other paths with plain HTTP(S). The correct config often boils
down to :

Proxy /ws ws://host:port/
Proxy / http://host:port/

And DON'T try to test by requesting the /ws URL with curl or your
browser, it will try plain HTTP(S) without asking for websocket upgrade
and Apache will complain with the message this bugreport mentions.

Hans-Willi Werres

unread,
Sep 28, 2018, 5:50:03 AM9/28/18
to

Hi,


I'v tested again and this config is OK for proxying proxmox (including vnc):



<VirtualHost *:443>
    ServerName <Extern.Sitename.de>

    ErrorLog  ${APACHE_LOG_DIR}/Proxy_<Extern.Sitename.de>_error.log
    CustomLog ${APACHE_LOG_DIR}/Proxy_<Extern.Sitename.de>_access.log combined

    UseCanonicalPhysicalPort Off
    UseCanonicalName         Off
    DocumentRoot             /var/www/html/

    SSLEngine on
    SSLCertificateFile    /etc/letsencrypt/live/<Extern.Sitename.de>/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/<Extern.Sitename.de>/privkey.pem

    ProxyRequests Off
    ProxyPreserveHost On

    #SSL Connect
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off

    # HSTS (mod_headers is required) (15768000 seconds = 6 months)
    #Header always set Strict-Transport-Security "max-age=15768000"

    # Encoded slashes need to be allowed
    AllowEncodedSlashes     NoDecode

    RewriteEngine on
    RewriteCond %{HTTP:Connection} Upgrade [NC]
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteRule /(.*) wss://127.0.0.1:8006/$1  [P,L]

    SSLProxyEngine   on
    ProxyRequests    off

    #block Proxy for letsencrypt verification!
    ProxyPass        /.wellknown !
 
    ProxyPass        / https://127.0.0.1:8006/ flushpackets=On connectiontimeout=300 timeout=300
    ProxyPassReverse / https://127.0.0.1:8006/
    ProxyTimeout     600

</VirtualHost>


Hidroconta Trading Ltd.

unread,
Jun 18, 2019, 10:10:02 PM6/18/19
to
Hello,

Our partners referred your company to us. Regarding your great products.
Please see required products, quantity and specifications as attached.

Kindly give us your lowest possible prices for FCL shipment.


Best Regards,

Wanda Rodriguez
Purchase Assistant

Hidroconta Trading Ltd.
Av. de Sta. Catalina,
60, 30012 Murcia, Spain
Phone: +34 968 26 77 66
Fax: +34 968 26 77 06

Martin Sebald

unread,
Jul 23, 2020, 5:50:03 AM7/23/20
to
Hello all,

I am experiencing the same problem as described here with apache2 version
2.4.38-3+deb10u3 (buster) and also version 2.4.43-1~bpo10+1 (buster-backports).

The proxy modules are loaded but I cannot proxy WebSocket with Apache2. Here's
some more information:


"apache2ctl -M | grep proxy" gives me:

proxy_module (shared)
proxy_http_module (shared)
proxy_wstunnel_module (shared)

I'm trying to proxy WebSocket of Prosody XMPP Server like described here:
https://prosody.im/doc/websocket

This is in my vHost config:

<IfModule mod_proxy.c>
<IfModule mod_proxy_wstunnel.c>
ProxyTimeout 900
<Location "/xmpp-websocket">
ProxyPreserveHost On
ProxyPass "ws://localhost:5280/xmpp-websocket"
</Location>
</IfModule>
</IfModule>

It does not matter if I try to proxy "ws" or "wss".

The error message is the following:

[Wed Jul 22 23:19:46.651199 2020] [proxy:warn] [pid 13332:tid 139973210351360]
[client xxx] AH01144: No protocol handler was valid for the URL
/xmpp-websocket (scheme 'wss'). If you are using a DSO version of mod_proxy,
make sure the proxy submodules are included in the configuration using LoadModule.

[Wed Jul 22 23:37:54.853492 2020] [proxy:warn] [pid 8816:tid 140146156889856]
[client xxx] AH01144: No protocol handler was valid for the URL
/xmpp-websocket (scheme 'wss'). If you are using a DSO version of mod_proxy,
make sure the proxy submodules are included in the configuration using LoadModule.


Is this a bug or some configuration thing? I doublechecked everything and I
think it is a bug.

Looking forward for help.

Thank you and regards,
Martin

Dorian Kwiatkowski

unread,
Sep 23, 2021, 4:00:03 AM9/23/21
to
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

Patryk Górecki

unread,
Oct 13, 2021, 3:50:04 AM10/13/21
to
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny. Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

Patryk Górecki

unread,
Oct 19, 2021, 4:10:06 AM10/19/21
to

Patryk Górecki

unread,
Oct 25, 2021, 3:40:04 AM10/25/21
to

Patryk Górecki

unread,
Oct 29, 2021, 3:40:07 AM10/29/21
to

Dawid Rowicki

unread,
Nov 12, 2021, 5:06:22 AM11/12/21
to
Dzień dobry!

Czy mógłbym przedstawić rozwiązanie, które umożliwia monitoring każdego auta w czasie rzeczywistym w tym jego pozycję, zużycie paliwa i przebieg?

Dodatkowo nasze narzędzie minimalizuje koszty utrzymania samochodów, skraca czas przejazdów, a także tworzenie planu tras czy dostaw.

Z naszej wiedzy i doświadczenia korzysta już ponad 49 tys. Klientów. Monitorujemy 809 000 pojazdów na całym świecie, co jest naszą najlepszą wizytówką.

Bardzo proszę o e-maila zwrotnego, jeśli moglibyśmy wspólnie omówić potencjał wykorzystania takiego rozwiązania w Państwa firmie.


Z poważaniem,
Dawid Rowicki

Arkadiusz Stryj

unread,
Dec 14, 2021, 3:40:04 AM12/14/21
to
Dzień dobry,

kontaktuje się z Państwem, ponieważ jako osoba zajmująca się usprawnieniem procesów, chciałbym zaprezentować nowoczesne rozwiązanie dla Państwa firmy.

System został stworzony z myślą o przedsiębiorstwach z sektora MŚP, aby zapewnić bezpieczeństwo danych, niezawodność i optymalizację procesów. Dzięki bogatym funkcjonalnościom usprawnia i przyspiesza obsługę zleceń.

Jeśli chcieliby Państwo zwiększyć tempo rozwoju swojej działalności i poszerzyć rynek zbytu chętnie opowiem więcej. Kiedy mogę się skontaktować?


Pozdrawiam,
Arkadiusz Stryj

Adam Furgalski

unread,
Dec 14, 2021, 3:50:06 AM12/14/21
to
Dzień dobry,

zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów.

Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.

Możemy porozmawiać w najbliższym czasie?


Pozdrawiam
Adam Furgalski
0 new messages