ModusCreateOrg / ModusCreateOrg/devops-infra-demo

Instance is showing errors in nginx error.log and `journalctl -f`

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Shell
Stars
34
Forks
19
PR merge metrics
No merged PRs in 30d

Description

We should not be seeing errors such as this in the nginx error log:

1
2019-07-30T11:58:54.452-04:00
2019/07/30 15:58:48 [error] 1223#1223: *3 open() "/usr/share/nginx/html/api/spin" failed (2: No such file or directory), client: 10.0.1.127, server: localhost, request: "GET /api/spin HTTP/1.1", host: "10.0.1.81"
@ingestionTime
1564502339490
@log
976851222302:nginx-error
@logStream
i-03a0b66f27af4afca
@message
2019/07/30 15:58:48 [error] 1223#1223: *3 open() "/usr/share/nginx/html/api/spin" failed (2: No such file or directory), client: 10.0.1.127, server: localhost, request: "GET /api/spin HTTP/1.1", host: "10.0.1.81"
@timestamp
1564502334452

Nor should we be seeing errors like this from Emperor when we do journalctl -f:

Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3641|app: 0|req: 31/127] 10.0.1.127 () {38 vars in 444 bytes} [Tue Jul 30 16:17:48 2019] GET /api/spin => generated 150 bytes in 70 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:17:49 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 86/128] 10.0.2.111 () {38 vars in 444 bytes} [Tue Jul 30 16:17:48 2019] GET /api/spin => generated 149 bytes in 808 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:00 ip-10-0-1-81.ec2.internal sudo[6351]:   centos : TTY=pts/0 ; PWD=/home/centos ; USER=root ; COMMAND=/bin/journalctl -f
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 87/129] 10.0.3.114 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 149 bytes in 74 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3669|app: 0|req: 1/130] 10.0.1.127 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 151 bytes in 99 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: announcing my loyalty to the Emperor...
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: Tue Jul 30 16:18:18 2019 - [emperor] vassal infra-demo.ini is now loyal
Jul 30 16:18:19 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 88/131] 10.0.2.111 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 149 bytes in 618 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)

Investigate the root cause and fix it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /api/spin request through the nginx error log and the Emperor/uWSGI messages shown in the issue, using journalctl -f to reproduce the behavior. Identify the cause of the missing-file and import errors, then verify that /api/spin returns successfully without those recurring errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, linux, nginx
Domain
backend, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.