Code Monkey home page Code Monkey logo

Comments (18)

bb avatar bb commented on August 27, 2024 7

I finally managed to find out when it breaks and how to fix it.

If the Bundler version at the end of the Gemfile.lock is specifies the system-wide Bundler version, it works. If they differ, passenger claims the directory was not found.

e.g. Ruby 3.1.6 comes with Bundler 2.3.27. When the Gemfile.lock contains

RUBY VERSION
   ruby 3.1.6p260

BUNDLED WITH
   2.3.27

it works. When it contains e.g. BUNDLED WITH 2.3.26 or BUNDLED WITH 2.5.13 passenger breaks.

When doing gem update --system which (currently) installs Bundler 2.5.13, then it works only with this Gemfile.lock:

RUBY VERSION
   ruby 3.1.6p260

BUNDLED WITH
   2.5.13

but not with 2.5.12 or 2.3.26 etc.

As mentioned before, the problem occurs only with Passenger (both standalone and in nginx), but not with Puma, Rails Console, good_job etc. -- all of them handle bundler switching itself to the directory-local version well.

I think (but didn't bother verifying) that having different global and local bundler versions was not a problem for Passenger before.

The problem is fully reproducible in the container, but I never saw the issue when running passenger start on my development mac, even when the Bundler versions mismatched.

from passenger-docker.

bb avatar bb commented on August 27, 2024 3

@tanmayj28 thanks for your PR.
I can confirm that your PR fixes the issue.

So anybody looking for an intermediate fix, use @tanmayj28's solution above.

While it's no longer urgent for me, I still hope @CamJN will give it a look someday and fix the root cause which I suspect being somewhere in passenger.

from passenger-docker.

AvaelKross avatar AvaelKross commented on August 27, 2024 1

@bb oh my friend, you're a life saver. That's weird that we came across the same issue within one week, while it's difficult to find anything related in google, like it's a new issue or something. I wish Passenger improve their errors log to include some really useful information instead of "No such file or directory", especially since both ruby path and app path are in place..

from passenger-docker.

niggalodon avatar niggalodon commented on August 27, 2024 1

I created a repository for reproducing the issue: https://github.com/bb/passenger-not-found-minimal

The main branch contains a failing setup using Ruby 3.1.6 and Rails 6.1. The branch https://github.com/bb/passenger-not-found-minimal/tree/ruby-33 contains a failing Ruby 3.3.3 with Rails 7.1. The branch https://github.com/bb/passenger-not-found-minimal/tree/ruby-32 contains a failing Ruby 3.2.4 with Rails 7.1.

All can be fixed by changing Gemfile.lock to contain BUNDLED WITH 2.5.15 (currently 2.5.14 for the ruby-33 and the ruby-32 branch, 2.5.12 in the main branch).

@bb, I wanted to say THANK YOU!

This error had messed me up, and I invested hours into trying to find a solution.

You are truly a lifesaver, as @AvaelKross said.

from passenger-docker.

brettwgreen avatar brettwgreen commented on August 27, 2024 1

I have a theory this problem might be related to this change: passenger#4586623d

Nevermind, 3.0.6 had Passenger 6.0.22 which didn't include that change.

Actually 3.0.5 and 3.0.6 both have Passenger 6.0.22 so passenger didn't change. Both 3.0.5 and 3.0.6 have rvm 1.29.12 so that didn't change.

Here's the changes between 3.0.5 and 3.0.6: rel-3.0.5...rel-3.0.6 aside from time-dependent things, however the big ones (rvm and passenger) didn't change.

I have suspected the issue isn't really because of a change in passenger itself, but because of a change in bundler.... the problem started to hit with us when bundler 2.5.12 dropped (and our dockerfile was set to always update to latest bundler). I find it curious that 2.5.11 remains the default in even latest versions of ruby (https://stdgems.org/). Something about 2.5.12 and up causes problems somehow.

That being said, if you just let bundler update itself using the version in the lock file, it seems to handle it just fine even upgrading past that version. In my case, I removed my manual gem update bundler lines from Dockerfile, and then bundler just does the following, and passenger starts up just fine.

Bundler 2.5.11 is running, but your lockfile was generated with 2.5.16. Installing Bundler 2.5.16 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.5.16
Installing bundler 2.5.16

from passenger-docker.

CamJN avatar CamJN commented on August 27, 2024

it's saying /home/app/webapp doesn't exist not that the ruby executable doesn't exist.

from passenger-docker.

bb avatar bb commented on August 27, 2024

Thanks for clarifying. However, this also exists. Including a config.ru and whatever... see:

root@80fae41725db:/home/app/webapp# ls -lad `pwd`
drwxr-xr-x 1 app app 4096 Jun 14 23:43 /home/app/webapp
root@80fae41725db:/home/app/webapp# bin/rails c
Loading production environment (Rails 6.1.7.8)
3.1.5 :001 >
root@80fae41725db:/home/app/webapp# bin/rails s
=> Booting Puma
=> Rails 6.1.7.8 application starting in production
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.6.8 (ruby 3.1.5-p252) ("Birdie's Version")
*  Min threads: 20
*  Max threads: 20
*  Environment: production
*          PID: 18337
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2024-06-18 21:09:36 +0200 ===
- Goodbye!
Exiting

To emphasize what I said before: An image which was working fine a week ago and the very same image with exactly same configuration (env, volumes, ...) does no longer work after recreating the container (not the image).

from passenger-docker.

CamJN avatar CamJN commented on August 27, 2024

If you recreate the container from the same image with no changes to how you run it then I don't see how anything we did can have affected it, it's not like we changed the image on you. Have you looked at the error message in the /tmp/passenger-error-*.html file that gets created?

from passenger-docker.

bb avatar bb commented on August 27, 2024

Yes, but I didn't find anything which helped me solving it. Maybe you see something?

CleanShot 2024-06-18 at 22 11 43@2x

CleanShot 2024-06-18 at 22 12 44@2x

CleanShot 2024-06-18 at 22 13 06@2x

CleanShot 2024-06-18 at 22 13 29@2x

CleanShot 2024-06-18 at 22 18 22@2x

(environment shortened in screenshot, so I don't need to censor the screenshot again. 😉 )

activated_gems

error_highlight => 0.6.0
did_you_mean => 1.6.3
tmpdir => 0.2.0
fileutils => 1.7.2
etc => 1.4.3
base64 => 0.2.0
shellwords => 0.2.0
strscan => 3.1.0
forwardable => 1.3.3
io-wait => 0.3.1

load_path

/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/tmpdir-0.2.0/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/fileutils-1.7.2/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/etc-1.4.3/lib
/usr/local/rvm/gems/ruby-3.1.5/extensions/x86_64-linux/3.1.0/etc-1.4.3
/usr/local/rvm/gems/ruby-3.1.5/gems/base64-0.2.0/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/shellwords-0.2.0/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/strscan-3.1.0/lib
/usr/local/rvm/gems/ruby-3.1.5/extensions/x86_64-linux/3.1.0/strscan-3.1.0
/usr/local/rvm/gems/ruby-3.1.5/gems/forwardable-1.3.3/lib
/usr/local/rvm/gems/ruby-3.1.5/gems/io-wait-0.3.1/lib
/usr/local/rvm/gems/ruby-3.1.5/extensions/x86_64-linux/3.1.0/io-wait-0.3.1
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/x86_64-linux
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby/3.1.0
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby/3.1.0/x86_64-linux
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux

loaded_libs

enumerator.so
thread.rb
fiber.so
rational.so
complex.so
ruby2_keywords.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux/enc/encdb.so
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux/enc/trans/transdb.so
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux/rbconfig.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/compatibility.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/defaults.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/deprecate.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/errors.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/unknown_command_spell_checker.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/exceptions.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/basic_specification.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/stub_specification.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/platform.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/specification_record.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/util/list.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/version.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/requirement.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/specification.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/util.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/dependency.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_gem.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux/monitor.so
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/monitor.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/rubygems/path_support.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib/error_highlight/version.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib/error_highlight/base.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib/error_highlight/formatter.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib/error_highlight/core_ext.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/error_highlight-0.6.0/lib/error_highlight.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/version.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/core_ext/name_error.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/levenshtein.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/jaro_winkler.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/name_error_checkers.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/method_name_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/key_error_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/null_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/tree_spell_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/require_path_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean/formatter.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/did_you_mean-1.6.3/lib/did_you_mean.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/fileutils-1.7.2/lib/fileutils.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/etc-1.4.3/lib/etc.so
/usr/local/rvm/gems/ruby-3.1.5/gems/tmpdir-0.2.0/lib/tmpdir.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/constants.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/base64-0.2.0/lib/base64.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpio.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/operating_system.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/binary_compatibility.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/shellwords-0.2.0/lib/shellwords.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/shellwords.rb
/home/app/.passenger/native_support/6.0.22/ruby-3.1.5-x86_64-linux/passenger_native_support.so
/usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/strscan-3.1.0/lib/strscan.so
/usr/local/rvm/gems/ruby-3.1.5/gems/forwardable-1.3.3/lib/forwardable/impl.rb
/usr/local/rvm/gems/ruby-3.1.5/gems/forwardable-1.3.3/lib/forwardable.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/json.rb
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux/socket.so
/usr/local/rvm/gems/ruby-3.1.5/gems/io-wait-0.3.1/lib/io/wait.so
/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/socket.rb

rbconfig

DESTDIR = 
MAJOR = 3
MINOR = 1
TEENY = 5
PATCHLEVEL = 252
INSTALL = /usr/bin/install -c
EXEEXT = 
prefix = /usr/local/rvm/rubies/ruby-3.1.5
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby-3.1.pc
CC_WRAPPER = 
PACKAGE = ruby
BUILTIN_TRANSSRCS =  enc/trans/newline.c
MKMF_VERBOSE = 0
MANTYPE = man
vendorarchhdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0/vendor_ruby/x86_64-linux
sitearchhdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0/site_ruby/x86_64-linux
rubyarchhdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0/x86_64-linux
vendorhdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0/vendor_ruby
sitehdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0/site_ruby
rubyhdrdir = /usr/local/rvm/rubies/ruby-3.1.5/include/ruby-3.1.0
RUBY_SEARCH_PATH = 
UNIVERSAL_INTS = 
UNIVERSAL_ARCHNAMES = 
configure_args =  '--prefix=/usr/local/rvm/rubies/ruby-3.1.5' '--disable-cache' '--disable-install-doc' '--enable-shared'
CONFIGURE = configure
vendorarchdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby/3.1.0/x86_64-linux
vendorlibdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby/3.1.0
vendordir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/vendor_ruby
sitearchdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0/x86_64-linux
sitelibdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby/3.1.0
sitedir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/site_ruby
rubyarchdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux
rubylibdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0
ruby_version = 3.1.0
sitearch = x86_64-linux
arch = x86_64-linux
sitearchincludedir = /usr/local/rvm/rubies/ruby-3.1.5/include/x86_64-linux
archincludedir = /usr/local/rvm/rubies/ruby-3.1.5/include/x86_64-linux
sitearchlibdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/x86_64-linux
archlibdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/x86_64-linux
libdirname = libdir
RUBY_EXEC_PREFIX = /usr/local/rvm/rubies/ruby-3.1.5
RUBY_LIB_VERSION = 
RUBY_LIB_VERSION_STYLE = 3	/* full */
RI_BASE_NAME = ri
ridir = /usr/local/rvm/rubies/ruby-3.1.5/share/ri
rubysitearchprefix = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/x86_64-linux
rubyarchprefix = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/x86_64-linux
MAKEFILES = Makefile GNUmakefile
PLATFORM_DIR = 
THREAD_MODEL = pthread
SYMBOL_PREFIX = 
EXPORT_PREFIX = 
COMMON_HEADERS = 
COMMON_MACROS = 
COMMON_LIBS = 
MAINLIBS = -lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm 
ENABLE_SHARED = yes
DLDSHARED = gcc -shared
DLDLIBS = -lc
SOLIBS = -lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm 
LIBRUBYARG_SHARED = -Wl,-rpath,/usr/local/rvm/rubies/ruby-3.1.5/lib -L/usr/local/rvm/rubies/ruby-3.1.5/lib -lruby
LIBRUBYARG_STATIC = -Wl,-rpath,/usr/local/rvm/rubies/ruby-3.1.5/lib -L/usr/local/rvm/rubies/ruby-3.1.5/lib -lruby-static -lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm 
LIBRUBYARG = -Wl,-rpath,/usr/local/rvm/rubies/ruby-3.1.5/lib -L/usr/local/rvm/rubies/ruby-3.1.5/lib -lruby
LIBRUBY = libruby.so.3.1.5
LIBRUBY_ALIASES = libruby.so.3.1 libruby.so
LIBRUBY_SONAME = libruby.so.3.1
LIBRUBY_SO = libruby.so.3.1.5
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME = 
rubyw_install_name = 
EXTDLDFLAGS = 
EXTLDFLAGS = 
strict_warnflags = -std=gnu99
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
debugflags = -ggdb3
optflags = -O3 -fno-fast-math
NULLCMD = :
ENABLE_DEBUG_ENV = 
DLNOBJ = dln.o
INSTALL_STATIC_LIBRARY = no
MJIT_SUPPORT = yes
EXECUTABLE_EXTS = 
ARCHFILE = 
LIBRUBY_RELATIVE = no
EXTOUT = .ext
PREP = miniruby
CROSS_COMPILING = no
TEST_RUNNABLE = yes
rubylibprefix = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby
setup = Setup
ENCSTATIC = 
EXTSTATIC = 
SOEXT = so
TRY_LINK = 
PRELOADENV = LD_PRELOAD
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG =  -Wl,-rpath,%1$-s
LIBPATHFLAG =  -L%1$-s
LINK_SO = 
ADDITIONAL_DLDFLAGS = 
ASMEXT = S
LIBEXT = a
DLEXT = so
LDSHAREDXX = g++ -shared
LDSHARED = gcc -shared
CCDLFLAGS = -fPIC
STATIC = 
ARCH_FLAG = 
DLDFLAGS = -Wl,--compress-debug-sections=zlib
ALLOCA = 
EGREP = /usr/bin/grep -E
GREP = /usr/bin/grep
dsymutil = 
codesign = 
cleanlibs = 
POSTLINK = :
incflags = 
WERRORFLAG = -Werror
CHDIR = cd -P
RMALL = rm -fr
RMDIRS = rmdir --ignore-fail-on-non-empty -p
RMDIR = rmdir --ignore-fail-on-non-empty
CP = cp
RM = rm -f
PKG_CONFIG = pkg-config
DOXYGEN = 
DOT = 
MAKEDIRS = /usr/bin/mkdir -p
MKDIR_P = /usr/bin/mkdir -p
INSTALL_DATA = /usr/bin/install -c -m 644
INSTALL_SCRIPT = /usr/bin/install -c
INSTALL_PROGRAM = /usr/bin/install -c
SET_MAKE = 
LN_S = ln -s
DLLWRAP = 
WINDRES = 
ASFLAGS = 
ARFLAGS = rcD 
try_header = 
CC_VERSION_MESSAGE = gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CC_VERSION = gcc --version
MJIT_CC = /usr/bin/gcc
CSRCFLAG = 
COUTFLAG = -o 
OUTFLAG = -o 
CPPOUTFILE = -o conftest.i
GNU_LD = yes
GCC = yes
CPP = gcc -E
CXXFLAGS = 
OBJEXT = o
CPPFLAGS =   
LDFLAGS = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef  -fPIC
STRIP = strip -S -x
RANLIB = gcc-ranlib
OBJDUMP = objdump
OBJCOPY = :
NM = gcc-nm
LD = ld
CXX = g++
AS = as
AR = gcc-ar
CC = gcc
target_os = linux
target_vendor = pc
target_cpu = x86_64
target = x86_64-pc-linux-gnu
host_os = linux
host_vendor = pc
host_cpu = x86_64
host = x86_64-pc-linux-gnu
build_os = linux-gnu
build_vendor = pc
build_cpu = x86_64
build = x86_64-pc-linux-gnu
RUBY_VERSION_NAME = ruby-3.1.0
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
RUBY_PROGRAM_VERSION = 3.1.5
RUBY_API_VERSION = 3.1
HAVE_GIT = yes
GIT = git
cxxflags = 
cppflags = 
cflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
target_alias = 
host_alias = 
build_alias = 
LIBS = -lm 
ECHO_T = 
ECHO_N = -n
ECHO_C = 
DEFS = 
mandir = /usr/local/rvm/rubies/ruby-3.1.5/share/man
localedir = /usr/local/rvm/rubies/ruby-3.1.5/share/locale
libdir = /usr/local/rvm/rubies/ruby-3.1.5/lib
psdir = /usr/local/rvm/rubies/ruby-3.1.5/share/doc/ruby
pdfdir = /usr/local/rvm/rubies/ruby-3.1.5/share/doc/ruby
dvidir = /usr/local/rvm/rubies/ruby-3.1.5/share/doc/ruby
htmldir = /usr/local/rvm/rubies/ruby-3.1.5/share/doc/ruby
infodir = /usr/local/rvm/rubies/ruby-3.1.5/share/info
docdir = /usr/local/rvm/rubies/ruby-3.1.5/share/doc/ruby
oldincludedir = /usr/include
includedir = /usr/local/rvm/rubies/ruby-3.1.5/include
runstatedir = /usr/local/rvm/rubies/ruby-3.1.5/var/run
localstatedir = /usr/local/rvm/rubies/ruby-3.1.5/var
sharedstatedir = /usr/local/rvm/rubies/ruby-3.1.5/com
sysconfdir = /usr/local/rvm/rubies/ruby-3.1.5/etc
datadir = /usr/local/rvm/rubies/ruby-3.1.5/share
datarootdir = /usr/local/rvm/rubies/ruby-3.1.5/share
libexecdir = /usr/local/rvm/rubies/ruby-3.1.5/libexec
sbindir = /usr/local/rvm/rubies/ruby-3.1.5/sbin
bindir = /usr/local/rvm/rubies/ruby-3.1.5/bin
exec_prefix = /usr/local/rvm/rubies/ruby-3.1.5
PACKAGE_URL = 
PACKAGE_BUGREPORT = 
PACKAGE_STRING = 
PACKAGE_VERSION = 
PACKAGE_TARNAME = 
PACKAGE_NAME = 
PATH_SEPARATOR = :
SHELL = /bin/bash
UNICODE_VERSION = 13.0.0
UNICODE_EMOJI_VERSION = 13.1
platform = x86_64-linux
archdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux
topdir = /usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/3.1.0/x86_64-linux

ruby_info

RUBY_VERSION = 3.1.5
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 3.5.13
RubyGems paths = ["/usr/local/rvm/gems/ruby-3.1.5", "/usr/local/rvm/rubies/ruby-3.1.5/lib/ruby/gems/3.1.0"]

System-wide stats

------------- General -------------
Kernel version    : 5.15.0-112-generic
Uptime            : 4d 12h 26m 14s
Load averages     : 0.90%, 1.26%, 1.53%
Fork rate         : unknown

------------- CPU -------------
Number of CPUs    :   12
Average CPU usage :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 1           :   8%  --   4% user,   0% nice,   4% system,  92% idle
  CPU 2           :   8%  --   4% user,   0% nice,   4% system,  92% idle
  CPU 3           :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 4           :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 5           :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 6           :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 7           :   8%  --   4% user,   0% nice,   4% system,  92% idle
  CPU 8           :   8%  --   4% user,   0% nice,   4% system,  92% idle
  CPU 9           :   8%  --   4% user,   0% nice,   4% system,  92% idle
  CPU 10          :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 11          :   9%  --   4% user,   1% nice,   4% system,  91% idle
  CPU 12          :   8%  --   4% user,   1% nice,   4% system,  92% idle
I/O pressure      :   1%
  CPU 1           :   0%
  CPU 2           :   0%
  CPU 3           :   1%
  CPU 4           :   1%
  CPU 5           :   1%
  CPU 6           :   0%
  CPU 7           :   1%
  CPU 8           :   0%
  CPU 9           :   0%
  CPU 10          :   0%
  CPU 11          :   0%
  CPU 12          :   0%
Interference from other VMs:   0%
  CPU 1                    :   0%
  CPU 2                    :   0%
  CPU 3                    :   0%
  CPU 4                    :   0%
  CPU 5                    :   0%
  CPU 6                    :   0%
  CPU 7                    :   0%
  CPU 8                    :   0%
  CPU 9                    :   0%
  CPU 10                   :   0%
  CPU 11                   :   0%
  CPU 12                   :   0%

------------- Memory -------------
RAM total         :  64221 MB
RAM used          :  45811 MB (71%)
RAM free          :  18410 MB
Swap total        :  32767 MB
Swap used         :  16159 MB (49%)
Swap free         :  16608 MB
Swap in           : unknown
Swap out          : unknown

Edit: adding native support log:

root@f6a9bebcdad4:/tmp# cat passenger_native_support-xt0ow.log
# current user is: app
# mkdir -p /home/app/.passenger/native_support/6.0.22/ruby-3.1.5-x86_64-linux
# cd /home/app/.passenger/native_support/6.0.22/ruby-3.1.5-x86_64-linux
# /usr/local/rvm/gems/ruby-3.1.5/wrappers/ruby /usr/share/passenger/ruby_extension_source/extconf.rb
checking for alloca.h... yes
checking for ruby/version.h... yes
checking for ruby/io.h... yes
checking for ruby/thread.h... yes
checking for ruby_version... no
checking for rb_thread_io_blocking_region() in ruby/io.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
creating Makefile
# make
compiling /usr/share/passenger/ruby_extension_source/passenger_native_support.c
/usr/share/passenger/ruby_extension_source/passenger_native_support.c: In function ‘Init_passenger_native_support’:
/usr/share/passenger/ruby_extension_source/passenger_native_support.c:894:1: warning: old-style function definition [-Wold-style-definition]
  894 | Init_passenger_native_support() {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/share/passenger/ruby_extension_source/passenger_native_support.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
linking shared-object passenger_native_support.so

from passenger-docker.

bb avatar bb commented on August 27, 2024

To rule out nginx or integration with nginx, I tried passenger standalone, both PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 and with native support ... still groping in the dark...

root@f6a9bebcdad4:/home/app/webapp# passenger status
Phusion Passenger(R) Standalone is not running, according to PID file /home/app/webapp/passenger.3000.pid
root@f6a9bebcdad4:/home/app/webapp# passenger start
 [passenger_native_support.so] trying to compile for the current user (root) and Ruby interpreter...
     (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
     Compilation successful. The logs are here:
     /tmp/passenger_native_support-1ww45v.log
 [passenger_native_support.so] successfully loaded.
=============== Phusion Passenger(R) Standalone web server started ===============
PID file: /home/app/webapp/passenger.3000.pid
Log file: /home/app/webapp/log/passenger.3000.log
Environment: production
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger(R) Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ N 2024-06-18 22:30:34.7323 8551/T6 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
App 8608 output: /usr/local/rvm/rubies/ruby-3.1.5/bin/ruby: No such file or directory -- Passenger AppPreloader: /home/app/webapp (LoadError)
[ E 2024-06-18 22:30:35.0634 8551/T10 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/app/webapp: The application process exited prematurely.
  Error ID: 4f75513b
  Error details saved to: /tmp/passenger-error-lVq13h.html

[ E 2024-06-18 22:30:35.0656 8551/T9 age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 4f75513b. Please see earlier logs for details about the error.
App 8918 output: /usr/local/rvm/rubies/ruby-3.1.5/bin/ruby: No such file or directory -- Passenger AppPreloader: /home/app/webapp (LoadError)
[ E 2024-06-18 22:32:08.9734 8551/T15 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/app/webapp: The application process exited prematurely.
  Error ID: 1beb85ba
  Error details saved to: /tmp/passenger-error-1myV0J.html

[ E 2024-06-18 22:32:08.9755 8551/Tb age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1beb85ba. Please see earlier logs for details about the error.

from passenger-docker.

bb avatar bb commented on August 27, 2024

If you recreate the container from the same image with no changes to how you run it then I don't see how anything we did can have affected it, it's not like we changed the image on you.

I was suspecting passenger updating itself with the security update check.
BUT: I was wrong about old images no longer working. I tagged the first bad image instead of the last good.

So, the image built on 2024-06-13T02:39:19+00:00 worked and still works, also when recreating containers. The ones built 24 hours later no longer worked.

from passenger-docker.

mech avatar mech commented on August 27, 2024

Just encounter this today. My Gemfile.lock has v2.5.14 and is working fine with passenger 3.0.6 last week. Today, I deploy it to AWS EC2 and thought all will be fine, but hit with this error:

App 21202 output: /usr/local/rvm/rubies/ruby-3.3.3/bin/ruby: No such file or directory -- Passenger AppPreloader: /home/app/mail_log (LoadError)

[ E 2024-07-13 15:26:56.4513 41/T29 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/app/mail_log: The application process exited prematurely.

As pointed out by @bb it is a Bundler version mismatch issues. I go to my local development and upgrade my bundler to the latest v2.5.15 and because the Dockerfile also do RUN gem update --system, so both local development and Docker bundler version matched and the application can run.

I don't remember Passenger to be so picky on bundler version in the past though 🤔

from passenger-docker.

bb avatar bb commented on August 27, 2024

I created a repository for reproducing the issue: https://github.com/bb/passenger-not-found-minimal

The main branch contains a failing setup using Ruby 3.1.6 and Rails 6.1.
The branch https://github.com/bb/passenger-not-found-minimal/tree/ruby-33 contains a failing Ruby 3.3.3 with Rails 7.1.
The branch https://github.com/bb/passenger-not-found-minimal/tree/ruby-32 contains a failing Ruby 3.2.4 with Rails 7.1.

All can be fixed by changing Gemfile.lock to contain BUNDLED WITH 2.5.15 (currently 2.5.14 for the ruby-33 and the ruby-32 branch, 2.5.12 in the main branch).

from passenger-docker.

tanmayj28 avatar tanmayj28 commented on August 27, 2024

@bb Thanks for raising this. I faced the same issue few days ago and since bundler released another update it started breaking again.

I was able to fix this by adding below line in my Dockerfile instead of updating the Gemfile.lock after every release:

RUN gem install bundler --force -N -v "$(tail -n 1 Gemfile.lock | tr -d '[:blank:]\n')" && bundle --version

I have raised a PR against your failing ruby33 branch and the fix seems to be working fine.

from passenger-docker.

brettwgreen avatar brettwgreen commented on August 27, 2024

This issue has been plaguing us for 6-8 weeks... it seems to me it only happens if you are updating bundler within your Dockerfile. Following assumes running on default ruby version... I'm on version 3.0.6 which is ruby 3.3.4 by default.

  • If you just take what's pre-installed it works (with version 3.0.6, the preinstalled version of bundler is 2.5.11 for ruby 3.3.4).
  • If you update it, if you lock the update to 2.5.11 (gem install -N bundler -v 2.5.11), it works... but accomplishes little since that's already installed
  • If you update it and match the bundler version to your Gemfile.lock, it works

I'm inclined to just take what the base image gives me for bundler. In odd cases where you want the latest/greatest bundler for whatever reason, then you need to keep the versions in sync (in lieu of some kind of fix I guess)

First bullet seems to contradict a bit what @bb had reported, but seems to work for me regardless of what's in lock file if I don't try and update bundler and just take what's pre-installed.

Anything else gets this error.

UPDATE:
I just want to add that, if you are manually upgrading rubygems and bundler in your Dockerfile, that maybe that's not good practice anymore. Since Bundler 2.3, bundler handles this itself by looking at your lockfile and installing the version it needs.

https://bundler.io/blog/2022/01/23/bundler-v2-3.html

from passenger-docker.

CamJN avatar CamJN commented on August 27, 2024

I have a theory this problem might be related to this change: passenger#4586623d

Nevermind, 3.0.6 had Passenger 6.0.22 which didn't include that change.

Actually 3.0.5 and 3.0.6 both have Passenger 6.0.22 so passenger didn't change.
Both 3.0.5 and 3.0.6 have rvm 1.29.12 so that didn't change.

Here's the changes between 3.0.5 and 3.0.6: rel-3.0.5...rel-3.0.6 aside from time-dependent things, however the big ones (rvm and passenger) didn't change.

from passenger-docker.

CamJN avatar CamJN commented on August 27, 2024

There are quite a few changes in bundler 2.5.11 → 2.5.12 including some that seem like they could be related rubygems/rubygems@bundler-v2.5.11...bundler-v2.5.12

Since our images include bundler 2.3.27 not 2.5.12 I guess my advice would be to not upgrade to a broken version of bundler?

from passenger-docker.

brettwgreen avatar brettwgreen commented on August 27, 2024

Or, oddly enough, if you let bundler itself do the updating it seems to do it in a way that does not break passenger start up. Bundler will look at your lock file BUNDLED WITH and just install the correct version and that worked for me.

from passenger-docker.

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.