Closed nilsi closed 8 years ago
I tried to remove SSL. I removed force-ssl
and the ssl section from mup.js
but still getting redirected to https
. I even deployed freshly to a new server but still getting redirected when I'm trying with my domain. However, if I use the IP i can reach the site just fine. Im so confused right now.
Hi @nilsi,
Try with the fix mentioned in this issue. Is commonly caused because headers are bigger than the max size allowed by the container with nginx. https://github.com/meteorhacks/mup-frontend-server/issues/7
If you are able to solve the issue with this fix, please comment and close it.
@wanchopeblanco thanks!
I saw that issue before but couldn't follow the instruction. Im not sure how I can find the right nginx.conf
Since I removed SSL i no longer have a frontend container.
root@repick:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
07da6f2dbd21 mongo "/entrypoint.sh mongo" 56 minutes ago Up 56 minutes 127.0.0.1:27017->27017/tcp mongodb
fa9d835aa465 meteorhacks/meteord:base "/bin/sh -c 'bash $ME" About an hour ago Up About an hour 0.0.0.0:80->80/tcp repick
root@repick:~# sudo find / -name nginx.conf
/var/lib/docker/aufs/diff/d6c0156a8c993637bbb38d72be134a6f50a7b647f4f0c563d4248057ede380b8/tmp/lib/nginx.conf
/var/lib/docker/aufs/diff/e3bae94b0a997ad46e6e4370a9df6aacc4dac4613596027a9b2e8cb6799d0a8b/tmp/nginx/nginx-1.8.0/conf/nginx.conf
/var/lib/docker/aufs/diff/e3bae94b0a997ad46e6e4370a9df6aacc4dac4613596027a9b2e8cb6799d0a8b/opt/nginx/conf/nginx.conf
/var/lib/docker/aufs/diff/4170e09b624c16af2d0d4eb6ebcfb2c3a2155a06cc8d1f12180992228edd9f2c/opt/nginx/conf/nginx.conf
/root/letsencrypt/letsencrypt-nginx/letsencrypt_nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf
/root/letsencrypt/letsencrypt-nginx/letsencrypt_nginx/tests/testdata/etc_nginx/nginx.conf
What am I supposed to edit? I looked in some of them but cant find the right server block.
It looks like you do have a container with nginx installed. Have you tried to deploy again in to a clean VPS? Did you setup again after removing SSL?
Usually when i have a problem like this i deploy again to a fresh instance.
Yes I tried a new VPS and I had the same problem. After deployed a few times on that one it looks like this:
sudo find / -name nginx.conf
/var/lib/docker/aufs/diff/282bf4543daa9a584b287cba9ba0e03f1a500523d864d6a2dedd9d3ada0f0dc6/tmp/nginx/nginx-1.8.0/conf/nginx.conf
/var/lib/docker/aufs/diff/282bf4543daa9a584b287cba9ba0e03f1a500523d864d6a2dedd9d3ada0f0dc6/opt/nginx/conf/nginx.conf
/var/lib/docker/aufs/diff/b75779f37df4cffd4831249f53479e47842ec4e7918cba3494610822eba41450/tmp/lib/nginx.conf
/var/lib/docker/aufs/diff/86b79c8b435e1e94bc361e6fd90ea9cfa4db8502f66c4c328c0c6d70235d44e6/opt/nginx/conf/nginx.conf
/var/lib/docker/aufs/mnt/d835971bcc2eb31916b53db8896f54ae4663cbe16f7b9b32a4ea4c0cebe0e547/opt/nginx/conf/nginx.conf
/var/lib/docker/aufs/mnt/d835971bcc2eb31916b53db8896f54ae4663cbe16f7b9b32a4ea4c0cebe0e547/tmp/nginx/nginx-1.8.0/conf/nginx.conf
It might add another nginx instance every time I run mup deploy
or mup setup
? I also wonder what those ID's are. According to the link you had it should match docker ps
IDs but they don't in my case.
I now found out that if I open my webpage in a browser that I never opened it in before it works with http. But when I try in an old one it still redirects to https and fails. Is this cached in the browser somehow? Incognito does not change anything.
Try flushing your browser cache, that was something that happened to me to after having issues with the server. Somtimes flushing cache fixed the issue.
Il venerdì 29 aprile 2016, Nicklas Nilsson notifications@github.com ha scritto:
Yes I tried a new VPS and I had the same problem. After deployed a few times on that one it looks like this:
sudo find / -name nginx.conf /var/lib/docker/aufs/diff/282bf4543daa9a584b287cba9ba0e03f1a500523d864d6a2dedd9d3ada0f0dc6/tmp/nginx/nginx-1.8.0/conf/nginx.conf /var/lib/docker/aufs/diff/282bf4543daa9a584b287cba9ba0e03f1a500523d864d6a2dedd9d3ada0f0dc6/opt/nginx/conf/nginx.conf /var/lib/docker/aufs/diff/b75779f37df4cffd4831249f53479e47842ec4e7918cba3494610822eba41450/tmp/lib/nginx.conf /var/lib/docker/aufs/diff/86b79c8b435e1e94bc361e6fd90ea9cfa4db8502f66c4c328c0c6d70235d44e6/opt/nginx/conf/nginx.conf /var/lib/docker/aufs/mnt/d835971bcc2eb31916b53db8896f54ae4663cbe16f7b9b32a4ea4c0cebe0e547/opt/nginx/conf/nginx.conf /var/lib/docker/aufs/mnt/d835971bcc2eb31916b53db8896f54ae4663cbe16f7b9b32a4ea4c0cebe0e547/tmp/nginx/nginx-1.8.0/conf/nginx.conf
It might add another nginx instance every time I run mup deploy?
I now found out that if I open my webpage in a browser that I never opened it in before it works with http. But when I try in an old one it still redirects to https and fails. Is this cached in the browser somehow? Incognito does not change anything.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/kadirahq/meteor-up/issues/115#issuecomment-215768573
Finally found a way to flush this at least for chrome on desktop. Just wonder if my visitors have the same problem now. I use the answer here to flush it: http://superuser.com/a/881431
I might give it another try to add SSL now again then. But I don't see any reason for it to not to throw the 502 Bad Gateway error again once I do. I maybe should look into increasing that max size for nginx, that could still be it.
Did you tried to do the fix i suggested using the ssl? Only users that opened the site when the 502 error was thrown will still get the error until the browser updates its cache.
I suggest you try again with ssl, but first try it on a subdomain so you dont affect your users, when you have it working just update your dns settings to point to the ssl server ip.
Il venerdì 29 aprile 2016, Nicklas Nilsson notifications@github.com ha scritto:
Finally found a way to flush this at least for chrome on desktop. Just wonder if my visitors have the same problem now. I use the answer here to flush it: http://superuser.com/a/881431
I might give it a try to add SSL now again then. But I don't see any reason for it to not throw the 502 Bad Gateway error again once I do.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/kadirahq/meteor-up/issues/115#issuecomment-215814583
Thanks for all the help. No haven't tried yet but will do on a different domain now. Be right back.
Theres no problem. Happy to help.
Il venerdì 29 aprile 2016, Nicklas Nilsson notifications@github.com ha scritto:
Thanks for all the help. No haven't tried yet but will do on a different domain now. Be right back.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/kadirahq/meteor-up/issues/115#issuecomment-215824121
WOW! it worked!! Finally!!
Do you have any idea how I change this permanently? It seems like your pull request is not merged yet and this will be overridden on my next mup deploy
I think.
Thanks again.
Not posible for now, i did a pull request to fix it. But it havent being merged. But its a simple fix. Just 5 minutes more of work.
Il venerdì 29 aprile 2016, Nicklas Nilsson notifications@github.com ha scritto:
WOW! it worked!! Finally!!
Do you have any idea how I change this permanently? It seems like your pull request is not merged yet and this will be overridden on my next mup deploy I think.
Thanks again.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/kadirahq/meteor-up/issues/115#issuecomment-215834159
I have getting same issue. I have tried to multiple thoughts. But still waiting for right solution. If you guys know please share your thought.
Thanks
@jnanendraveer were you ever able to get this resolved? It looks like Im having an issue with the ids too, when I try to run docker ps and check the ids with the ones in /var/lib/docker/aufs/mnt/ none of them are matching up so I tried to go into it and change the proxy_buffer size for all of them and it still didnt work.
Hi,
I just went through this issue for while and I want to share with you what was the problem for me ... My context : Meteor 1.3.3.1 / ssl cert / mupx for deploying my app on an EC2 instance The issue : 502 Bad Gateaway error message ( but everything works like a charm without the ssl setup http ).
My solution : Taking out the Browser Policy package !!! I didn't investigate more for now but if someone could point me why and how I can keep this package anyway, I would be nice of you .
Hope it helps some of you !
@ivanthemeh , I have got the issue. But don't know where is problem. I have setup everything again. Now working fine last 10 days. I suggest you please reinstall again.
Thanks
Hi @slam310,
Try with the fix mentioned in this issue. Is commonly caused because headers are bigger than the max size allowed by the container with nginx. meteorhacks/mup-frontend-server#7
@nilsi can I know what is your final working fix to the problem? thanks
Since this is almost a year ago I dont completely remember but it works fine now. I think I might changed to kadirahq/meteor-up. I remember I had to change the docker image for it to work with meteor 1.4. Like someone is mentioning in the issue previously linked here: https://github.com/meteorhacks/mup-frontend-server/issues/7
FYI I reduced the amount of domains in my browser-policy
config (specifically BrowserPolicy.content.allowOriginForAll()
) and that resolved the 502 error.
@sunlee-newyork so you install that package in your application and where did you setup that? thanks in advance
@enzolutions I have server.js that imports each serverside initialization files in its separate Meteor.startup wrapper - importing SSL package before BrowserPolicy
Hi,
I followed the guide here to setup SSL: https://voice.kadira.io/meteor-up-let-s-encrypt-based-free-ssl-d17111f69f15
I installed
force-ssl
and deployed withmup
. Everything works beside I got 502 Bad Gateway when trying to reach my application but It is still secured with SSL. I wonder if this is a problem with nginx not redirecting as it should? I added a subdomain to my app and the application worked without SSL.How can I configure nginx or find a solution to this? Thanks.
mup.js
Logs from deploying:
Certificate successfully installed:
installed packages:
Application gives a 502 Bad gateway on root URL.