Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The HTTPS url generated when running 'sail share' throws ERR_CONNECTION_REFUSED #216

Closed
pabloroman opened this issue Aug 14, 2021 · 22 comments

Comments

@pabloroman
Copy link

  • Sail Version: 1.9.0
  • Laravel Version: 8.54.0
  • PHP Version: 8.0.1
  • OS: macOS 11.5.1

Description:

When loading the https version of the URL returned by sail share in the browser, the page does not load and gives the error ERR_CONNECTION_REFUSED

The non-https url works fine.

The TrustProxies middleware has been modified following the instructions in the documentation: https://laravel.com/docs/8.x/sail#sharing-your-site

Steps To Reproduce:

  1. Run sail share
  2. Visit the https version of the Expose-URL:
Thank you for using expose.
Local-URL:		host.docker.internal:80
Dashboard-URL:		http://127.0.0.1:4040
Expose-URL:		http://7xgkwyajfn.laravel-sail.site:8080
Expose-URL:		https://7xgkwyajfn.laravel-sail.site

image

@AhmadOf
Copy link

AhmadOf commented Aug 15, 2021

I have same issue here on linux ubuntu 20.04, the site can't be reached for https and for http it is keep loading without getting any results.

Sail Version: 1.9.0
Laravel Version: 8.54.0
PHP Version: 8.0.9
OS: Linux, Ubuntu 20.04.01

@driesvints
Copy link
Member

Works fine for me so I suspect these are network hiccups on your end.

@paulocastellano
Copy link

I have the same problem at POP_OS! 21.04

@finagin
Copy link
Contributor

finagin commented Sep 21, 2021

@driesvints, it's a good idea to use the server and client of the same version, can sail share use a fixed version of the server, and not the latest?

@driesvints
Copy link
Member

@finagin I'm not sure how we'd have to enforce that.

@finagin
Copy link
Contributor

finagin commented Sep 27, 2021

@driesvints Check server expose version in config file on laravel-sail.site and use it in sail share

sail/bin/sail

Line 325 in 78d7485

docker run --init --rm -p $SAIL_SHARE_DASHBOARD:4040 -t beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \

If some users want to use self hosted expose with newest version we can set version with env variable.
Something like this:

...
export SAIL_SHARE_SUBDOMAIN=${SAIL_SHARE_SUBDOMAIN:-""}
export SAIL_SHARE_VERSION=${SAIL_SHARE_VERSION:-"2.0.2"}  # etc. 2.0.2
...
docker run --init --rm -p $SAIL_SHARE_DASHBOARD:4040 -t beyondcodegmbh/expose-server:"$SAIL_SHARE_VERSION" share http://host.docker.internal:"$APP_PORT" \
...

@driesvints
Copy link
Member

@finagin that could maybe work yeah. Maybe you can whip up a PR for Taylor to review?

@Ken-vdE
Copy link

Ken-vdE commented Jan 31, 2022

Anyone been able to solve this? I still have this exact issue (on Ubuntu)

I have same issue here on linux ubuntu 20.04, the site can't be reached for https and for http it is keep loading without getting any results.

Sail Version: 1.9.0 Laravel Version: 8.54.0 PHP Version: 8.0.9 OS: Linux, Ubuntu 20.04.01

@hyphen81
Copy link

hyphen81 commented Feb 3, 2022

Same problem as @Ken-vdE. WSL2 running Ubuntu 20.04. Sail 8.1. Docker version 20.10.12.

https://stackoverflow.com/questions/70970715/laravel-sail-share-gives-404-or-err-connection-refused

@sneakingJ
Copy link

Also the same problem on PopOS 20.04

@Ken-vdE
Copy link

Ken-vdE commented May 9, 2022

@driesvints Can this issue be reopened? It seems more people run into this issue.

@driesvints
Copy link
Member

I'll need a way to reproduce this otherwise I can't debug it.

@digitall-it
Copy link

I am having the same problem, Expose has just been installed, Sail running on latest Laravel 9.

@tsummerer
Copy link

I am having the same problem too.
I can view the http site, but I get a connection refused for https.
I have a colleague in another state who can reproduce.

Sail version 1.15

Here is the Expose output:

Thank you for using expose.
Shared URL:		host.docker.internal:80
Dashboard:		http://127.0.0.1:4040
Public HTTP:		http://yleqmzgsz1.laravel-sail.site:8080
Public HTTPS:		https://yleqmzgsz1.laravel-sail.site

And the error message:

GET https://yleqmzgsz1.laravel-sail.site/
Error: connect ECONNREFUSED 192.241.149.60:443

I'm really at a loss for how to troubleshoot.
Does Laravel own the laravel-sail.site domain? Have they disabled the :443 port?

@driesvints
Copy link
Member

@tsummerer we do own laravel-sail.site and afaik we don't disable :443.

@tsummerer
Copy link

@driesvints And the Public HTTPS link is working fine for you?

I've tried on my Mac, on my phone with cellular (to rule out modem/network/wifi settings), with browsers and with curl.
I wish I could troubleshoot further, but I just can't get through the door.

~$ curl https://ce7dllkzky.laravel-sail.site
curl: (7) Failed to connect to ce7dllkzky.laravel-sail.site port 443: Connection refused

@driesvints
Copy link
Member

I now realize we can't offer https because we'd have to issue certificates for each subdomain. Just use the http version for now.

@digitall-it
Copy link

Aren’t you using wildcard certificates?

@taylorotwell
Copy link
Member

I haven't configured HTTPS for sail share. Just use the HTTP link.

@sschlein
Copy link

If you require HTTPS, you can use https://expose.dev instead of the included sail share command. The free version gives you HTTPS but also a trial for the Pro network with custom subdomains, your own domains, etc

@quanicetea
Copy link

I have same issue

  • Sail Version: 1.15.1 (latest at now)
  • Laravel Version: 9.19
  • PHP Version: 8.0.21
  • OS: macOS 10.15.7
    Screenshot 2022-08-03 at 11 33 24
    Screenshot 2022-08-03 at 11 34 48

@brainmaniac
Copy link

brainmaniac commented Aug 12, 2023

@taylorotwell

I haven't configured HTTPS for sail share. Just use the HTTP link.

I am working on an integration against an accounting program. They require HTTPS for the redirect URL (back to my site) once authenticated, when building and testing I need this to point to my local env. So now I'll need to add valet or herd on top of sails. I understand "PRs are welcome" but I just wonder if the HTTPS is about to be implemented soon?

UPDATE:
For anyone else facing a similar issue my workaround became to run ngrok http --region=eu 80 in project root in CLI and get the HTTPS from there. Would be nice if the sails share worked tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests