Hi,
I have a deployed app at:
https://www.piperouter.com/
It refreshes continuously. So it is unusable.
cat /var/log/nginx/app.log gives:
105.13.225.231 - - [16/Mar/2017:15:42:42 +0000] "GET / HTTP/2.0" 200 1489 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:43 +0000] "GET / HTTP/2.0" 200 1489 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:46 +0000] "GET /sockjs/info?cb=xf84xly7tj HTTP/2.0" 200 321 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:46 +0000] "GET /favicon.png?v1 HTTP/2.0" 304 229 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:48 +0000] "GET / HTTP/2.0" 200 1489 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:48 +0000] "GET /sockjs/332/lfh51a7x/websocket HTTP/1.1" 101 518 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:50 +0000] "GET /sockjs/info?cb=7m6_8sq7p4 HTTP/2.0" 200 321 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:51 +0000] "GET / HTTP/2.0" 200 1489 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:51 +0000] "GET /sockjs/654/jcnz6f66/websocket HTTP/1.1" 101 514 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:52 +0000] "GET /sockjs/info?cb=yqbld_pjnh HTTP/2.0" 200 321 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:54 +0000] "GET / HTTP/2.0" 200 1489 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:54 +0000] "GET /sockjs/073/ozse00ph/websocket HTTP/1.1" 101 514 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:55 +0000] "GET /sockjs/info?cb=dxji6o05nr HTTP/2.0" 200 320 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:57 +0000] "GET / HTTP/2.0" 200 1489 "https://www.piperouter.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
105.13.225.231 - - [16/Mar/2017:15:42:57 +0000] "GET /sockjs/542/dn6m50s7/websocket HTTP/1.1" 101 513 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
My systemd env is:
NODE_ENV=production
MONGO_URL=mongodb://localhost:27017/TESTAPP_NAME
ROOT_URL=https://piperouter.com
PORT=8080
I think it has to do with mongo. On ubuntu 16.04, my mongod.service is
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target
I installed it like so:
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y mongodb-org
My /etc/mongod.conf is:
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
net:
port: 27017
bindIp: 127.0.0.1
My /etc/nginx/sites-enabled is pretty standard:
server_tokens off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen [::]:80;
listen 80;
server_name piperouter.com www.piperouter.com;
return 301 https://$server_name$request_uri;
}
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
access_log /var/log/nginx/piperouter.log;
error_log /var/log/nginx/piperouter.error.log error;
include snippets/ssl-piperouter.com.conf;
include snippets/ssl-params.conf;
server_name _;
location = /favicon.ico {
root /home/piperouter/bundle/programs/web.browser/app;
access_log off;
expires 1w;
}
location ~* "^/[a-z0-9]{40}\.(css|js)$" {
root /home/piperouter/bundle/programs/web.browser;
access_log off;
expires max;
}
location ~ "^/packages" {
root /home/piperouter/bundle/programs/web.browser;
access_log off;
}
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
}
Any ideas what might be causing the continuous refresh?