Error writing to STDERR

8 views
Skip to first unread message

joost baaij (space babies)

unread,
Feb 13, 2009, 7:59:19 AM2/13/09
to Phusion Passenger Discussions
At www.radio1.nl we are running an edge version of Passenger. I
understand there has been discussion back and forth with our admins on
how to set it up and scale. Passenger works on our distributed setup,
but I have encoutered a problem writing to stderr.

The ruby-open gem inside my app does a bit of stderr-output for every
openid association.

vendor/gems/ruby-openid-2.1.2/lib/openid/util.rb:87. This code is
executed:

require 'logger'
logger = Logger.new(STDERR)
logger.info(message)

which fails with the following:

IOError: closed stream

Backtrace:
----------
(eval):3:in `write'
/software/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/logger.rb:504:in
`write'
/software/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/monitor.rb:
242:in `synchronize'
/software/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/logger.rb:496:in
`write'
/software/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/logger.rb:326:in
`add'
/software/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/logger.rb:374:in
`info'
[RAILS_ROOT]/vendor/gems/ruby-openid-2.1.2/lib/openid/util.rb:87:in
`log'

Hongli Lai

unread,
Feb 13, 2009, 8:59:40 AM2/13/09
to phusion-...@googlegroups.com
joost baaij (space babies) wrote:
> At www.radio1.nl we are running an edge version of Passenger. I
> understand there has been discussion back and forth with our admins on
> how to set it up and scale. Passenger works on our distributed setup,
> but I have encoutered a problem writing to stderr.
>
> The ruby-open gem inside my app does a bit of stderr-output for every
> openid association.
>
> vendor/gems/ruby-openid-2.1.2/lib/openid/util.rb:87. This code is
> executed:
>
> require 'logger'
> logger = Logger.new(STDERR)
> logger.info(message)
>
> which fails with the following:
>
> IOError: closed stream

There's a solution for this here:
http://groups.google.com/group/phusion-passenger/browse_thread/thread/30b8996f8a1b11f0/ba4cc76a5a08c37d?hl=en&lnk=gst&q=openid#ba4cc76a5a08c37d

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

joost baaij (space babies)

unread,
Feb 13, 2009, 9:16:59 AM2/13/09
to Phusion Passenger Discussions
Great!

Is it specific to the openid gem or a more general problem? Because as
far as I can tell, the gem initializes a plain old Ruby Logger to
stderr. Meaning this could be occurring more often.

Thanks for the quick response.

On 13 feb, 14:59, Hongli Lai <hon...@phusion.nl> wrote:
> joost baaij (space babies) wrote:
>
>
>
> > Atwww.radio1.nlwe are running an edge version of Passenger. I
> > understand there has been discussion back and forth with our admins on
> > how to set it up and scale. Passenger works on our distributed setup,
> > but I have encoutered a problem writing to stderr.
>
> > The ruby-open gem inside my app does a bit of stderr-output for every
> > openid association.
>
> > vendor/gems/ruby-openid-2.1.2/lib/openid/util.rb:87. This code is
> > executed:
>
> > require 'logger'
> > logger = Logger.new(STDERR)
> > logger.info(message)
>
> > which fails with the following:
>
> > IOError: closed stream
>
> There's a solution for this here:http://groups.google.com/group/phusion-passenger/browse_thread/thread...
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Feb 13, 2009, 9:22:14 AM2/13/09
to phusion-...@googlegroups.com
joost baaij (space babies) wrote:
> Great!
>
> Is it specific to the openid gem or a more general problem? Because as
> far as I can tell, the gem initializes a plain old Ruby Logger to
> stderr. Meaning this could be occurring more often.
>
> Thanks for the quick response.

It's been a while since I've last looked at the problem, but if I
remember correctly, it's an OpenID gem specific problem. It closes
stderr somewhere for some reason.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Reply all
Reply to author
Forward
0 new messages