Python openshift上redis的代理错误

Python openshift上redis的代理错误,python,redis,openshift,Python,Redis,Openshift,我正在openshift上运行一个python应用程序,使用redis作为数据存储 在过去的几天里,该应用程序已经停止工作 当我通过邮递员向我的应用程序发送请求时,我看到: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /index. Reason: Error readin

我正在openshift上运行一个python应用程序,使用redis作为数据存储

在过去的几天里,该应用程序已经停止工作

当我通过邮递员向我的应用程序发送请求时,我看到:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.

Reason: Error reading from remote server
当我登录到我的应用程序时:

$ rhc tail myapp
我明白了:

==> app-root/logs/python.log <==
[Sat Aug 22 18:19:29 2015] [error] \t\t\t\tvalid = true;\r
[Sat Aug 22 18:19:29 2015] [error] \t\t\t}\r
[Sat Aug 22 18:19:29 2015] [error] \t\t}\r
[Sat Aug 22 18:19:29 2015] [error] \t}\r
(98)Address already in use: make_sock: could not bind to address 127.2.78.1:8080
no listening sockets available, shutting down
Unable to open logs
(98)Address already in use: make_sock: could not bind to address 127.2.78.1:8080
no listening sockets available, shutting down
Unable to open logs

==> redis/logs/redis.log <==
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[133622] 25 Aug 12:04:29.516 # Server started, Redis version 2.6.13
[133622] 25 Aug 12:04:29.516 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory =
 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[133622] 25 Aug 12:04:29.516 * DB loaded from disk: 0.000 seconds
[133622] 25 Aug 12:04:29.516 * The server is now ready to accept connections on port 6379

这个错误看起来更像是上游web服务器代理您的uwsgi应用程序,而不是redis故障。换句话说,似乎是web服务器连接到你的应用程序而不是你的应用程序连接到redis的问题。redis日志看起来正在启动并运行良好。“已在使用”错误看起来像是你正在尝试重新启动应用程序,但它无法启动,因为它已在运行,如果没有进一步的信息,我会认为你的应用程序已挂起。你能强制终止你的应用程序进程,然后尝试重新启动它吗?我已经从gui内部重新启动了应用程序。然而,我仍然得到同样的错误。请看上面的输出。redis日志没有问题。您的redis服务器已启动并运行良好。在您发布的日志中,唯一一件看起来与众不同的事情就是已经在使用的地址——这表明您已经在端口8080上运行了其他东西,并且您的应用程序因此无法启动,或者您现有的应用程序没有正常关闭并且仍在运行。您对服务器的访问级别是什么?如果您有终端访问权限,您应该能够通过运行netstat-anp | grep80808080i获得的:sudo netstat-anp | grep8080 bash:/usr/bin/sudo:Permission来确定绑定端口8080的进程denied@user61629
netstat--listen—侦听端口的inet
[133622] 25 Aug 13:22:52.715 # User requested shutdown...
[133622] 25 Aug 13:22:52.715 * Saving the final RDB snapshot before exiting.
[133622] 25 Aug 13:22:52.735 * DB saved on disk
[133622] 25 Aug 13:22:52.735 * Removing the pid file.
[133622] 25 Aug 13:22:52.735 # Redis is now ready to exit, bye bye...
[394414] 25 Aug 13:22:52.830 * Max number of open files set to 10032
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 2.6.13 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 394414
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[394414] 25 Aug 13:22:52.834 # Server started, Redis version 2.6.13
[394414] 25 Aug 13:22:52.834 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory =
 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[394414] 25 Aug 13:22:52.834 * DB loaded from disk: 0.000 seconds
[394414] 25 Aug 13:22:52.834 * The server is now ready to accept connections on port 6379