Skip to content

Failed to open TCP connection - new item create/edit #266

@telezoic

Description

@telezoic

Hi again,

I'm setting up a new production build (DigitalOcean)

manager - v2.12.11
worker - v2.12.16

and I when I create/edit an 'object' (like a new parser, datasource, or contributor) in the manager, I consistently get a "We're sorry, something went wrong page" , but I can trim the url in the browser and go back and see that the item it created/edited does exist, what's more, I can use the item I created/edit. I thought this might be a route error but my manager log tells me there's a connection failure . . .

{"name":"rails","hostname":"SolumAuxiliator","pid":47743,"level":60,"time":"2022-06-02T21:44:19.981+00:00","v":0,"msg":"[6fd44b6c-546f-4611-9dc2-996e67f24e27] {:msg=>\"  \\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] Errno::ECONNREFUSED (Failed to open TCP connection to 127.0.0.1:3000 (Connection refused - connect(2) for \\\"127.0.0.1\\\" port 3000)):\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27]   \\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/api/api/request.rb:45:in `execute'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/api/api/request.rb:20:in `post'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/api/api/partner.rb:6:in `post'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/models/partner.rb:25:in `block in update_apis'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/models/partner.rb:24:in `each'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/models/partner.rb:24:in `update_apis'\\n[6fd44b6c-546f-4611-9dc2-996e67f24e27] app/controllers/parsers_controller.rb:65:in `update'\"}"}

to what looks like it should be the api at 127.0.0.1:3000 if I were running it in dev. My application.ymls all point to the API domain:

manager /config/application.yml

production:
  HOST: https://manager.auxiliator-digitalbc.ca
  WORKER_HOST: https://worker.auxiliator-digitalbc.ca
  WORKER_KEY: 959933ea2ead4b73a6d8415b4ddad7b931324501a379a9197ca8b38b90eb83f2b1d61bcbded14ddc8820d63f49f700fd6d8294f28e99b5bbcd71b960ab8aec29 
  API_HOST: https://api.auxiliator-digitalbc.ca
  MONGO_HOSTS: mongodb+srv://corymbusaux.d0rvn.mongodb.net:27017
  HARVESTER_API_KEY: LxPjQyKyBmo-emc7ATBL
  OTP_SECRET_KEY: YOUROTPSECRETKEY
  MFA_ENABLED: 'false'

worker /config/application.yml

production:
  HOST: 'https://worker.auxiliator-digitalbc.ca'
  API_HOST: 'https://api.auxiliator-digitalbc.ca'
  MANAGER_HOST: 'https://manager.auxiliator-digitalbc.ca'
  HARVESTER_API_KEY: LxPjQyKyBmo-emc7ATBL
  HARVESTER_CACHING_ENABLED: "true"
  LINK_CHECKING_ENABLED: "true"
  LINK_CHECKING_INTERVAL: 6
  LINKCHECKER_RECIPIENTS: "[email protected]"
  LINKCHECKER_EMAIL: "[email protected]"
  SECRET_KEY_BASE: 'some long hash value' 
  DEVISE_MAILER: "[email protected]"
  WORKER_KEY: 959933ea2ead4b73a6d8415b4ddad7b931324501a379a9197ca8b38b90eb83f2b1d61bcbded14ddc8820d63f49f700fd6d8294f28e99b5bbcd71b960ab8aec29 
  REDIS_URL: 'redis://localhost:6379/2'

api /config/application.yml

defaults: &defaults
  SOLR_PING: 'http://localhost:8982/solr/admin/ping'
  HTTP_HOST: 'https://api.auxiliator-digitalbc.ca'
  WORKER_API_URL: 'https://worker.auxiliator-digitalbc.ca'
  WWW_DOMAIN: 'www.dev'
  DEVISE_MAILER: '[email protected]'
  RESQUE_USER: 'admin'
  RESQUE_PASS: 'password'
  HARVESTER_IPS: '127.0.0.1'
  REQUEST_LIMIT_MAILER: '[email protected]'
  BLACKLIST_MAILER_TO: '[email protected]'
  BLACKLIST_MAILER_FROM: '[email protected]'
 # HTTP_HOST: 'http://test.host'
  MONGO_HOSTS: 'mongodb+srv://corymbusaux.d0rvn.mongodb.net:27017'
  SECRET_TOKEN: '456c9e5b80492fd22bbfba1c1a335913e12d9b06'
  WORKER_KEY: 959933ea2ead4b73a6d8415b4ddad7b931324501a379a9197ca8b38b90eb83f2b1d61bcbded14ddc8820d63f49f700fd6d8294f28e99b5bbcd71b960ab8aec29
  
  production:
  <<: *defaults

and of course my apache vhost has the HAproxy ref:

        ProxyPass / http://api.auxiliator-digitalbc.ca:81/ retry=0
       ProxyPassReverse / http://api.auxiliator-digitalbc.ca:81/

I can't locate any reference to 127.0.0.1:3000 in the app to see where this would be coming from, and I'm wondering how this info is generated in the hope that I can correct it.

Thanks for any assistance you could render.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions