# オンライン再構築後、tests-passed Productionで502 Bad Gatewayが発生しました

**URL:** <https://meta.discourse.org/t/502-bad-gateway-after-online-rebuild-of-tests-passed-production-just-now/288705>\
**Category:** Self-hosting\
**Created:** [2023 年 12 月 14 日午後 5:11 UTC](https://meta.discourse.org/t/502-bad-gateway-after-online-rebuild-of-tests-passed-production-just-now/288705 "2023-12-14T17:11:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2023 年 12 月 14 日午後 5:11 UTC](https://meta.discourse.org/t/502-bad-gateway-after-online-rebuild-of-tests-passed-production-just-now/288705/1 "2023-12-14T17:11:26Z")

</div>

サーバーの再起動、コンテナの再起動、コンソールの再構築では解決しません。

コンテナは `./launcher enter app` が実行できるので起動しています。

ログに以下のエラーが多数見られますが、Redisの障害を調査する方法について何かアイデアはありますか？

```plaintext
Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:398:in `rescue in establish_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:379:in `establish_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:115:in `block in connect'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:344:in `with_reconnect'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:114:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:409:in `ensure_connected'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:269:in `block in process'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:356:in `logging'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:268:in `process'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:161:in `call'first?

```

これは良い考えかわかりませんが、手動で起動してみました。

```plaintext
/var/www/discourse# redis-server
3770:C 14 Dec 2023 17:20:17.171 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3770:C 14 Dec 2023 17:20:17.171 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=3770, just started
3770:C 14 Dec 2023 17:20:17.171 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
3770:M 14 Dec 2023 17:20:17.173 * monotonic clock: POSIX clock_gettime
3770:M 14 Dec 2023 17:20:17.173 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
3770:M 14 Dec 2023 17:20:17.173 # Failed listening on port 6379 (TCP), aborting.

```

---

_[View the full topic](https://meta.discourse.org/t/502-bad-gateway-after-online-rebuild-of-tests-passed-production-just-now/288705)._
