expose: DNS error
while running expose share
this the error i am getting Could not connect to the server. Connection to sharedwithexpose.com:443 failed during DNS lookup: DNS error
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 11
- Comments: 42 (11 by maintainers)
TLDR: Send a couple of sponsors my way (https://github.com/sponsors/clue) and I’m happy to solve this. 💸
This requires a feature addition in @ReactPHP which Expose builds on top of. Expose does not need any changes once this is built into @ReactPHP. :shipit:
Here’s a recap of what’s going on:
nameserver
entry in your/etc/resolv.conf
is valid (see above: https://github.com/beyondcode/expose/issues/25#issuecomment-683799609)nameserver
entry in your/etc/resolv.conf
at the very topHere’s what needs to be implemented in @ReactPHP to make sure this error no longer shows up even when people have invalid nameserver entries:
Config
objectConfig
instead of astring
)Config
Config
objectConfig
object instead of only its first nameserver entry to the DNS component (requires new DNS tag)Config
object instead of only its first nameserver entry to the DNS component (requires new DNS tag)As you can see, this is a non-trivial amount of work. I’ve layed out this plan to show this is very much actionable and could be solved in a couple of days.
As much as I’d love to work on this, I won’t be able to commit to this right now: I’m rather busy working on a bunch of others projects at the moment.
Perhaps we can find a couple of new GitHub sponsors to allow me spending some time on this?
Put your money where your mouth is? 💸
I got the following error as others
Then looking through the above i did the following as others recommended @chiribuc thanks
edit my
etc/resolv.conf
and switched the IPv4 and IPv6 around.to
and all run ok.
@themsaid Thanks for providing this exception trace. Can you file an issue in the upstream repo https://github.com/reactphp/dns with some details about your platform (PHP version, OS,
/etc/resolv.conf
and a dump of your$config
object)?We’re not currently aware of any issues in our DNS component and people have been using this on a wide variety of platforms for years, so I’m really curious what could cause this issue. The only thing I have in mind might be if your system has a broken DNS configuration (primary DNS broken, but secondary DNS works), this is not currently implemented (https://github.com/reactphp/dns/issues/6).
In the meantime, you should be able to work around this by explicitly defining another DNS server like given above. As an alternative, you can also temporarily add an entry to your
/etc/hosts
file like this (warning, may change in the future):Expose will also somehow use a
Connector
internally which accepts optional explicit DNS server configuration to override system defaults. ThisConnector
can explicitly be configured like this: