Yes, I think websockets would also need to be supported by your Nginx, although 
I'm not sure how to exactly configure this setup with two servers.

In our Nginx setup, WS connections are configured by 
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
    proxy_pass http://$upstream;

(only) for the route /streampipes/ws, see [1]

So it might be worth a try to add this to your Nginx config as a route, e.g.

location /streampipes/ws {
    set $upstream ROUTE_TO_STREAMPIPES_NGINX;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
    proxy_pass http://$upstream;
  }

I'm quite sure that this is not the 100% correct setup for your case, but hope 
this still helps a bit!

[1] 
https://github.com/apache/incubator-streampipes/blob/dev/ui/nginx_config/ssl.conf

On 2021/12/22 14:30:03 Milan Stojanovic wrote:
> Hi Dominik,
> 
> 
> We do have NGINX reverse proxy in front of StreamPipes.
> This is the part of SSL configuration used for domain name in question:
> <VirtualHost *:443>
>         ServerName streampipes.nissatech.com
>         SSLEngine on
>         ProxyPreserveHost on
>         RequestHeader set X-Forwarded-Proto https
> 
>         ProxyPass / http://192.168.84.114:80/
>         ProxyPassReverse / http://192.168.84.114:80/
> </VirtualHost>
> Is there something which needs to be configured specifically for the Proxy? 
> We tried searching for errors in proxy logs, but couldn't find any.
> 
> 
> Kind regards,
> Milan Stojanović
> Software engineer       [cid:81250375-bf8f-42a5-aa36-6558010662f3] 
> <https://www.nissatech.com/>
> 
> Nissatech Innovation Centre
> Car Dušan St. 54, Niš, Serbia
> E-mail: [email protected]
> Skype: live:milan.stojanovic_12
> 
> www.nissatech.com<http://www.nissatech.com/>    [Facebook icon] 
> <https://www.facebook.com/nissatech/>    [LinkedIn icon] 
> <https://www.linkedin.com/company/nissatech-innovation-centre/>
> 
> 
> 
> ________________________________
> From: Dominik Riemer <[email protected]>
> Sent: Wednesday, December 22, 2021 2:37 PM
> To: [email protected] <[email protected]>
> Subject: Re: Domain name mapping problem: Pipeline results are not shown in 
> the dashboard
> 
> Hi Milan,
> 
> thanks!
> I've set up a cloud instance with a fresh installation of 0.68.0 and SSL 
> connection and I can see live data in the dashboard.
> From your logs it seems that the websocket connection cannot be established. 
> How are requests routed to the StreamPipes instance? Is there maybe another 
> webserver in front of the StreamPipes NGINX which blocks websocket requests?
> 
> Dominik
> 
> On 2021/12/21 09:52:37 Milan Stojanovic wrote:
> > Hi Dominik,
> >
> >
> > Thank you for the response, I think you are spot on with web sockets, as 
> > you will see through the answers and logs:
> >
> >   1.  Yes, it has started normally, logs are attached 
> > (streampipes_logs-agter_start.txt, and after starting the pipeline 
> > streampipes_logs-after_pipeline-start.txt)
> >   2.  HTTPS is used
> >   3.  I have added logs from the console (streampipes-console_log.txt) as 
> > an attachment and provided a picture (Streampipes Network screenshot.png) 
> > from the web socket from the Network tab (I hope it was what was needed).
> >
> > If anything else is needed, don't hesitate to ask.
> >
> >
> > Kind regards,
> > Milan Stojanović
> > Software engineer       [cid:7365d3b5-c701-42e5-b737-0062086508e2] 
> > <https://www.nissatech.com/>
> >
> > Nissatech Innovation Centre
> > Car Dušan St. 54, Niš, Serbia
> > E-mail: [email protected]
> > Skype: live:milan.stojanovic_12
> >
> > www.nissatech.com<http://www.nissatech.com/>    [Facebook icon] 
> > <https://www.facebook.com/nissatech/>    [LinkedIn icon] 
> > <https://www.linkedin.com/company/nissatech-innovation-centre/>
> >
> >
> >
> > ________________________________
> > From: Dominik Riemer <[email protected]>
> > Sent: Monday, December 20, 2021 6:01 PM
> > To: [email protected] <[email protected]>
> > Subject: Re: Domain name mapping problem: Pipeline results are not shown in 
> > the dashboard
> >
> > Hi Milan,
> >
> > thanks for the detailed description!
> > I have three questions:
> > - Is the pipeline started without an error?
> > - Are you using SSL or plain HTTP?
> > - In your browser, can you please open the dev console, navigate to the 
> > browser and check if there is an error with the websocket connection (in 
> > Chrome, go to network -> ws). It would be interesting to know if the WS 
> > connection uses the correct URL and a connection is established.
> >
> > Cheers
> > Dominik
> >
> > On 2021/12/20 12:56:02 Milan Stojanovic wrote:
> > > Dear all,
> > >
> > >
> > > I am using StreamPipes 0.68.0 
> > > CLI<https://github.com/apache/incubator-streampipes-installer/tree/master/cli>,
> > >  which is hosted on an on-site server.
> > >
> > > Problem:
> > > The domain name is set so StreamPipes can be viewed outside of the 
> > > network, and when used the UI works normally, but when the simplest 
> > > pipeline is started (e.g. Flow Rate 2 and Dashboard Sink), results are 
> > > not visible in the dashboard (as if the events are not sent through the 
> > > pipeline). While, when using IP address and port, everything works as 
> > > intended.
> > >
> > > Attempts made:
> > > I have tried looking at the official documentation, archived emails, 
> > > cleaned everything with streampipes clean -v, deleting all docker images, 
> > > changing data streams, but with no help, the results are the same.
> > >
> > >
> > > Kind regards,
> > > Milan Stojanović
> > > Software engineer       [cid:60af4421-455f-4e16-912d-cf502d0ce860] 
> > > <https://www.nissatech.com/>
> > >
> > > Nissatech Innovation Centre
> > > Car Dušan St. 54, Niš, Serbia
> > > E-mail: [email protected]
> > > Skype: live:milan.stojanovic_12
> > >
> > > www.nissatech.com<http://www.nissatech.com/>    [Facebook icon] 
> > > <https://www.facebook.com/nissatech/>    [LinkedIn icon] 
> > > <https://www.linkedin.com/company/nissatech-innovation-centre/>
> > >
> > >
> > >
> > >
> >
> 

Reply via email to