質問編集履歴

2

コマンド結果追記

2020/01/09 22:34

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -95,3 +95,55 @@
95
95
  Jan 09 13:04:39 ip-10-0-10-10.ec2.internal systemd[1]: nginx.service failed.
96
96
 
97
97
  Hint: Some lines were ellipsized, use -l to show in full.
98
+
99
+
100
+
101
+
102
+
103
+ 追記2:コマンドの結果を記載しました。
104
+
105
+ コマンド1: $ sudo systemctl -l status nginx.service
106
+
107
+ 結果: nginx.service - The nginx HTTP and reverse proxy server
108
+
109
+ Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
110
+
111
+ Active: failed (Result: exit-code) since Thu 2020-01-09 22:30:15 UTC; 19s ago
112
+
113
+ Process: 1077 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
114
+
115
+ Process: 1074 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
116
+
117
+ Process: 1073 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
118
+
119
+
120
+
121
+ Jan 09 22:30:14 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
122
+
123
+ Jan 09 22:30:14 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
124
+
125
+ Jan 09 22:30:14 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
126
+
127
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
128
+
129
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
130
+
131
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal nginx[1077]: nginx: [emerg] still could not bind()
132
+
133
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal systemd[1]: nginx.service: control process exited, code=exited status=1
134
+
135
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
136
+
137
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal systemd[1]: Unit nginx.service entered failed state.
138
+
139
+ Jan 09 22:30:15 ip-10-0-10-10.ec2.internal systemd[1]: nginx.service failed.
140
+
141
+
142
+
143
+
144
+
145
+ コマンド2: $ sudo nginx -t
146
+
147
+ 結果: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
148
+
149
+ nginx: configuration file /etc/nginx/nginx.conf test is successful

1

ステータス出力

2020/01/09 22:34

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -51,3 +51,47 @@
51
51
  コマンド3:$ sudo /bin/systemctl start nginx.service
52
52
 
53
53
  結果:The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
54
+
55
+
56
+
57
+
58
+
59
+ 追記:参考のためステータスを出力しました
60
+
61
+ コマンド:$ sudo systemctl status nginx.service
62
+
63
+ 結果: nginx.service - The nginx HTTP and reverse proxy server
64
+
65
+ Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
66
+
67
+ Active: failed (Result: exit-code) since Thu 2020-01-09 13:04:39 UTC; 21s ago
68
+
69
+ Process: 31933 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
70
+
71
+ Process: 31929 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
72
+
73
+ Process: 31928 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
74
+
75
+
76
+
77
+ Jan 09 13:04:37 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] bind() to [::]...)
78
+
79
+ Jan 09 13:04:38 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] bind() to 0.0....)
80
+
81
+ Jan 09 13:04:38 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] bind() to [::]...)
82
+
83
+ Jan 09 13:04:38 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] bind() to 0.0....)
84
+
85
+ Jan 09 13:04:38 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] bind() to [::]...)
86
+
87
+ Jan 09 13:04:39 ip-10-0-10-10.ec2.internal nginx[31933]: nginx: [emerg] still could no...)
88
+
89
+ Jan 09 13:04:39 ip-10-0-10-10.ec2.internal systemd[1]: nginx.service: control process ...1
90
+
91
+ Jan 09 13:04:39 ip-10-0-10-10.ec2.internal systemd[1]: Failed to start The nginx HTTP ....
92
+
93
+ Jan 09 13:04:39 ip-10-0-10-10.ec2.internal systemd[1]: Unit nginx.service entered fail....
94
+
95
+ Jan 09 13:04:39 ip-10-0-10-10.ec2.internal systemd[1]: nginx.service failed.
96
+
97
+ Hint: Some lines were ellipsized, use -l to show in full.