Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell App broken on ubuntu 24.04 #3895

Closed
simonLeary42 opened this issue Oct 22, 2024 · 10 comments
Closed

Shell App broken on ubuntu 24.04 #3895

simonLeary42 opened this issue Oct 22, 2024 · 10 comments
Labels
area/installation bug Existing functionality not working as expected
Milestone

Comments

@simonLeary42
Copy link

App 5085 output: innerError Error: Cannot find module '../build/Debug/pty.node'
App 5085 output: Require stack:
App 5085 output: - /var/www/ood/apps/sys/shell/node_modules/node-pty/lib/unixTerminal.js
App 5085 output: - /var/www/ood/apps/sys/shell/node_modules/node-pty/lib/index.js
App 5085 output: - /var/www/ood/apps/sys/shell/app.js
App 5085 output: - /opt/ood/ondemand/root/usr/share/passenger/helper-scripts/node-loader.js
App 5085 output:     at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
App 5085 output:     at Module._load (node:internal/modules/cjs/loader:975:27)
App 5085 output:     at Module.require (node:internal/modules/cjs/loader:1225:19)
App 5085 output:     at Module.require (/opt/ood/ondemand/root/usr/share/passenger/helper-scripts/node-loader.js:80:25)
App 5085 output:     at require (node:internal/modules/helpers:177:18)
App 5085 output:     at Object.<anonymous> (/var/www/ood/apps/sys/shell/node_modules/node-pty/lib/unixTerminal.js:34:15)
App 5085 output:     at Module._compile (node:internal/modules/cjs/loader:1356:14)
App 5085 output:     at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
App 5085 output:     at Module.load (node:internal/modules/cjs/loader:1197:32)
App 5085 output:     at Module._load (node:internal/modules/cjs/loader:1013:12) {
App 5085 output:   code: 'MODULE_NOT_FOUND',
App 5085 output:   requireStack: [
App 5085 output:     '/var/www/ood/apps/sys/shell/node_modules/node-pty/lib/unixTerminal.js',
App 5085 output:     '/var/www/ood/apps/sys/shell/node_modules/node-pty/lib/index.js',
App 5085 output:     '/var/www/ood/apps/sys/shell/app.js',
App 5085 output:     '/opt/ood/ondemand/root/usr/share/passenger/helper-scripts/node-loader.js'
App 5085 output:   ]
App 5085 output: }
App 5085 output: /var/www/ood/apps/sys/shell/node_modules/node-pty/lib/unixTerminal.js:40
App 5085 output:         throw outerError;
App 5085 output:         ^
App 5085 output:
App 5085 output: Error: The module '/var/www/ood/apps/sys/shell/node_modules/node-pty/build/Release/pty.node'
App 5085 output: was compiled against a different Node.js version using
App 5085 output: NODE_MODULE_VERSION 108. This version of Node.js requires
App 5085 output: NODE_MODULE_VERSION 109. Please try re-compiling or re-installing
App 5085 output: the module (for instance, using `npm rebuild` or `npm install`).
App 5085 output:     at Module._extensions..node (node:internal/modules/cjs/loader:1452:18)
App 5085 output:     at Module.load (node:internal/modules/cjs/loader:1197:32)
App 5085 output:     at Module._load (node:internal/modules/cjs/loader:1013:12)
App 5085 output:     at Module.require (node:internal/modules/cjs/loader:1225:19)
App 5085 output:     at Module.require (/opt/ood/ondemand/root/usr/share/passenger/helper-scripts/node-loader.js:80:25)
App 5085 output:     at require (node:internal/modules/helpers:177:18)
App 5085 output:     at Object.<anonymous> (/var/www/ood/apps/sys/shell/node_modules/node-pty/lib/unixTerminal.js:29:11)
App 5085 output:     at Module._compile (node:internal/modules/cjs/loader:1356:14)
App 5085 output:     at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
App 5085 output:     at Module.load (node:internal/modules/cjs/loader:1197:32) {
App 5085 output:   code: 'ERR_DLOPEN_FAILED'
App 5085 output: }
App 5085 output:
App 5085 output: Node.js v18.19.1
[ E 2024-10-22 19:39:28.7402 1794/T1q age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/ood/apps/sys/shell: The application process exited prematurely.
  Error ID: d54d34d1
  Error details saved to: /tmp/passenger-error-3sFinJ.html

[ E 2024-10-22 19:39:28.7549 1794/Ti age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 6-2] Cannot checkout session because a spawning error occurred. The identifier of the error is d54d34d1. Please see earlier logs for details about the error.

Looks similar to this old issue.

@osc-bot osc-bot added this to the Backlog milestone Oct 22, 2024
@simonLeary42
Copy link
Author

simonLeary42 commented Oct 22, 2024

# grep nodejs /var/log/apt/history.log | fmt -w 100
Install: ondemand-nginx:amd64 (1.24.0.p6.0.20.ood3.1, automatic), libnode109:amd64
(18.19.1+dfsg-6ubuntu5, automatic), node-acorn:amd64 (8.8.1+ds+~cs25.17.7-2, automatic),
ruby-sdbm:amd64 (1.0.0-5build4, automatic), libmagic-mgc:amd64 (1:5.45-3build1, automatic),
node-cjs-module-lexer:amd64 (1.2.3+dfsg-1, automatic), file:amd64 (1:5.45-3build1, automatic),
libruby:amd64 (1:3.2~ubuntu1, automatic), ondemand-passenger:amd64 (6.0.20.ood3.1, automatic),
ruby-net-telnet:amd64 (0.2.0-1, automatic), rubygems-integration:amd64 (1.18, automatic),
libruby3.2:amd64 (3.2.3-1ubuntu0.24.04.1, automatic), rake:amd64 (13.0.6-3, automatic), lsof:amd64
(4.95.0-1build3, automatic), nodejs:amd64 (18.19.1+dfsg-6ubuntu5, automatic), ruby:amd64
(1:3.2~ubuntu1, automatic), libxslt1.1:amd64 (1.1.39-0exp1build1, automatic), ondemand:amd64
(3.1.9), ruby3.2:amd64 (3.2.3-1ubuntu0.24.04.1, automatic), libcares2:amd64 (1.27.0-1.0ubuntu1,
automatic), node-xtend:amd64 (4.0.2-3, automatic), ruby-rubygems:amd64 (3.4.20-1, automatic),
node-undici:amd64 (5.26.3+dfsg1+~cs23.10.12-2, automatic), node-busboy:amd64 (1.6.0+~cs2.6.0-2,
automatic), libmagic1t64:amd64 (1:5.45-3build1, automatic), ruby-xmlrpc:amd64 (0.3.2-2,
automatic), ruby-webrick:amd64 (1.8.1-1, automatic)

@simonLeary42
Copy link
Author

libnode108 doesn't exist for ubuntu 24.04: https://packages.ubuntu.com/search?keywords=libnode108&searchon=names

@johrstrom
Copy link
Contributor

I don't know why they have funky version names like that. The error - as you've found is that there's some nodejs version mismatch happening. Let me pull some logs and see what's what.

App 5085 output: NODE_MODULE_VERSION 108. This version of Node.js requires
App 5085 output: NODE_MODULE_VERSION 109. Please try re-compiling or re-installing

@johrstrom
Copy link
Contributor

I pulled this from the build log that generated that .deb file. We're pulling nodejs from nodesource, not what canonical distributes.

Selecting previously unselected package nodejs.
Preparing to unpack .../10-nodejs_18.18.2-1nodesource1_amd64.deb ...
Unpacking nodejs (18.18.2-1nodesource1) 

Looking at the buildbox - it has this in it's apt list, though I don't think it should.

https://github.com/OSC/ondemand-packaging/blob/c099b1a3f22aed249ffb894bfcdef7f50310ddf9/packages/ondemand-release/deb/debian/rules#L28-L33

@johrstrom
Copy link
Contributor

Also just to be clear - you're on 24.04 Noble Nimbat, not 24.10 Oracular Oriole correct?

@simonLeary42
Copy link
Author

correct, noble numbat.

@johrstrom
Copy link
Contributor

I think there's a bug in our packaging system (linked above). Looks like we'll have to fix it in next release or you could try to recompile it in-situ. I'd say I'm not sure how safe that is, but given it doesn't work at all, it couldn't be worse.

@simonLeary42
Copy link
Author

simonLeary42 commented Oct 22, 2024

The workaround for me was to rebuild the package on my own. I copied packaging/deb/ to ./debian/, manually substituted @EXTRA_DEPENDS@ based on the contents of packaging/deb/packaging.yml, added ruby-bundler as a build dependency because it would fail without it, installed dependencies by hand, updated debian/changelog, and ran dpkg-buildpackage.

Does your packaging system not publish debian source archives?

@johrstrom johrstrom added bug Existing functionality not working as expected area/installation labels Oct 28, 2024
@johrstrom johrstrom modified the milestones: Backlog, 3.1 Oct 28, 2024
@simonLeary42
Copy link
Author

it's working again after updating to 3.1.10

@johrstrom
Copy link
Contributor

Thank you for confirming. Yes it was just a packaging issue that should have been resolved when we packaged 3.1.10.

Thanks again for the ticket and the confirmation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/installation bug Existing functionality not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants