【问题标题】:Solution for no response on server服务器无响应的解决方法
【发布时间】:2018-04-11 01:51:16
【问题描述】:

所以最近我向数字海洋提出了一个问题,问题是这样的。 “我按照步骤设置 nginx ubuntu 我的 redis mongodb pm2 Web 应用程序似乎正在运行,但是当我点击我的 IP 地址时根本没有响应。我的应用程序没有收到对 IP 地址 [myipadddress] 的请求. 我检查了我是否也设置了 etc/nginx/sites-available,你能指出我哪里做错了吗?”

我也给他们发了我做的测试,我做的测试是这样的。

$ curl -x http://[my ip address]:80 --trace-ascii /tmp/dump.txt 
https://dl-ssl.google.com/linux/linux_signing_key.pub -o /tmp/key.pub
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:00 --:--:-- 0
curl: (56) Recv failure: Connection reset by peer
mycomputername ~/code/freelance/exmapleproj/exampleproj on EB-717- 
notification-backend[!?$]
$ cat /tmp/dump.txt
== Info: Trying [my ip address]...
== Info: TCP_NODELAY set
== Info: Connected to [my ip address] (my ip address) port 80 (#0)
== Info: Establish HTTP proxy tunnel to dl-ssl.google.com:443
=> Send header, 126 bytes (0x7e)
0000: CONNECT dl-ssl.google.com:443 HTTP/1.1
0028: Host: dl-ssl.google.com:443
0045: User-Agent: curl/7.54.0
005e: Proxy-Connection: Keep-Alive
007c:
== Info: Recv failure: Connection reset by peer
== Info: Received HTTP code 0 from proxy after CONNECT
== Info: Closing connection 0

【问题讨论】:

    标签: nginx ubuntu-16.04 ufw


    【解决方案1】:

    现在它可以工作了,通过允许 sudo ufw allow 80/tcp 和 sudo ufw allow 6379/tcp。有更好的答案吗?

    我还在同一张数字海洋门票中问了另一个问题。

    BUT how can i set my mongod and redis to listen to 0.0.0.0:27017 & 
    0.0.0.0:63719 instead of 
    
    tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 1368/mongod
    tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1362/redis-server 1
    
    AND 
    
    ALSO, how come the redis-server that i set up is not listening on tcp6         
    ?
    

    他们的回答是这样的:

    在这种情况下,这两个实例都基于可能采用默认值的配置,具体取决于安装包源。您可以在此处查看这些详细信息:

    https://docs.mongodb.com/manual/reference/configuration-options/#net-options

    https://redis.io/topics/config

    您需要确保实例支持并启用绑定到所有地址的配置,并且更新 localhost 的任何默认值。

    有人可以向我解释一下,并指出粗体和斜体声明的方向吗?另外,我仍然找不到让 redis 监听 tcp6 的文档。抱歉新设置服务器

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-17
      • 1970-01-01
      相关资源
      最近更新 更多