Help needed :( Node / Docker staging deployment not working - 404 error

Hi All,

I’m trying to set up a live staging target before i deploy to a pilot customer next week and can’t get it working…arrrghhh :slight_smile:

I’ve read through everything I can and followed the usual Docker, Traefik and NodeJS guides but the pages are simply not loading with 2 main issues i can see:

  1. The page is not secure and the Lets Encrypt certificate doesn’t appear to have been issued. The certificate issued is TRAEFIK DEFAULT CERT so I don’t know if this is what supposed to show, but the pages are showing as not secure. I have deleted the docker machine and started from scratch earlier today so it’s been about 3-4 hours since i created it
  2. Even if i ignore the security, the pages don’t load and return 404 page not found error.

Here’s a snapshot of what i’ve done so far:

Project Details:

  • Docker/NodeJS web server with external direct connection DB (DB connections is working fine)
  • Deploying a staging environment with Docker Machines in Wappler on Linode (the server and docker machine were created fine)
  • Using Portainer and Traefik services with the Docker Machine (both of these sub-domains can be accessed once i added the A name records in DNS)

Target settings

And the Web Server

As per the Traefik guide, i only added the domain name and removed port 80 after successfully adding the Portainer and Traefik services to the docker machine.

Here’s the Docker machine:

And the services attached (the Portainer and Traefik dashboards both work fine and i can login and access those 2 pages)

At Linode (the VPS provider) I manage the Domains and sub-domains etc and can also add any firewall rules (currently I haven’t added any rules)

For the sub-domains, all i did was create some new A records in the Linode Domain manager. I had to delete some previous * sub-domains as the same domain is being used for the ‘marketing’ website as well as the app website, but different servers (i.e.mydomain.com for the marketing website and app.mydomain.com for the SaaS product)

What am i missing here? I feel that i’ve missed something or done something wrong? I cant get this staging to work and i need to launch with a pilot program next week.

Can anyone please offer any thoughts, ideas or insights?

Ok… so i have found a fix so that the pages are loading and are properly secure with the lets encrypt certificate.

What i discovered was that even though i created the new sub-domains and used the correct IP address for the staging server, they were somehow trying to use the incorrect IP address from the main website / landing page.

Even after removing all other A records it was still using the wrong IP address. I had to completely delete the domain from the Linode Domain management tool and start again, adding ONLY this staging server (so i’m without a landing page for now)

Strange…but might be helpful for someone else down the line

1 Like

DNS issues can be painful. Problem is that it can take up to 24 hours sometimes to propagate changes due to its extensive caching.

So maybe that was your problem.

2 Likes

True. I always reduce ttl to the lowest value allowed by the provider a few days in advance. That really reduces the headaches. Knowing all the places to clear dns cache (browser, local computer, upstream routers, etc) is also helpful.

1 Like