yueshengu / rpostgresql

Automatically exported from code.google.com/p/rpostgresql
0 stars 0 forks source link

Connection in CLOSE_WAIT state when attempting to connect to nonexistent dbname #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

drv <- dbDriver('PostgreSQL')
db <- dbConnect(drv, host='localhost', user='valid user', dbname='stocksdddd')

Error Reported:
Error in postgresqlNewConnection(drv, ...) : 
  RS-DBI driver: (could not connect 'valid user'@localhost on dbname "stocksdddd"
)

On OS X 'netstat -p tcp

tcp4       0      0  localhost.49188        localhost.postgresql   CLOSE_WAIT
tcp4       0      0  localhost.postgresql   localhost.49188        FIN_WAIT_2

Never times out.

dbUnloadDriver(drv)

Removes the FIN_WAIT_2 side of the connection.  CLOSE_WAIT remains.

Closing R removes the CLOSE_WAIT connection.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Reported by Derek
I'm running Ubuntu 12.10.  R version is 2.15.1 and RPostgreSQL version is 
0.3-3.  The server is PostgreSQL 9.0.5.

Confirmed by Neil
Mac OS X 10.8.2, R version 2.15.3, RPostgreSQL_0.3-3, Postgresql 9.2.2

Please provide any additional information below.

Original issue reported on code.google.com by ne...@neiltiffin.com on 15 Mar 2013 at 4:11

GoogleCodeExporter commented 8 years ago
I hope this issue is solved with r250.

Original comment by tomoa...@kenroku.kanazawa-u.ac.jp on 12 Jun 2013 at 7:41

GoogleCodeExporter commented 8 years ago

Original comment by tomoa...@kenroku.kanazawa-u.ac.jp on 25 Jun 2013 at 6:04