Skip to content

Error building Adventureworks docker image and connecting to postgres #65

@larissawn

Description

@larissawn

I get an error when building a docker image. Because of the error, I also cannot connect to PostgreSQL.

Code:

source(here("book-src", "restore-adventureworks-postgres-on-docker.R"))

Error:

Error response from daemon: Container 34a50e47793b02a0259fa8f533b6078dadb546f165dbd0987d6d8f22ba30d2ce is not running
Error response from daemon: Container 34a50e47793b02a0259fa8f533b6078dadb546f165dbd0987d6d8f22ba30d2ce is not running

When I try to connect:

Sys.sleep(sleep_default)
# con <- connection_open(  # use in an interactive session
con <- dbConnect(          # use in other settings
  RPostgres::Postgres(),
  # without the previous and next lines, some functions fail with bigint data 
  #   so change int64 to integer
  bigint = "integer",  
  host = "localhost",
  port = 5439,  # this version still using 5432!!!
  user = "postgres",
  password = "postgres",
  dbname = "adventureworks"
)

I get this error:

Error: could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5439?
could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5439?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions