Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Server reports incorrect listening address #2248

Closed
hut8 opened this issue Apr 25, 2022 · 3 comments · Fixed by #2249
Closed

Server reports incorrect listening address #2248

hut8 opened this issue Apr 25, 2022 · 3 comments · Fixed by #2249
Assignees
Labels
bug Something isn't working s: fixed was fixed or solution offered

Comments

@hut8
Copy link
Contributor

hut8 commented Apr 25, 2022

Description

Today, I deployed my Buffalo application. I had written some TLS code that integrates it with autocert (Let's Encrypt). Basically, I copied this code: https://gist.github.com/hdm/d271eb94a51f7f908ecb9ddc82d2b644

When I started my app in production, it said it was listening at http://0.0.0.0:3000 -- that's not what I wanted! When I visited the site, everything worked fine, including the TLS (and redirect from 80 to 443). Port 3000 was not open. So the log message was wrong.

I saw this FIXME:

buffalo/server.go

Lines 25 to 27 in 215a8f9

// FIXME: this information is not correct.
// It needs to be fixed as we support multiple servers.
a.Logger.Infof("starting application at http://%s", a.Options.Addr)

It seems pretty straightforward; one could just display the endpoint as it's running rather than blindly copying from the configuration.

I've already solved this problem on my fork, so I'll open a PR in a sec after I make sure nothing is broken.

@sio4
Copy link
Member

sio4 commented Apr 26, 2022

Thanks for filing an issue and the PR for it. Indeed, the information is not correct, and I am considering what could be the best solution. I will review your PR soon and will reply.

@sio4
Copy link
Member

sio4 commented Apr 26, 2022

related issue: #2151 (comment)

@sio4 sio4 added the bug Something isn't working label Apr 26, 2022
@sio4 sio4 linked a pull request Apr 27, 2022 that will close this issue
@sio4
Copy link
Member

sio4 commented May 14, 2022

The PR was merged and now the change is included in the released version. Closing.

buffalo: 2022/05/14 22:45:10 === Running: tmp/todo-build (PID: 884943) ===
DEBU[2022-05-14T22:45:10+09:00] starting application
INFO[2022-05-14T22:45:10+09:00] starting simple server on 127.0.0.1:3000
INFO[2022-05-14T22:45:10+09:00] starting Simple background worker
<...>

@sio4 sio4 closed this as completed May 14, 2022
@sio4 sio4 added the s: fixed was fixed or solution offered label Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working s: fixed was fixed or solution offered
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants