Comments (13)
Okay got it,
dont need the nginx.
in the apache you have to use the localhost:5000 as reverse proxy target and not IP:5000
from remotely.
Ok I Thougt I got it, the web interface is fine now - no more connection lost.
But when I now install a new remotely client on windows/linux,
I got this following in Remotely_Logs.txt after installation:
{"Type":"Error","Timestamp":"6/9/2019 12:23:18 PM","Message":"Response status code does not indicate success: 405 (Method Not Allowed).","Source":"System.Net.Http","StackTrace":" at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\r\n at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger)\r\n at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri)\r\n at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat)\r\n at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat)\r\n at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken)\r\n at Microsoft.AspNetCore.SignalR.Client.HttpConnectionFactory.ConnectAsync(TransferFormat transferFormat, CancellationToken cancellationToken)\r\n at Microsoft.AspNetCore.SignalR.Client.HttpConnectionFactory.ConnectAsync(TransferFormat transferFormat, CancellationToken cancellationToken)\r\n at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken)\r\n at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken)\r\n at Remotely_Agent.Services.DeviceSocket.Connect() in D:\a\1\s\Remotely_Agent\Services\DeviceSocket.cs:line 39\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Threading.ThreadPoolWorkQueue.Dispatch()"}
from remotely.
and after another research I found the solution why the client cant connect,
in the Installation Powershell script, the URL is http:// but (in my case) it should be https://
so i manually edited the downloaded installation script,
reinstalled,
and voila - client can connect successfully.
from remotely.
is it possible to change this in the system? so i dont have to manually edit the files everytime i download them?
from remotely.
oh man... the installation is really a hassle....
now I can connect to one linux desktop
but on two windows remote desktops I cant connect (different networks)
Launching remote control on client device...
~>
Starting remote control...
but nothing happens on the web interface anymore...
What could be wrong? Are there any firewall adjustments needed? Or how can I debug why the connection is not succesful?
from remotely.
Setting up ASP.NET Core behind a reverse proxy can be complicated, and the script is only designed to handle one scenario.
The file is showing "http" instead of "https" because it's not getting or trusting the forwarded headers (scheme and IP address) from Apache. The script adds this to the Nginx config, so you'll need to replicate it in Apache.
I haven't done this in Apache before, so I don't know if anything else is required in the configuration.
This article explains the process: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.2
from remotely.
thank you for your response!
well the main issue is really that it cant connect now to the clients...
the clients connect/register themself fine to the server...
and i am not sure why its not working as i cant really debug the route... i dont know what happens behind the connect to trace where it stops because there is no error message/log...
from remotely.
but i guess it has something to do with http and https requests as I found in debug mode:
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://my.website/BrowserHub?id=SjGsUq7QfBsPACU9DI19XQ text/plain;charset=UTF-8 11
and thats not cool, as it should be https!
i have added redirect http to https to apache, but its still not connecting...
from remotely.
The headers need to be forwarded before anything will work. It's a requirement. There's no sense troubleshooting anything until that's done.
Please read this to understand why it's required: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.2#configure-a-proxy-server
After that, I don't know, because I haven't tested it with Apache.
from remotely.
Also, I almost forgot...
There's a special Nginx configuration for the SiganlR hubs (websocket endpoints), which the install script does automatically. You'll need to replicate this behavior in Apache. See how the Hub endpoints are handled in the script: https://github.com/Jay-Rad/Remotely/blob/master/Utilities/Remotely_Server_Install.sh
Please keep in mind this isn't specific to Remotely. These concepts and requirements apply to any ASP.NET Core application running behind Nginx/Apache that uses authentication and SignalR.
from remotely.
Thank you for trying to help me out,
I have now tried really every single apache setting about reverse proxying...
But in the end I only get a
fail: Microsoft.AspNetCore.SignalR.HubConnectionContext[5]
Failed connection handshake.
in the log of remotely server.... not sure what I can do..
from remotely.
well the handshake error is gone now.
got no errors anymore,
added some websocket proxying into apache configs,
but still getting no connection to the client.
that is what I have tried:
ProxyPass /BrowserHub ws://localhost:5000/BrowserHub
ProxyPassReverse /BrowserHub ws://localhost:5000/BrowserHub
ProxyPass /DeviceHub ws://localhost:5000/DeviceHub
ProxyPassReverse /DeviceHub ws://localhost:5000/DeviceHub
ProxyPass /RCBrowserHub ws://localhost:5000/RCBrowserHub
ProxyPassReverse /RCBrowserHub ws://localhost:5000/RCBrowserHub
ProxyPass /RCDeviceHub ws://localhost:5000/RCDeviceHub
ProxyPassReverse /RCDeviceHub ws://localhost:5000/RCDeviceHub
as I think every target above is requiring websocket , is this correct?
from remotely.
Below is the configuration I'm using for Nginx, and it works. I don't have time to test on Apache, though.
I'll be closing this issue since it pertains to the hosting environment and doesn't involve an issue with the application. There are likely resources out there that can show you how to configure Apache for SignalR Core.
Configure Nginx
nginxConfig="server {
listen 80;
server_name $serverHost *.$serverHost;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /BrowserHub {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /DeviceHub {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /RCBrowserHub {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /RCDeviceHub {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}"
from remotely.
Related Issues (20)
- Docker healthcheck interval is very long, impacting Traefik (and maybe K8s?) HOT 3
- FYI - remotely.one is down HOT 1
- c_method_fn(1).txt
- change the port HOT 4
- Wie Installiere ich diese .PS1 HOT 11
- High CPU, RAM and I/O usage HOT 15
- How to build HOT 1
- add certificate in remotly step by step HOT 2
- Turn off auto-update the agent on Windows HOT 1
- FEATURE REQUEST: Record the remote screen HOT 1
- Device ID is missing. Cant use Get support ! HOT 2
- How to update? look like everything has changed... HOT 2
- SSO OAUTH HOT 3
- Add More Modern TLS Support for Install-Remotely.ps1 HOT 1
- Migration from older Remotely Version to the newest one failed how to migrate DB and get login working again HOT 1
- ListView for the Home Screen HOT 4
- Docker: ResetPassword link uses wrong hostname HOT 1
- can't connect if i rename the exe HOT 2
- What's with Docker Tags? HOT 3
- Linux client installation issues. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remotely.