Question

I have a job running in a Sidekiq queue and throws an error when making an outgoing connection. The server uses an outgoing proxy managed through the environment variable $http_proxy. This exact process worked fine before it was in a Sidekiq queue.

The error:

WARN: Connection refused - connect(2) for "rightsignature.com" port 443

I can curl https://rightsignature.com and it works just fine (from the command line where the environment variable is seen). I think the problem is due to Sidekiq not seeing the environment variable.

Was it helpful?

Solution

My solution to this was to set the http_proxy environment variable before the launch of the sidekiq executable. I modified the capistrano deployment.

... http_proxy=#{PROXY_SERVER} sidekiq ...

This solution seems a bit hackish, but it does solve my immediate problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top