-
Notifications
You must be signed in to change notification settings - Fork 390
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
Single server behind nginx reverse proxy - no content #535
Comments
Just to add, I also tried doing the nginx config with the local hostname instead of the IP and got the same results. |
In general nginx config for cronicle might be a bit of PITA. To debug - open dev tools in browser. First of all, check "console" tab. Do you see any error about websockets? (something like "io is not defined"). If so you need to specify another rout to /socket.io in your config. If it's not an issue then go to "network" tab. You'll see which files are failing to load. location /socket.io/ {
client_max_body_size 2048m;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:3012/socket.io/;
} |
maybe you can try traefik https://github.com/soulteary/docker-cronicle it simple and stable. @OWA-dbell |
Did you ever solve this? I'm running into the same issue with an almost identical setup but only in Firefox. Chrome seems to be working fine.
My nginx config:
cronicle docker container is listening on 127.0.0.1:3012 |
@matthenning I didn't ever get it solved. I'm stuck with NGINX because of all our other systems behind it, don't want to try and cut over to traefik, and NGINX works for everything else. I think @mikeTWC1984 is on the right path. All my errors are related to socket.io. But I never dug into it much further. |
Thanks for your reply. Seeing that it works in Chrome but not in FF I'll live with it for now as it doesn't look like something I can fix within nginx. |
Hey @OWA-dbell and @matthenning Finding this issue at the same day is quite a miracle. I went through hell to make my config work but alas, I'm happy. Here's my config on nginx, I have decided to put my cronicle behind a subdomain and used certbot to create my own certificate for https : server {
server_name jobscheduler.xxxxxx.xxx;
location / {
client_max_body_size 2048m;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:3012/;
}
location /socket.io/ {
client_max_body_size 2048m;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:3012/socket.io/;
}
location /api/ {
client_max_body_size 2048m;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:3012/api/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/..../fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/...../privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
} Despite not successful to make the Live Log Watcher work (but I still get info when the job is finished). I can still live without. |
Hi @tomihbk, can confirm it's working, thank you. |
Summary
I have a working instance of cronicle running on a single server. things look good and I can access it via http://[hostname]:3012. For my end users, and for getting HTTPS going, we run everything behind an nginx reverse proxy. I set all that up and now I try to go to https://[url] and get odd behavior. The background of the page loads, then nothing else. Just the Cronicle logo up top and an empty box.
I looked at the load balancer instructions, but that doesn't seem to apply in this case given its only the one server.
Steps to reproduce the problem
setup nginx with the following config:
Your Setup
Just a single server.
Operating system and version?
Ubuntu 20.04
Node.js version?
v16.17.1
Cronicle software version?
Version 0.9.12
Are you using a multi-server setup, or just a single server?
Are you using the filesystem as back-end storage, or S3/Couchbase?
Filesystem as storage
Can you reproduce the crash consistently?
Log Excerpts
The text was updated successfully, but these errors were encountered: