I am trying to connect SWAG to a domain via cloudflare. I get the following error message in the logs of SWAG.
As email I have entered the address with which I log in to cloudflare and as key the Global API Key from cloudflare.
Am I doing something wrong? How can I find out where the error is? Thanks!
I entered the email and the Global API Key into the cloudflare.ini from SWAG Docker and got the error mentioned.
Here is an extract from the logs:
Mar 23 15:30:45 Aldnoah nginx: 2022/03/23 15:30:45 [error] 2323#2323: *868944 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/token HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/token", host: "192.168.178.47", referrer: "http://192.168.178.47/dockerterminal/swag/"
Mar 23 15:30:45 Aldnoah nginx: 2022/03/23 15:30:45 [error] 2323#2323: *869155 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/ws HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/ws", host: "192.168.178.47"
Mar 23 15:30:45 Aldnoah nginx: 2022/03/23 15:30:45 [error] 2323#2323: *868944 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/token HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/token", host: "192.168.178.47", referrer: "http://192.168.178.47/dockerterminal/swag/"
Mar 23 15:30:45 Aldnoah nginx: 2022/03/23 15:30:45 [error] 2323#2323: *869158 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/ws HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/ws", host: "192.168.178.47"
Mar 23 15:30:46 Aldnoah nginx: 2022/03/23 15:30:46 [error] 2323#2323: *868944 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/token HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/token", host: "192.168.178.47", referrer: "http://192.168.178.47/dockerterminal/swag/"
Mar 23 15:30:46 Aldnoah nginx: 2022/03/23 15:30:46 [error] 2323#2323: *869161 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/ws HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/ws", host: "192.168.178.47"
Mar 23 15:30:47 Aldnoah nginx: 2022/03/23 15:30:47 [error] 2323#2323: *868944 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/token HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/token", host: "192.168.178.47", referrer: "http://192.168.178.47/dockerterminal/swag/"
Mar 23 15:30:47 Aldnoah nginx: 2022/03/23 15:30:47 [error] 2323#2323: *869165 connect() to unix:/var/tmp/swag.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.178.22, server: , request: "GET /dockerterminal/swag/ws HTTP/1.1", upstream: "http://unix:/var/tmp/swag.sock:/ws", host: "192.168.178.47"
Related
I'm getting a 502 when hitting my rails app.
2018/12/22 20:12:37 [error] 22034#22034: *81 connect() to unix:/home/user/project/shared/tmp/sockets/puma.sock failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: localhost, request: "GET /api/v1/login HTTP/1.1", upstream: "http://unix:/home/user/project/shared/tmp/sockets/puma.sock:/500.html", host: "xx.xx.xx.xx"
Is there a better way to troubleshoot this by finding a more descriptive error?
Symptoms:
When navigating to the EB URL, page never loads.
I can provide parts of my project config if needed. Here is a portion of the log from my AWS EB instance:
2018/02/18 09:35:22 [warn] 3060#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
2018/02/18 09:46:48 [error] 3064#0: *167 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.31.4.6, server: _, request: "GET /users HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/users", host: "idea-jotter-api-env.ukn765e3m3.ap-southeast-1.elasticbeanstalk.com"
2018/02/18 09:46:49 [error] 3064#0: *167 connect() to unix:///var/run/puma/my_app.sock failed (111: Connection refused) while connecting to upstream, client: 172.31.4.6, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "idea-jotter-api-env.ukn765e3m3.ap-southeast-1.elasticbeanstalk.com", referrer: "http://idea-jotter-api-env.ukn765e3m3.ap-southeast-1.elasticbeanstalk.com/users"
2018/02/19 13:11:50 [error] 3064#0: *24659 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.31.31.179, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock/", host: "52.221.25.234"
Trying to upload my rails app to elastic beanstalk. I have successfully deployed my app and created postgres database. My app works on sqlite3 on development server.
my eb status is ready and health is green.
my eb logs file;
/var/log/nginx/error.log
-------------------------------------
2016/05/27 11:15:44 [warn] 2797#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
2016/05/27 11:27:26 [crit] 2805#0: *140 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.26.77, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:27:26 [crit] 2805#0: *140 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.26.77, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
2016/05/27 11:34:45 [crit] 2805#0: *262 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:34:45 [crit] 2805#0: *262 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
2016/05/27 11:40:48 [crit] 2805#0: *353 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:40:49 [crit] 2805#0: *353 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
-------------------------------------
/var/log/puma/puma.log
-------------------------------------
=== puma startup: 2016-05-27 11:52:07 +0000 ===
=== puma startup: 2016-05-27 11:52:07 +0000 ===
[23871] - Worker 0 (pid: 23875) booted, phase: 0
[23871] - Gracefully shutting down workers...
[23871] === puma shutdown: 2016-05-27 12:36:32 +0000 ===
[23871] - Goodbye!
=== puma startup: 2016-05-27 12:36:35 +0000 ===
=== puma startup: 2016-05-27 12:36:35 +0000 ===
[24886] - Worker 0 (pid: 24890) booted, phase: 0
I am fairly new to eb so I wonder if the problem occurs because of the followings;
I have not installed node that is why it can not connect
Or I have problems with the security groups. I have 4 total as seen in the picture.
my network interfaces;
when I try to detach RDS security group, it gives an error no authorization, even though I signed in as root.
I have been trying to solve the problem for hours now and really appreciate any help!
EDIT
I think I m having same issue as here. But could not understand how to solve it
Your problem is very clear from the Nginx log:
connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream
It reads:
No such file or directory
This means that your socket doesn't not exist at this path:
/var/run/puma/my_app.sock
You need to setup the path to be the same as in your Rails/Puma
upstream(i.e. configuration)
When you will do that don't forget to make sure that Nginx user
can access that socket it will need RW access.
So, I try to install Gitlab and I have some problems. At the end of Installation from source, when I try to start all services, I have a 502 error. I have this message when I try sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production :
Check GitLab API access: FAILED. code: 502
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the checks.
After some search, I think it's a unicorn error. That's what I find in the file log tail -n 15 /home/git/gitlab/log/unicorn.stderr.log :
F, [2015-08-17T14:08:25.266483 #15125] FATAL -- : error adding listener addr="188.213.26.27":80
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `initialize': Permission denied - bind(2) for "188.213.26.27" port 80 (Errno::EACCES)
I don't know how I can change this and if it's the real problem. If it can help, this is the Nginx log tail -f /var/log/nginx/gitlab_error.log :
2015/08/16 16:46:24 [error] 14932#0: *33 limiting connections by zone "limit_per_ip", client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET / HTTP/1.0", host: "gitlab.nova.ovh"
2015/08/16 17:00:41 [error] 14932#0: *71 limiting connections by zone "limit_per_ip", client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET / HTTP/1.0", host: "gitlab.nova.ovh"
2015/08/16 17:01:04 [error] 19194#0: *33 limiting connections by zone "limit_per_ip", client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET / HTTP/1.0", host: "gitlab.nova.ovh"
2015/08/16 17:03:01 [error] 19713#0: *33 limiting connections by zone "limit_per_ip", client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET / HTTP/1.0", host: "gitlab.nova.ovh"
2015/08/17 12:18:09 [error] 18616#0: *3 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (111: Connection refused) while connecting to upstream, client: 82.127.11.127, server: gitlab.nova.ovh, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "gitlab.nova.ovh"
2015/08/17 12:18:26 [error] 18616#0: *6 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (111: Connection refused) while connecting to upstream, client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET //api/v3/internal/check HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket://api/v3/internal/check", host: "gitlab.nova.ovh"
2015/08/17 13:47:09 [error] 18616#0: *38 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (111: Connection refused) while connecting to upstream, client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET //api/v3/internal/check HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket://api/v3/internal/check", host: "gitlab.nova.ovh"
2015/08/17 13:48:05 [error] 18616#0: *42 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (111: Connection refused) while connecting to upstream, client: 188.213.26.27, server: gitlab.nova.ovh, request: "GET //api/v3/internal/check HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket://api/v3/internal/check", host: "gitlab.nova.ovh"
Unicorn must not bind port 80 which it is denied anyways (hence the error message). Binding ports below 1024 requires root privileges. Also port 80 is used by nginx. Configure unicorn to not listen to TCP ports at all if you're using unix socket or any high port (e.g. 8080 or 8081) for use with TCP socket.
Working with some inherited code using devise and active admin.
I have a form to create an admin_user (email, password, password confirm) After clicking submit the browsers hangs for bit before showing me a 504. The user is created and in the db.
This issue kind of came out of nowhere. The few commits I have done didn't touch this part of the project.
Here is the code that creates the admin user form. What happens after this I am still unclear on:
ActiveAdmin.register AdminUser do
menu :parent => "Sys Admin", :priority => 2
index do
column :email
column :current_sign_in_at
column :last_sign_in_at
column :sign_in_count
default_actions
end
filter :email
form do |f|
f.inputs "Admin Details" do
f.input :email
f.input :password
f.input :password_confirmation
end
f.buttons
end
controller do
#https://coderwall.com/p/xfrujq
def update_resource(object, attributes)
update_method = attributes.first[:password].present? ? :update_attributes : :update_without_password
object.send(update_method, *attributes)
end
end
end
2013/10/17 11:58:32 [error] 1609#0: *293930 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "HEAD / HTTP/1.0", upstream: "http://***IP****:8080/", host: "www.*******.com"
2013/10/17 11:58:46 [error] 1610#0: *293932 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "HEAD / HTTP/1.0", upstream: "http://***IP****:8080/", host: "www.*******.com"
2013/10/17 11:58:50 [error] 1610#0: *293934 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "HEAD / HTTP/1.0", upstream: "http://***IP****:8080/", host: "www.*******.com"
2013/10/17 11:59:23 [error] 1610#0: *293936 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "HEAD / HTTP/1.0", upstream: "http://***IP****:8080/", host: "www.*******.com"
2013/10/17 11:59:47 [error] 1610#0: *293938 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "GET /*****/4960 HTTP/1.1", upstream: "http://***IP****:8080/*****/4960", host: "www.*******.com", referrer: "https://www.*******.com/*****/4960"
2013/10/17 11:59:48 [error] 1610#0: *293938 connect() failed (111: Connection refused) while connecting to upstream, client: ***IP****, server: www.*******.com, request: "GET /*****/assets/btn_menu_close.png HTTP/1.1", upstream: "http://***IP****:8080/*****/assets/btn_menu_close.png", host: "www.*******.com", referrer: "https://www.*******.com/*****/4960"
2013/10/17 12:30:12 [error] 1611#0: *294268 open() "/home/deployer/apps/*******/current/public/assets/wufoo.js" failed (2: No such file or directory), client: ***IP****, server: www.*******.com, request: "GET /assets/wufoo.js HTTP/1.1", host: "www.*******.com", referrer: "https://www.*******.com/pioneer"
2013/10/17 12:38:17 [error] 1610#0: *294379 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "POST /admin/admin_users HTTP/1.1", upstream: "http://***IP****:8080/admin/admin_users", host: "www.*******.com", referrer: "https://www.*******.com/admin/admin_users/new"
2013/10/17 12:40:05 [error] 1610#0: *294404 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /patients HTTP/1.1", upstream: "http://***IP****:8080/patients", host: "www.*******.com", referrer: "https://www.*******.com/users/sign_in"
2013/10/17 13:14:28 [error] 1608#0: *294872 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /api/v1/*****/2018/**_*****.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/*****/2018/**_*****.json", host: "www.*******.com"
2013/10/17 13:15:45 [error] 1609#0: *295095 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /api/v1/*****/2224/**_*****.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/*****/2224/**_*****.json", host: "www.*******.com"
2013/10/17 13:17:34 [error] 1608#0: *295160 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /api/v1/medications.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/medications.json", host: "www.*******.com"
2013/10/17 13:20:51 [error] 1609#0: *295800 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /api/v1/*****/3698/**_*****.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/*****/3698/**_*****.json", host: "www.*******.com"
2013/10/17 13:58:21 [error] 1608#0: *298069 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "GET /api/v1/*****/3457/**_*****.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/*****/3457/**_*****.json", host: "www.*******.com"
2013/10/17 16:44:39 [error] 1611#0: *301472 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "POST /admin/admin_users HTTP/1.1", upstream: "http://***IP****:8080/admin/admin_users", host: "www.*******.com", referrer: "https://www.*******.com/admin/admin_users/new"
2013/10/17 19:09:24 [error] 1608#0: *302423 upstream prematurely closed connection while reading response header from upstream, client: ***IP****, server: www.*******.com, request: "POST /api/v1/images/4650/upload_file.json HTTP/1.1", upstream: "http://***IP****:8080/api/v1/images/4650/upload_file.json", host: "www.*******.com"