Coder Social home page Coder Social logo

Comments (17)

funkyremi avatar funkyremi commented on May 5, 2024 2

Thank you it's working after manually editing the default.conf file and restarting the service.

from meteor-apm-server.

jehartzog avatar jehartzog commented on May 5, 2024 2

I spent a decent amount of time looking into this, and there was not a simple solution, at least many months ago. That was before MUP released it's nginx config features, so it may be doable now. I'll take another look into it, no promises though :D.

from meteor-apm-server.

lmachens avatar lmachens commented on May 5, 2024 1

Take a look at #14 (comment)

Looks like the mup hook didn't work for you https://github.com/lmachens/meteor-apm-server/blob/master/mup-placeholder.js#L57

@jehartzog did you notice issues with your solution?

from meteor-apm-server.

jehartzog avatar jehartzog commented on May 5, 2024 1

It works fine for me, but I freely admin that fix is hacky and probably won't work in all cases. For example, it relies on the apm-engine app being listed first in the proxy file, which may not always happen.

If it doesn't work @funkyremi you'll need to manually edit the port in the /etc/nginx/conf.d/default.conf file in the docker container.

from meteor-apm-server.

vparpoil avatar vparpoil commented on May 5, 2024 1

Hello there,
I just installed successfully the APM, but got this issue.
I fixed manually using these steps :

  • docker ps to list containers
  • docker exec -ti CONTAINER_ID /bin/bash to enter the docker container named mup-nginx-proxy
  • manually edit /etc/nginx/conf.d/default.conf to change port 80 by port 11011 for the apm-engine upstream (I also had to install vi on the docker)
  • nginx -t to test config, then service nginx reload
    I am pretty sure this fix won't stay after a new deployment using mup...

from meteor-apm-server.

lmachens avatar lmachens commented on May 5, 2024

Do you have any client side errors?

from meteor-apm-server.

funkyremi avatar funkyremi commented on May 5, 2024

No client or server side error. Just the "Configure your app" page still displayed and no data available.

from meteor-apm-server.

lmachens avatar lmachens commented on May 5, 2024

Please check if you have the nginx issue described in 2. https://github.com/lmachens/meteor-apm-server#configuration-details
If the port shows 80 this might be the issue.

Did you setup the server with mup?

from meteor-apm-server.

funkyremi avatar funkyremi commented on May 5, 2024

Ok that's it, the MUP hooks may be failing because I see port 80. Yes the server has been setup with MUP. What should I try to resolve this issue?

from meteor-apm-server.

Ehrs avatar Ehrs commented on May 5, 2024

I am also having trouble with this default.conf file. The "solution" with manually editing default.conf is somehow automatically reverted after a while (around 8 hours). How can I find what is causing this? I manually edit the file and then run npx mup deploy to make it work for a while. I also tried docker restart mup-nginx-proxy at my apm server but that would instantly revert my changes and use port 80 again.

from meteor-apm-server.

jehartzog avatar jehartzog commented on May 5, 2024

If the server restarts then the proxy settings are reset, same with restarting the proxy. Sounds like your server is probably restarting every 8 hours for some reason.

from meteor-apm-server.

Ehrs avatar Ehrs commented on May 5, 2024

I have an uptime that says otherwise...

Am I missing some detail in how docker container works? I make manual changes outside the container then copying it to a default2.conf using

docker cp default.conf mup-nginx-proxy:/etc/nginx/conf.d/default.conf2

followed by

docker exec -t mup-nginx-proxy cp /etc/nginx/conf.d/default.conf2 /etc/nginx/conf.d/default.conf

from meteor-apm-server.

jehartzog avatar jehartzog commented on May 5, 2024

I don't see anything wrong with how you're doing it, but I just directly edited using vi or vim, which I had to install in the container.

Other things which will reset the proxy config are running a mup deploy again, even if you server is up and running, so if you are pushing code updates that could also be causing the reset.

from meteor-apm-server.

Ehrs avatar Ehrs commented on May 5, 2024

Made a lazy attempt to install vim in the container but it didn't work first try so I did it like this. :)

After manually editing the file, should I just restart the container mup-nginx-proxy? That makes the most sense to me but it didn't really work.

from meteor-apm-server.

jehartzog avatar jehartzog commented on May 5, 2024

Restarting the container will end up with your config changes being reset. Instead just tell the container to reload nginx:

docker exec mup-nginx-proxy nginx -s reload

A longer discussion about all this stuff is here.

from meteor-apm-server.

lmachens avatar lmachens commented on May 5, 2024

I think we need a better solution here. If the nginx container restarts and overwrites the config, this error will happen again.
Maybe we can use the mup advanced proxy settings?

// This config can add additional upstream and server blocks if needed.
nginxConfig: './path/to/config',

Or use env vars for nginx proxy to change the nginx config?

// Environment variables for nginx proxy
env: {
 DEFAULT_HOST: 'foo.bar.com'
}

I think the issue is that we expose different ports for different domains.
There is a discussion on nginx-proxy/nginx-proxy#59.

Ideas/PRs are welcome :).

from meteor-apm-server.

lmachens avatar lmachens commented on May 5, 2024

@vparpoil see discussion in #14

from meteor-apm-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.