Git Product home page Git Product logo

Comments (12)

CamJN avatar CamJN commented on June 20, 2024

it sounds like the gems might have been installed with root accidentally, can you check the owner of the files under /home/user3/.rbenv/? Another possibility is the SELinux policy not being correctly applied, which you can investigate using tools described here: https://serverfault.com/questions/521078/how-can-i-query-for-all-selinux-rules-default-file-contexts-etc-affecting-a-type

from passenger.

daBee avatar daBee commented on June 20, 2024
[Wed Aug 30 18:42:22 user3@server_f ~] gem info sinatra

*** LOCAL GEMS ***

sinatra (3.1.0, 3.0.6)
    Authors: Blake Mizerany, Ryan Tomayko, Simon Rozet, Konstantin Haase
    Homepage: http://sinatrarb.com/
    License: MIT
    Installed at (3.1.0): /home/user3/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0
                 (3.0.6): /home/user3/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0

    Classy web-development dressed in a DSL

All those gems are rich:rich (user3). Here is another try:

App 35378 output: /bin/sh: line 1: /home/user3/.rbenv/shims/ruby: Permission denied
App 35378 output: /bin/sh: line 1: exec: /home/user3/.rbenv/shims/ruby: cannot execute: Permission denied
[ E 2023-08-30 18:49:36.9253 35017/T15 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /srv/www/example: The application process exited prematurely.
  Error ID: f56fe7e8
  Error details saved to: /tmp/passenger-error-30izCL.html

[ E 2023-08-30 18:49:36.9280 35017/T8 age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is f56fe7e8. Please see earlier logs for details about the error.
App 35445 output: /bin/sh: line 1: /home/user3/.rbenv/shims/ruby: Permission denied
App 35445 output: /bin/sh: line 1: exec: /home/user3/.rbenv/shims/ruby: cannot execute: Permission denied
[ E 2023-08-30 18:49:37.1952 35017/T1c age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /srv/www/example: The application process exited prematurely.
  Error ID: 059b42a4
  Error details saved to: /tmp/passenger-error-nsziVx.html

[ E 2023-08-30 18:49:37.1984 35017/Ta age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 2-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 059b42a4. Please see earlier logs for details about the error.

$ [Wed Aug 30 18:49:39 rich@fuf /srv/www] cat /tmp/passenger-error-nsziVx.html
cat: /tmp/passenger-error-nsziVx.html: No such file or directory

As for SELinux, it's disabled.

from passenger.

daBee avatar daBee commented on June 20, 2024

I guess I should add that this app is owned by user4:user4 and user3 is a member of that group.

from passenger.

CamJN avatar CamJN commented on June 20, 2024

So you as user3 can run /home/user3/.rbenv/shims/ruby manually?

from passenger.

daBee avatar daBee commented on June 20, 2024

Yes. That's how I've always set these up. I've changed user4 for nginx log access, etc.

from passenger.

CamJN avatar CamJN commented on June 20, 2024

Then I guess the next step is to provide a Dockerfile that reproduces the issue for me to look at.

from passenger.

daBee avatar daBee commented on June 20, 2024

Well, I'm going to start again. I haven't done any Dockerfiles nor will it guarantee any replication. I'm going to move the www directory back to its default and start there.

from passenger.

daBee avatar daBee commented on June 20, 2024

My admin user is the one that creates the Gemfile and installs gems. Should I be using another user?

from passenger.

CamJN avatar CamJN commented on June 20, 2024

It is most likely to work if the user that runs the application installs the gems.

from passenger.

daBee avatar daBee commented on June 20, 2024

If I change the ownership of that www directory, do you think that would work? Isn't Passenger running the app?

from passenger.

CamJN avatar CamJN commented on June 20, 2024

By default Passenger creates a new process running as the user who owns the startup file for the app, and then has that process start the app as that user.

from passenger.

daBee avatar daBee commented on June 20, 2024

OK thanks for that. I'm going to play around. Permissions over the years has had me look for alternative directories for www.

from passenger.

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.