Code Monkey home page Code Monkey logo

Comments (5)

mpdehaan avatar mpdehaan commented on June 1, 2024

Hi @muki,

As it is intended to work, 0_common.sh is just the input to all the other scripts.

You would have to rerun 6_services.sh after changing the port.

When you say the app dies, I'm a bit curious how that happened because nothing would know about that change?

Did you mean you ran some of the other scripts?

Logs go into /var/log/vespene/ - the supervisor log probably contains any failures about starting the service.

As such, I'm inclined to thing this isn't a bug as written, but maybe something we need to clarify in the docs.

Am I reading that correctly?

Thanks!

from _old_vespene.

muki avatar muki commented on June 1, 2024

So I changed the port to 1000 in the 0_common.sh before running anything else. I read through it and decided I want to proxy vespene through 1000. This was my first edit to the file. I then went through and read all the other setup scripts and changed nothing else. I ran them in order from 0 to 6. After I was done I set up nginx and when I tried to open it up, NGINX threw a 502 bad gateway error. This made me believe the app itself somehow crashed. These are the logs from that time:

supervisord.log

2018-11-01 21:12:23,200 CRIT could not write pidfile /var/run/supervisord.pid
2018-11-01 21:12:24,204 INFO spawned: 'worker_tutorial-pool0' with pid 10730
2018-11-01 21:12:24,207 INFO spawned: 'server' with pid 10731
2018-11-01 21:12:25,670 INFO success: worker_tutorial-pool0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-11-01 21:12:25,670 INFO success: server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-11-01 21:12:30,039 INFO exited: server (exit status 1; not expected)

web.log

[2018-11-01 21:12:24 +0000] [10731] [INFO] Starting gunicorn 19.9.0
[2018-11-01 21:12:24 +0000] [10731] [ERROR] Retrying in 1 second.
[2018-11-01 21:12:25 +0000] [10731] [ERROR] Retrying in 1 second.
[2018-11-01 21:12:26 +0000] [10731] [ERROR] Retrying in 1 second.
[2018-11-01 21:12:27 +0000] [10731] [ERROR] Retrying in 1 second.
[2018-11-01 21:12:28 +0000] [10731] [ERROR] Retrying in 1 second.
[2018-11-01 21:12:29 +0000] [10731] [ERROR] Can't connect to ('127.0.0.1', 1000)

worker_tutorial-pool.log

2018-11-01 21:12:25,669 - vespene - INFO - serving queue: tutorial-pool

I tried restarting the service and nothing changed. After I went back to 0_common.sh and changed the gunicorn line to port 8000 I reran 6_services.sh vespene started to work. This led me to believe that this was a bug, and that you can't really run vespene on a loopback with port 1000.

from _old_vespene.

mpdehaan avatar mpdehaan commented on June 1, 2024

Oh, yeah, so that's it.

Vespene runs as the 'vespene' user, so if you are just running it like that you need to be above port 1024.

https://stackoverflow.com/questions/10182798/why-are-ports-below-1024-privileged

If that is indeed it - and it seems to be - it seems like gunicorn is not throwing a good error about not being able to bind to a privileged port.

From the error messages here - https://stackoverflow.com/questions/40121221/gunicorn-not-starting-on-port-80-but-starting-on-port-8000 - that seems to be exactly it.

It seems the best answer here is to comment that it needs a port > 1024 in 0_common.sh

(You could of course technically run it as root, but that's something you should really want to avoid anyway)

I'll leave this open so I can document this better.

Thank you very much for the heads up!

from _old_vespene.

muki avatar muki commented on June 1, 2024

Somehow I didn't know about the 1024 limit. Today I learned ...

from _old_vespene.

mpdehaan avatar mpdehaan commented on June 1, 2024

Closing per #73 - thanks for the report!

from _old_vespene.

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.