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

Bug: Selfhosted status page custom domain cannot be verified #1521

Open
MFYDev opened this issue Jun 24, 2024 · 18 comments
Open

Bug: Selfhosted status page custom domain cannot be verified #1521

MFYDev opened this issue Jun 24, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@MFYDev
Copy link

MFYDev commented Jun 24, 2024

Describe the bug
I corrected set the status page domain, and the cname record already exits in my dns settings but in one uptime verification page it always tells me CNAME is not verified. Please make sure you have the correct record and please verify CNAME again. If you are sure that the record is correct, please wait for some time for the DNS to propagate.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Project settings add the basic domain for the status page
  2. go to the status page add the custom domain to it
  3. set the correct A and CNAME record
  4. See error

Expected behavior
it should be verified

Screenshots
did not include my own domain in the screenshot for security
image

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser edge
  • Version 22

Deployment Type
docker compose

Additional context
Add any other context about the problem here.

@MFYDev MFYDev added the bug Something isn't working label Jun 24, 2024
@MFYDev
Copy link
Author

MFYDev commented Jun 24, 2024

const isValid: boolean = await StatusPageDomainService.isCnameValid(

It might has something to do with this

@simlarsen
Copy link
Contributor

Need more info like domain name. Can you please let me know your domain and did you verify with other DNS record viewers that cname do infact exist?

@MFYDev
Copy link
Author

MFYDev commented Jun 24, 2024

Need more info like domain name. Can you please let me know your domain and did you verify with other DNS record viewers that cname do infact exist?

@simlarsen Hi, here are my settings:

  1. set the status cname record in the config.envas oneuptimestatuspage.mydomain.com
  2. my onuptime is running on oneuptime.mydomian.com, working well
  3. in the oneuptime, add mydomain.com to the project settings domain list (this passed the check successfully)
  4. in the status page custom domain, set status.mydomain.com as the status page domain
  5. set DNS A record which is oneuptimestatuspage.mydomain.com to my webserver ip
  6. set DNS CNAME record point status.mydomain.com to oneuptimestatuspage.mydomain.com

Verify the cname is taking effect by using dig command, but when coming back to my own oneuptime, it is always showing this error

In a nutshell, it is this, they all use mydomain.com

Record Type domain Content
A oneuptime.mydomain.com myip
A oneuptimestatuspage.mydomain.com myip
CNAME status.mydomain.com oneuptimestatuspage.mydomain.com

@MFYDev
Copy link
Author

MFYDev commented Jun 24, 2024

I let the DNS stayed there for one whole night who should have already been taking effect but this morning I still get this error

@0x111
Copy link

0x111 commented Jun 28, 2024

Same thing happening to me, CNAME is definitely valid, I can resolve it from the server too (also other locations), DNS propagated, but it is still saying the error message stated.

Edit: Latest docker compose versions, fresh install

Is there something else we can provide to you @simlarsen to help with debugging? It has been days now, the DNS is surely propagated and should be correct.

@MFYDev
Copy link
Author

MFYDev commented Jul 17, 2024

hi @simlarsen it has been a while and I just noticed the new post you posted to the selfhosted subreddit and I want to give oneuptime another try. but I haven't heard from you about this issue yet. Every time deploy oneuptime is time consuming, I do not risk to install it and found this issue still has not been solved. could you please give us some updates? Thanks

@simlarsen
Copy link
Contributor

simlarsen commented Jul 24, 2024

@MFYDev Apologies for the late reply. Can you please change the LOG_LEVEL to DEBUG and see what shows up when you try to verify domain?

@Johncs2d
Copy link
Contributor

Johncs2d commented Aug 1, 2024

@simlarsen this is what it shows up when log is set to debug

image

DNS is resolving and when being accessed it returns 404.

@simlarsen
Copy link
Contributor

How did you set it to debug. I dont see any debug logs?

@Johncs2d
Copy link
Contributor

Johncs2d commented Aug 1, 2024

@simlarsen I use the helm chart and the LOG_LEVEL is set to debug

image

@Johncs2d
Copy link
Contributor

Johncs2d commented Aug 1, 2024

Okay I think this is the real error base on the logs that i just saw now,
Screenshot 2024-08-02 at 2 25 08 AM

@btouchard
Copy link

Describe the bug I corrected set the status page domain, and the cname record already exits in my dns settings but in one uptime verification page it always tells me CNAME is not verified. Please make sure you have the correct record and please verify CNAME again. If you are sure that the record is correct, please wait for some time for the DNS to propagate.

To Reproduce Steps to reproduce the behavior:

  1. Go to Project settings add the basic domain for the status page
  2. go to the status page add the custom domain to it
  3. set the correct A and CNAME record
  4. See error

Expected behavior it should be verified

Screenshots did not include my own domain in the screenshot for security image

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser edge
  • Version 22

Deployment Type docker compose

Additional context Add any other context about the problem here.

Yes i have a same problem.
When a try to valid a custom domain name for status page, the single error in log (debug) is 👍

app-1      | BadDataException [Error]: CNAME is not verified. Please make sure you have the correct record and please verify CNAME again. If you are sure that the record is correct, please wait for some time for the DNS to propagate.
app-1      |     at /usr/src/CommonServer/API/StatusPageDomainAPI.ts:110:15
app-1      |     at processTicksAndRejections (node:internal/process/task_queues:95:5) {
app-1      |   _code: 400
app-1      | }

@Johncs2d
Copy link
Contributor

We are not seeing the right logs for this because we are not logging these api calls.

const result: HTTPErrorResponse | HTTPResponse<JSONObject> =

I need this feature so I'll see what I can contribute to get this working, or maybe you already have information for us regarding this issue @simlarsen ?

@simlarsen
Copy link
Contributor

@Johncs2d Please feel free to add debug statements there and send a PR. That would make debugging a little easier.

@Johncs2d
Copy link
Contributor

Looks like the cname-verification api is not being hit at all, we should be seeing additional debug log when we hit the /status-page-api/cname-verification/:token but its not showing, and the new debug log that was added is just saying 404.

logger.debug(`CNAME Verification: Host:${host} - Token:${token}`);

image

@Johncs2d
Copy link
Contributor

Hi @simlarsen , can ask for any support/update with this? base on the logs that we are getting is this a config issue? Thanks!

@Johncs2d
Copy link
Contributor

Okay i found the answer for this one, @MFYDev the cname that you're adding should be in the list of hosts in the oneuptimeIngress, but the oneuptimeIngress.hosts does not allow wildcard values so its troublesome. I'll try to see what i can do to create a pr for this so we wont define every single status page host #1717

@marciojpacheco
Copy link

Hey, @Johncs2d.

Now I can create my wildcard domain, but the validation still isn’t working. I can access my status page normally, but I'm having trouble with the certificates on my Kubernetes cluster.

Let me know if you can help me get this sorted out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants