Solved.
*In case anyone else runs into this:*
I noticed the following via strace output
read(12, "HTTP/1.1 304 Not Modified\r\nDate:"..., 65536) = 151
futex(0x6790958, FUTEX_WAKE_PRIVATE, 1) = 1
stat("~MY_NODE_APP_DIR~/node_modules/cheerio/lib/cheerio", 0x7fff75cd3708)
= -1 EACCES (Permission denied)
stat("~MY_NODE_APP_DIR~/node_modules/cheerio/lib/cheerio.js",
0x7fff75cd36a8) = -1 EACCES (Permission denied)
stat("~MY_NODE_APP_DIR~/node_modules/cheerio/lib/cheerio.json",
0x7fff75cd36a8) = -1 EACCES (Permission denied)
- In my APP, I'm doing SETUID & SETGID to contain the process to standard
POSIX FS permissions, so the app (after binding to reserved ports) runs as
an alternate unprivileged user (901:901). On a default - fresh install of
CentOS/RedHat the default new user directory umask creates directories in
0700 mode - meaning group and other have NO-ACCESS. This is something I
usually adjust when adding system and unprivileged accounts accounts on any
deployment box, and overlooked here. So the solution was to chmod
go+x ~MY_NODE_APP_DIR~/ and bam - no more errors.
Unfortunately, the node Error Exception message says "Cannot find module
'./cheerio'". This isn't absolutely incorrect, in fact node could not find
the module; But it would have been *EXTREMELY HELPFUL* if the Error Message
indicated that there was a Permission Denied problem when accessing the
search path... The error was only exposed by piping the process through
strace.
---
On Wednesday, May 1, 2013 10:30:06 AM UTC-4, JAB wrote:
>
> Correction,
>
> * node-inspector issue was a firewall issue.
> * fs.writeFile issue is not reproducible outside of the code (likely
> related to the abrupt exit / cheerio exception).
>
> Still hitting the cheerio load module exception - like clockwork in both
> VirtualBox and Vmware.
>
> Stumped...
>
>
> On Tuesday, April 30, 2013 2:57:16 PM UTC-4, JAB wrote:
>>
>> If anyone help or slap me straight, I'd appreciate it..
>>
>> I've built an app using express, cluster, async, mysql/mariadb. On my
>> desktop (running fedora 17), the app works as designed/expected. Prior to
>> deploying to production, I prepped a VirtualBox with the Cloud VPS OS
>> (CentOS 5.9) - re-baked my RPM (which does a straight ./configure, make,
>> make install) installed the 10.5 pagkage.
>>
>> When I deploy my node app to the VBox - I do a npm install or npm
>> rebuild, which succeeds nicely. However, when running my app - I see
>> errors that are exclusive to that environment, and don't seem to make any
>> sense. like the following: (running the tests for cheerio passes 100%)
>>
>> -----
>>
>> module.js:340
>> throw err;
>> ^
>> Error: Cannot find module './cheerio'
>> at Function.Module._resolveFilename (module.js:338:15)
>> at Function.Module._load (module.js:280:25)
>> at Module.require (module.js:364:17)
>> at require (module.js:380:17)
>> at Object.exports.load
>> (~MY_NODE_APP_DIR~/node_modules/cheerio/lib/static.js:15:17)
>> at Object.Markup.personalize
>> (~MY_NODE_APP_DIR~/components/render/middleware/lib/Markup.js:98:25)
>> at
>> ~MY_NODE_APP_DIR~/components/render/middleware/documentRenderer.js:109:24
>> at ~MY_NODE_APP_DIR~/node_modules/async/lib/async.js:527:17
>> at ~MY_NODE_APP_DIR~/node_modules/async/lib/async.js:113:25
>> at ~MY_NODE_APP_DIR~/node_modules/async/lib/async.js:24:16
>>
>> ------
>>
>> Additionally, I am unable to establish any connection to node-inspector -
>> when running in VBox, and fs.writeFile creates 0 byte files no matter what
>> i pass to it.
>>
>> Any ideas on how to chase this down?
>>
>
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.