genesisweb / valet-linux-plus

Advanced local development experience for Linux.
MIT License
148 stars 26 forks source link

📬 MailHog service not working #56

Closed ibra-hassan closed 1 year ago

ibra-hassan commented 2 years ago

Hi, I'm Ibrahim, I installed valet successfully, and everything works fine except MailHog service it gives me "502 Bad Gateway", please see the below image: image

On error logs:

2022/07/18 23:03:18 [error] 30313#30313: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: mailhog.test, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8025/", host: "mailhog.test"
2022/07/18 23:03:18 [error] 30313#30313: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: mailhog.test, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8025/", host: "mailhog.test"

When I use valet start it gives me all green:

Restarting dnsmasq...
Restarting php7.4-fpm...
Restarting nginx...
Restarting mailhog...
Restarting mysql...
Restarting redis-server...
Valet services have been started.

I'm running on WSL2 with Ubuntu-20.04.

Any help, please.

uttamrabadiya commented 2 years ago

@ibra-hassan

Can you please share the status of Mailhog service? It should be as shown on below screenshot.

Command: sudo service mailhog status

image

ibra-hassan commented 2 years ago

@uttamrabadiya

It gives me that the service is not recognized as below: mailhog: unrecognized service

Is the service not installed ?!, but I'm sure from install valet with all steps successfully.

ibra-hassan commented 2 years ago

I have run valet update Now and the output is like the below:

There is a new release of Valet Linux
Updating now...
Changed current directory to /home/hemo/.config/composer
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
14 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
[sudo] password for hemo:
Nginx was already enabled
Stopping nginx...
Restarting php7.4-fpm...
Dnsmasq was already enabled
Installing Valet DNS service...
Valet-dns was already enabled
Systemd-resolved was already disabled
Stopping systemd-resolved...
Restarting network-manager...
Restarting dnsmasq...
Restarting valet-dns...
Restarting nginx...
Installing Mailhog service...
Mailhog was already enabled
Restarting nginx...
Starting mailhog...
Redis-server was already enabled
Looks like MySQL already installed to your system, please enter MySQL [root] user password to connect MySQL with us:

Valet installed successfully!
uttamrabadiya commented 2 years ago

@ibra-hassan Strange, Mailhog service is not installed on your machine. We will give it a shot on WSL2 with Ubuntu-20.04, will try to figure out the issue.

ibra-hassan commented 2 years ago

@uttamrabadiya thank you bro, I'm waiting for feedback.

ibra-hassan commented 2 years ago

@uttamrabadiya Hi, any updates here ?

uttamrabadiya commented 2 years ago

@ibra-hassan I have fixed this issue, I forgot to mention but it seems the only redirection is not working from http to https. please try https://mailhog.localhost I believe it will work.

ibra-hassan commented 2 years ago

@uttamrabadiya Hi again, the problem is still with the same error 🥲

2022/09/07 20:29:50 [error] 14653#14653: *600 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: mailhog.test, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8025/", host: "mailhog.test"
2022/09/07 20:29:50 [error] 14653#14653: *600 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: mailhog.test, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8025/", host: "mailhog.test"

image

uttamrabadiya commented 2 years ago

@ibra-hassan If you are openning http://localhost:8025, does it works? And can you please share output of following command: sudo lsof -i -P | grep mailhog

ibra-hassan commented 2 years ago

@uttamrabadiya I'm sorry for being late, No it does not work, and no output on the command.

uttamrabadiya commented 1 year ago

@ibra-hassan This is due to the mailhog service is not running on your machine, I believe you could find some error by following command: sudo systemctl status mailhog

uttamrabadiya commented 1 year ago

Closing this issue as long inactivity.