Code Monkey home page Code Monkey logo

Comments (8)

ylecuyer avatar ylecuyer commented on May 29, 2024 1

yes unix socket absolute paths have 3 / : unix:///tmp/puma.sock nice for confusion :)

Anyway if it's relative you can still try from current dir and display an error if it doesn't work?

Yes this is what I did in #7

from puma-status.

ylecuyer avatar ylecuyer commented on May 29, 2024 1

I have published puma-status 1.1 (https://rubygems.org/gems/puma-status/versions/1.1) which should do the trick for your problem until we get puma/puma#2283 sorted out.

I'm closing for now

from puma-status.

ylecuyer avatar ylecuyer commented on May 29, 2024

I managed to reproduce locally, it looks like puma-status doesn't handle well relative paths for the unix socket file and the rescue is too broad and hides this failure as if puma.state was missing.

from puma-status.

ylecuyer avatar ylecuyer commented on May 29, 2024

This one will be difficult to handle, puma-status is made to be run from everywhere on the system and here we have a relative path without the root directory where we should start looking from.

In your case you will have to run puma-status from ~/applications/xxx/shared/ to have it working

I'll try to add a warning to make things clear

from puma-status.

jarthod avatar jarthod commented on May 29, 2024

@ylecuyer why shouldn't it work with relative path like this?

from puma-status.

ylecuyer avatar ylecuyer commented on May 29, 2024

It should work but in the puma state file there is no info about the root of relative paths.

For example the following config gives:

state_path '/tmp/puma.state'
activate_control_app 'unix://tmp/puma.sock'
---
pid: 26442
control_url: unix://tmp/puma.sock
control_auth_token: 259a35c85c9764dd84a416b3b96cd84a

We can deduce "/home/ylecuyer/Projects/test-puma/tmp/puma.sock" from this

It would be nice to have a running_from: "/home/ylecuyer/Projects/test-puma/" in the state file

from puma-status.

jarthod avatar jarthod commented on May 29, 2024

Ah ok so unix://tmp/puma.sock is a relative path? looked like absolute to me ;)

Anyway if it's relative you can still try from current dir and display an error if it doesn't work?

from puma-status.

vizcay avatar vizcay commented on May 29, 2024

Great @ylecuyer now I understand why it wasn't working: I've always runned puma-state inside the tmp directory. Tested it now and works like a charm.

from puma-status.

Related Issues (5)

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.