Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Operation timed out #226

Closed
guohoo opened this issue Nov 15, 2020 · 8 comments
Closed

[BUG]Operation timed out #226

guohoo opened this issue Nov 15, 2020 · 8 comments
Labels

Comments

@guohoo
Copy link

guohoo commented Nov 15, 2020

Bug 描述
部署完无法访问,显示的是nginx的错误页,Docker的日志全是Operation timed out

你谷歌/百度了吗?
看到#114这个issue也有类似问题,但是我把防火墙关了还是这样

部署方法

  • Docker-compose
  • 使用的镜像版本 : latest

部署环境

  • 操作系统: CentOS8

错误日志
当错误发生时,通过终端执行 docker logs ttrss --tail 5 获取日志,并将相关错误日志粘贴于此处。

ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out

docker-compose logs --tail 100输出

Attaching to postgres, opencc, mercury, ttrss
postgres             | The files belonging to this database system will be owned by user "postgres".
postgres             | This user must also own the server process.
postgres             |
postgres             | The database cluster will be initialized with locale "en_US.utf8".
postgres             | The default database encoding has accordingly been set to "UTF8".
postgres             | The default text search configuration will be set to "english".
postgres             |
postgres             | Data page checksums are disabled.
postgres             |
postgres             | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres             | creating subdirectories ... ok
postgres             | selecting dynamic shared memory implementation ... posix
postgres             | selecting default max_connections ... 100
postgres             | selecting default shared_buffers ... 128MB
postgres             | selecting default time zone ... UTC
postgres             | creating configuration files ... ok
postgres             | running bootstrap script ... ok
postgres             | sh: locale: not found
postgres             | 2020-11-08 07:52:56.450 UTC [30] WARNING:  no usable system locales were found
postgres             | performing post-bootstrap initialization ... ok
postgres             | syncing data to disk ... ok
postgres             |
postgres             | initdb: warning: enabling "trust" authentication for local connections
postgres             | You can change this by editing pg_hba.conf or using the option -A, or
postgres             | --auth-local and --auth-host, the next time you run initdb.
postgres             |
postgres             | Success. You can now start the database server using:
postgres             |
postgres             |     pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres             |
postgres             | waiting for server to start....2020-11-08 07:52:58.361 UTC [35] LOG:  starting PostgreSQL 13.0 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
postgres             | 2020-11-08 07:52:58.372 UTC [35] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres             | 2020-11-08 07:52:58.396 UTC [36] LOG:  database system was shut down at 2020-11-08 07:52:57 UTC
postgres             | 2020-11-08 07:52:58.402 UTC [35] LOG:  database system is ready to accept connections
postgres             |  done
postgres             | server started
postgres             |
postgres             | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
postgres             |
postgres             | waiting for server to shut down....2020-11-08 07:52:58.414 UTC [35] LOG:  received fast shutdown request
postgres             | 2020-11-08 07:52:58.417 UTC [35] LOG:  aborting any active transactions
postgres             | 2020-11-08 07:52:58.418 UTC [35] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
postgres             | 2020-11-08 07:52:58.419 UTC [37] LOG:  shutting down
postgres             | 2020-11-08 07:52:58.444 UTC [35] LOG:  database system is shut down
postgres             |  done
postgres             | server stopped
postgres             |
postgres             | PostgreSQL init process complete; ready for start up.
postgres             |
postgres             | 2020-11-08 07:52:58.540 UTC [1] LOG:  starting PostgreSQL 13.0 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
postgres             | 2020-11-08 07:52:58.541 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres             | 2020-11-08 07:52:58.541 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres             | 2020-11-08 07:52:58.550 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres             | 2020-11-08 07:52:58.558 UTC [44] LOG:  database system was shut down at 2020-11-08 07:52:58 UTC
postgres             | 2020-11-08 07:52:58.563 UTC [1] LOG:  database system is ready to accept connections
opencc               |
opencc               | > [email protected] start /usr/src/app
opencc               | > node ./bin/www
opencc               |
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out
ttrss                | Operation timed out

nginxerror.log

2020/11/15 22:18:18 [error] 581974#0: *72 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: unix:, server: mydomain, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:181/", host: "mydomain"
2020/11/15 22:18:18 [error] 581974#0: *72 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: unix:, server: mydomain, request: "GET /nginx-logo.png HTTP/1.1", upstream: "http://127.0.0.1:181/nginx-logo.png", host: "mydomain", referrer: "mydomain"
2020/11/15 22:18:18 [error] 581974#0: *72 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: unix:, server: mydomain, request: "GET /poweredby.png HTTP/1.1", upstream: "http://127.0.0.1:181/poweredby.png", host: "mydomain", referrer: "mydomain"
2020/11/15 22:18:18 [error] 581974#0: *72 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: unix:, server: mydomain, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:181/favicon.ico", host: "mydomain", referrer: "mydomain"

其他
服务器上环境比较特殊,使用了V2ray监听443端口,网站流量回落给nginx处理。试过在nginx上配置反向代理一些网站,没什么问题,但是反代到181端口就有了上面的情况,尚不清楚哪部分出错了。

PS: nginx的配置除了listen不一样,其他内容都是按照文档配置的。

@guohoo guohoo added the bug label Nov 15, 2020
@HenryQW
Copy link
Owner

HenryQW commented Nov 15, 2020

先撤掉v2ray试试看

@guohoo
Copy link
Author

guohoo commented Nov 16, 2020

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

@HenryQW
Copy link
Owner

HenryQW commented Nov 16, 2020

从来没用过centos,建议谷歌

@HenryQW HenryQW closed this as completed Nov 16, 2020
@fcs203
Copy link

fcs203 commented Aug 21, 2021

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

请问问题解决了吗

@guohoo
Copy link
Author

guohoo commented Aug 21, 2021

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

请问问题解决了吗

我这边是firewalld和docker有冲突,你可以试试官方文档的方法https://docs.docker.com/network/iptables/#integration-with-firewalld

@fcs203
Copy link

fcs203 commented Aug 21, 2021

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

请问问题解决了吗

我这边是firewalld和docker有冲突,你可以试试官方文档的方法https://docs.docker.com/network/iptables/#integration-with-firewalld

我这里应该也是有冲突,关掉firewalld就不会timed out了,但是官方文档的方法没有用。。

@guohoo
Copy link
Author

guohoo commented Aug 21, 2021

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

请问问题解决了吗

我这边是firewalld和docker有冲突,你可以试试官方文档的方法https://docs.docker.com/network/iptables/#integration-with-firewalld

我这里应该也是有冲突,关掉firewalld就不会timed out了,但是官方文档的方法没有用。。

我当时是开启masquerade解决了,其他就帮不到你了

firewall-cmd --zone=public --add-masquerade --permanent

@JupiterOdyssey
Copy link

先撤掉v2ray试试看

不好意思,之前排错不仔细,发现确实是防火墙问题,想请问一下应该如何放行呢?新手不是很明白,希望不吝赐教

请问问题解决了吗

我这边是firewalld和docker有冲突,你可以试试官方文档的方法https://docs.docker.com/network/iptables/#integration-with-firewalld

我这里应该也是有冲突,关掉firewalld就不会timed out了,但是官方文档的方法没有用。。

我当时是开启masquerade解决了,其他就帮不到你了

firewall-cmd --zone=public --add-masquerade --permanent

感谢,用你的方法,成功解决问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants