[Nitro] app.port isn't always read when something goes wrong during setup
Jimmy Jazz
Jimmy.Jazz at gmx.net
Wed Jul 4 13:19:23 EDT 2007
Hello,
Also, i'm hunting. Stop me if i'm to wild :)
That is not quite a nitro bug but could be annoying.
A server is already using port 9000 and you planned to run nitro on the
port 9002 in the same time by modifying app.port = 9002 in debug.rb. But
the nitro web server failed to connect to the database (bad password for
example). You will get:
$ ../nitro/bin/nitro
INFO: Og uses the Mysql store.
mysqladmin: connect to server at '' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
INFO: Dropped database 'aTest'
ERROR: Access denied for user 'root'@'localhost' (using password: YES)
INFO: Starting Webrick adapter on 0.0.0.0:9000
INFO: Press Ctrl-C to shutdown; Run with --help for options.
/usr/lib64/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already
in use - bind(2) (Errno::EADDRINUSE)
from /usr/lib64/ruby/1.8/webrick/utils.rb:73:in `new'
from /usr/lib64/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
from /usr/lib64/ruby/1.8/webrick/utils.rb:70:in `each'
from /usr/lib64/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
from /usr/lib64/ruby/1.8/webrick/server.rb:75:in `listen'
from /usr/lib64/ruby/1.8/webrick/server.rb:63:in `initialize'
from /usr/lib64/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter/webrick.rb:55:in
`new'
from
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter/webrick.rb:55:in
`start'
from
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:122:in
`start'
from app.rb:14
The server won't use the port 9002 anymore but the default one (port
9000) instead.
The other peculiar behavior is when you stop the server (port=9002) with
Ctrl-C, nitro restarts automatically with port=9000.
$ ../nitro/bin/nitro
INFO: Og uses the Mysql store.
Database "aTest" dropped
INFO: Dropped database 'aTest'
INFO: Database 'aTest' not found!
INFO: Created database 'aTest'
DEBUG: Og manageable classes: [Menubar, Navigation]
DEBUG: CREATE TABLE ognavigation (`oid` CHAR(22) PRIMARY KEY, `title`
text, `url` text, `position` integer)
INFO: Created table 'ognavigation'.
DEBUG: SELECT * FROM ognavigation LIMIT 1
DEBUG: SELECT * FROM ognavigation LIMIT 1
DEBUG: CREATE TABLE ogmenubar (`oid` CHAR(22) PRIMARY KEY, `title` text,
`url` text, `position` integer, `access_key` text, `hint` text)
INFO: Created table 'ogmenubar'.
DEBUG: SELECT * FROM ogmenubar LIMIT 1
DEBUG: SELECT * FROM ogmenubar LIMIT 1
DEBUG: SELECT * FROM ogmenubar ORDER BY position ASC
INFO: Initializing Database
DEBUG: INSERT INTO ogmenubar (`title`, `position`, `access_key`, `url`,
`hint`, `oid`) VALUES ('Accueil', 1, 'a', '/index', 'Page d\'accueil du
site', 'b-zWZKkJ8r3kvGabpumjG5')
DEBUG: INSERT INTO ogmenubar (`title`, `position`, `access_key`, `url`,
`hint`, `oid`) VALUES ('Communauté', 2, 'c', '/blog/index', 'Les amis du
penguin', 'b-F_2ukJ8r3kvGabpumjG5')
DEBUG: INSERT INTO ogmenubar (`title`, `position`, `access_key`, `url`,
`hint`, `oid`) VALUES ('Magazine', 3, 'm', '/wiki/index', 'A la
découverte du penguin', 'b-Ghx4kJ8r3kvGabpumjG5')
DEBUG: INSERT INTO ogmenubar (`title`, `position`, `access_key`, `url`,
`hint`, `oid`) VALUES ('Contact', 4, 'o', '/contact', 'Pour en savoir
plus sur nous', 'b-GoWokJ8r3kvGabpumjG5')
INFO: Starting Webrick adapter on 0.0.0.0:9002
INFO: Press Ctrl-C to shutdown; Run with --help for options.
INFO: Stoping Webrick adapter.
INFO: Og uses the Mysql store.
Database "aTest" dropped
INFO: Dropped database 'aTest'
INFO: Database 'aTest' not found!
INFO: Created database 'aTest'
DEBUG: Og manageable classes: []
DEBUG: SELECT * FROM ogmenubar ORDER BY position ASC
ERROR: DB error Table 'aTest.ogmenubar' doesn't exist, [SELECT * FROM
ogmenubar ORDER BY position ASC]
ERROR:
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/adapter/mysql.rb:122:in
`query'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/adapter/mysql.rb:122:in
`query_statement'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/store/sql.rb:554:in
`query'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/store/sql.rb:367:in
`find'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/model.rb:316:in
`all'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/manager.rb:118:in
`with_store'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/model.rb:315:in
`all'
./conf/debug.rb:34:in `init_og'
./conf/debug.rb:19:in `setup_og'
./conf/debug.rb:28:in `setup'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:152:in
`read_configuration_file'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:180:in
`configure'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:97:in
`start'
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro.rb:73:in
`start'
app.rb:16
INFO: Starting Webrick adapter on 0.0.0.0:9000
INFO: Press Ctrl-C to shutdown; Run with --help for options.
INFO: Stoping Webrick adapter.
Jj
--
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070704/557f0a01/attachment.html
More information about the Nitro-general
mailing list