Here's a better example of the first problem mentioned: [user@host mongrel2]$ m2sh running -name db_backups [user@host at PID 6374 running. [user@host mongrel2]$ m2sh running -name dev [user@host 22 Aug 2013 21:48:28 GMT [ERROR] (errno: No such file or directory) Couldn't read the PID from ./db_backups/run/dev_mongrel2.pid [user@host is not running because pid_file isn't there. [user@host mongrel2]$ cd .. [user@host ~]$ m2sh running -config mongrel2/config.sqlite -name db_backups [user@host 22 Aug 2013 21:49:00 GMT [ERROR] (src/config/db.c:172: errno: No such file or directory) SQL error "no such table: server" at: '' [user@host 22 Aug 2013 21:49:00 GMT [ERROR] (errno: None) Wrong return type from query, should be list. [user@host ~]$ m2sh running -config mongrel2/config.sqlite -name dev [user@host 22 Aug 2013 21:49:05 GMT [ERROR] (src/config/db.c:172: errno: No such file or directory) SQL error "no such table: server" at: '' [user@host 22 Aug 2013 21:49:05 GMT [ERROR] (errno: None) Wrong return type from query, should be list. [user@host ~]$
m2sh seems to have an undesired use of cwd in there somewhere. Any ideas? On Thu, Aug 22, 2013 at 2:34 PM, Brian McQueen <[email protected]>wrote: > I've been rolling out mongrel2 on a larger scale here at my company, > instead of just using it for my own cool projects. I'm seeing some oddness > in getting chroot's working. I'd be happy to work on m2sh too, to fix > bugs. I do like it as a tool. > > Anyway, the first problem I'm seeing that when I run it from the mogrel2 > home its fine: > > m2sh start -config config.sqlite -name dev > > but if I try to run it from the parent dir there's an odd problem reported > about finding a row in the db: > > cd .. > m2sh start -config ./mongrel2/config.sqlite -name dev > Thu, 22 Aug 2013 21:26:18 GMT [ERROR] (src/config/db.c:172: errno: No such > file or directory) SQL error "no such table: server" at: '' > Thu, 22 Aug 2013 21:26:18 GMT [ERROR] (errno: None) Wrong return type from > query, should be list. > > This was found while investigating chroot problems. The second problem > I've found is that when I run it with sudo and it does its chroot, its > serves up the web content perfectly: > > m2sh start -sudo -config config.sqlite -name dev > > but if I run it as the user, instead of root, from the foregound, the web > content is not found: > > m2sh start -name dev > > It all looks good, but the files are not found. I can't figure out why, > and I can't guess where its doc root is. Where is the thing looking for > web content in this fail case? Its the same config, but first it runs via > sudo in the background and its good, the second case, running in the > foreground as the user - always getting 404s. I can't see any clues in the > logs about where its actually looking for the file it can't find. > -- the news wire of the 21st century - twitchy.com
