Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis Errors: could not connect to server: Connection refused #1023

Closed
notapatch opened this issue Aug 10, 2019 · 1 comment
Closed

Travis Errors: could not connect to server: Connection refused #1023

notapatch opened this issue Aug 10, 2019 · 1 comment

Comments

@notapatch
Copy link
Contributor

notapatch commented Aug 10, 2019

Description of the issue 📄

A pull request I was working on generated the following error. I am also seeing the same error in the last two builds

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 5432?
/home/travis/.rvm/gems/ruby-2.4.2/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
...
... more stacktrace from postgresql

Steps to fix 🛠

I have no idea why it has started now - that's never a good start is it? Maybe someone knows better? Otherwise, given that it is a postgresql stack trace and you have a PG gem but nothing explicit in the .travis.yml. I wanted to put a pull request that added postgresql as a service. I would also want to force a couple of builds to see if this was an intermittent problem or not but I thought I should mention this first as you might, quite reasonably, question what was going on.

# .travis.yml
... 
services:
  - postgresql
... 

Reference

psql: could not connect to server error on “travis-ci”

EDIT:

I now understand.
Travis have been moving builds up from Travis from Trusty to Xenial.

If you look at the last successful build, 13 days ago, it was on Trusty. After that it was on Xenial and the builds start to fail - even when you fix the postgres addon issue the tests are flaky. We can set it back to Trusty and work on the Xenial issues?


# .travis.yml
...
dist: trusty
...

notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.6)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.6)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.6)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.2)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.2)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.X)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.4)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.6)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
notapatch added a commit to notapatch/planner that referenced this issue Aug 12, 2019
  - 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 5432?
  - codebar#1023
  - this would make postgresql available (currently 9.6)
    - https://docs.travis-ci.com/user/database-setup/#postgresql
@matyikriszta
Copy link
Contributor

@notapatch thanks for opening the PR to fix this, as it has now been merged in I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants