Forum: Ruby on Rails Postgresql error in connecting to database - invalid response to ssl negotiation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
08fae63ec2068f88176ddc3fcd3f77ff?d=identicon&s=25 @shaan (Guest)
on 2010-02-27 16:35
(Received via mailing list)
Hello,

I have a rails application with PostgreSQL as the database. The
application works fine on my development PC.

I deployed this application to a server PC (different one), where I am
getting the following error -

PGError in StudentsController#home

received invalid response to SSL negotiation: -

The error trace is as below -

C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:713:in `initialize'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:713:in `connect'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:713:in `connect'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:237:in `initialize'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:23:in `new'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/
postgresql_adapter.rb:23:in `postgresql_connection'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:291:in `send'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:291:in `connection='
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:259:in `retrieve_connection'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:78:in `connection'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/caching.rb:677:in
`perform_action'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/base.rb:524:in
`process_without_filters'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/filters.rb:685:in
`process_without_session_management_support'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/session_management.rb:123:in
`process'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in
`handle_request'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in
`dispatch_cgi'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/rails.rb:76:in `process'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/rails.rb:74:in `synchronize'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/rails.rb:74:in `process'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:159:in `process_client'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:158:in `each'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:158:in `process_client'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in `initialize'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in `new'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:268:in `initialize'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:268:in `new'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:268:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:282:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:281:in `each'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:281:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:128:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/lib/mongrel/command.rb:212:in `run'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:281
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
rails-2.0.2/lib/commands/servers/mongrel.rb:64
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubygems/
custom_require.rb:27:in `gem_original_require'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubygems/
custom_require.rb:27:in `require'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubyscript2exe.gems/gems/
rails-2.0.2/lib/commands/server.rb:39
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubygems/
custom_require.rb:27:in `gem_original_require'
C:/DOCUME~1/ADMINI~1/eee/eee.exide.exe.3/lib/rubygems/
custom_require.rb:27:in `require'
script/server:3
init.rb:7:in `load'
init.rb:7
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:608:in `load'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:608
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:559:in
`newlocation'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:487:in
`newlocation'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:454:in
`newlocation'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:487:in
`newlocation'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:559:in
`newlocation'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\app\exide.rb:603
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\bootstrap.rb:77:in `load'
C:\DOCUME~1\ADMINI~1\eee\eee.exide.exe.3\bootstrap.rb:77


I would be very grateful, if somebody can provide any hint on why this
error is occurring.

love-n-peace,
@shaan
'Aal izz well' :-)
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2010-02-27 19:41
Why SSL? DB and application are on different machines?
08fae63ec2068f88176ddc3fcd3f77ff?d=identicon&s=25 @shaan (Guest)
on 2010-02-28 09:32
(Received via mailing list)
Hi,

I do not know much about SSL's role here. Also, the application and
the DB are on the same machine, however the machine is on a LAN.

I was running Mongrel on localhost and DB also is on localhost.

Please suggest me some string or kindly let me know in case you need
some more information.

love-n-peace,
@shaan
'Aal izz well' :-)
08fae63ec2068f88176ddc3fcd3f77ff?d=identicon&s=25 @shaan (Guest)
on 2010-02-28 12:06
(Received via mailing list)
Hi,

Some more information on ssl from the pgAdmin client. The ssl option
is 'off' in the server configuration.

My rails application has been connecting right to the database (both
on the same computer) at my development environment.

But, at my deployment environment (different computer), the computer
is over a LAN and connected to the internet; I don't know if it
relates to the problem at all.
I just checked the ssl option, which is 'off' by default.

@shaan
Fcfe5d78580c3b33670d2eaf6bd186b4?d=identicon&s=25 suresh r. (suresh_r)
on 2011-08-10 12:23
I tried to convert shape file to postgresql using following command
shpe2pgsql -c -D -s 4269 -i -I d:\temp\ublock.shp public.block >
block.sql

Then I throw

psql -d testdb -f block.sql
when i throw psql command
it gives error invalid response  to ssl negotiation.
Can u pl help me to solve this problem.

Prior to convert I have creted a empty table name block in public.schema
then i tried to populated ublock.shp to block table.
i faild to do this. Please some body help me in this context.
332a1f606cd0a891c492c4f61ba9c928?d=identicon&s=25 Biju Angad (biju_a)
on 2015-10-01 19:45
error occurs while opening the server postgressql 8.0
"received invalid response to SSL negotiation"
This topic is locked and can not be replied to.