質問編集履歴
1
情報の修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Herokuデプロイで503エラーが出る
|
test
CHANGED
@@ -1,179 +1,9 @@
|
|
1
|
-
DjangoアプリをHerokuにデプロイできないです。
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
https://djangogirlsjapan.gitbooks.io/workshop_tutorialjp/deploy/
|
6
|
-
|
7
|
-
のサイトの手順にしたがってHerokuアプリをuploadしようとしています。
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
```ここに言語を入力
|
12
|
-
|
13
|
-
git push heroku master
|
14
|
-
|
15
|
-
```
|
16
|
-
|
17
|
-
と
|
18
|
-
|
19
|
-
```ここに言語を入力
|
20
|
-
|
21
|
-
heroku ps:scale web=1
|
22
|
-
|
23
|
-
```
|
24
|
-
|
25
|
-
と
|
26
|
-
|
27
|
-
```ここに言語を入力
|
28
|
-
|
29
|
-
|
1
|
+
Herokuデプロイで
|
30
|
-
|
31
|
-
```
|
32
|
-
|
33
|
-
はうまくいったのですが、僕のアプリケーションのページであるhttps://xxxxxxxxx.herokuapp.com
|
34
|
-
|
35
|
-
に行った時、
|
36
|
-
|
37
|
-
```ここに言語を入力
|
38
|
-
|
39
|
-
Application error
|
40
|
-
|
41
|
-
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
|
42
|
-
|
43
|
-
```
|
44
|
-
|
45
|
-
というエラーが出ました。
|
46
|
-
|
47
|
-
```ここに言語を入力
|
48
|
-
|
49
|
-
heroku logs
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
|
-
コマンドを打った時、
|
54
2
|
|
55
3
|
```ここに言語を入力
|
56
4
|
|
57
5
|
2018-06-24T08:55:18.004452+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=xxxxxxxxx.herokuapp.com request_id=2e6dfc7f-9685-4732-a51f-7d35d12cc103 fwd="xxxxxxxxx" dyno= connect= service= status=503 bytes= protocol=https
|
58
6
|
|
59
|
-
2018-06-24T08:56:21.396018+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=xxxxxxxxx.herokuapp.com request_id=f9229ca1-5e28-451a-91c3-7ad062d4a4fe fwd="xxxxxxxxx" dyno= connect= service= status=503 bytes= protocol=https
|
60
|
-
|
61
|
-
2018-06-24T08:56:22.816116+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/admin" host=xxxxxxxxx.herokuapp.com request_id=5be36c68-2873-4399-808b-fe7b4ada8fca fwd="xxxxxxxxx" dyno= connect= service= status=503 bytes= protocol=https
|
62
|
-
|
63
|
-
2018-06-24T08:56:24.026167+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/admin" host=xxxxxxxxx.herokuapp.com request_id=c907049a-b0c8-4c1f-bd27-81344c1850d4 fwd="xxxxxxxxx" dyno= connect= service= status=503 bytes= protocol=https
|
64
|
-
|
65
|
-
2018-06-24T08:56:27.210655+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/admin/" host=xxxxxxxxx.herokuapp.com request_id=694e7487-749f-45b1-bb34-b131485546da fwd="xxxxxxxxx" dyno= connect= service= status=503 bytes= protocol=https
|
66
|
-
|
67
|
-
2018-06-24T08:56:36.931801+00:00 app[api]: Scaled to web@0:Free by user xxxxxxxxxxxxxxxxxx@gmail.com
|
68
|
-
|
69
|
-
2018-06-24T08:56:37.066921+00:00 heroku[web.1]: State changed from crashed to down
|
70
|
-
|
71
7
|
```
|
72
8
|
|
73
|
-
が出ました。
|
74
|
-
|
75
|
-
なぜ503エラーが出てページにアクセスできないのでしょうか?
|
76
|
-
|
77
|
-
|
9
|
+
のように503エラーが出ます。
|
78
|
-
|
79
|
-
```ここに言語を入力
|
80
|
-
|
81
|
-
DEBUG = False
|
82
|
-
|
83
|
-
```
|
84
|
-
|
85
|
-
をTrueにしても同様のエラーが出てアクセスできず・・・。wsgi.pyには
|
86
|
-
|
87
|
-
```ここに言語を入力
|
88
|
-
|
89
|
-
import os
|
90
|
-
|
91
|
-
from whitenoise.django import DjangoWhiteNoise
|
92
|
-
|
93
|
-
from django.core.wsgi import get_wsgi_application
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todo.settings")
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
application = get_wsgi_application()
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
application = DjangoWhiteNoise(application)
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
```
|
110
|
-
|
111
|
-
と書きました。
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
App というアプリケーション名にしてありますが、
|
116
|
-
|
117
|
-
Appディレクトリの直下で
|
118
|
-
|
119
|
-
```ここに言語を入力
|
120
|
-
|
121
|
-
python manage.py collectstatic
|
122
|
-
|
123
|
-
```
|
124
|
-
|
125
|
-
とうつと、
|
126
|
-
|
127
|
-
```ここに言語を入力
|
128
|
-
|
129
|
-
Traceback (most recent call last):
|
130
|
-
|
131
|
-
File "manage.py", line 15, in <module>
|
132
|
-
|
133
|
-
execute_from_command_line(sys.argv)
|
134
|
-
|
135
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
|
136
|
-
|
137
|
-
utility.execute()
|
138
|
-
|
139
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
|
140
|
-
|
141
|
-
self.fetch_command(subcommand).run_from_argv(self.argv)
|
142
|
-
|
143
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
|
144
|
-
|
145
|
-
self.execute(*args, **cmd_options)
|
146
|
-
|
147
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
|
148
|
-
|
149
|
-
output = self.handle(*args, **options)
|
150
|
-
|
151
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 189, in handle
|
152
|
-
|
153
|
-
collected = self.collect()
|
154
|
-
|
155
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 105, in collect
|
156
|
-
|
157
|
-
for path, storage in finder.list(self.ignore_patterns):
|
158
|
-
|
159
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/contrib/staticfiles/finders.py", line 125, in list
|
160
|
-
|
161
|
-
for path in utils.get_files(storage, ignore_patterns):
|
162
|
-
|
163
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/contrib/staticfiles/utils.py", line 28, in get_files
|
164
|
-
|
165
|
-
directories, files = storage.listdir(location)
|
166
|
-
|
167
|
-
File "/Users/xxxx/test/lib/python3.6/site-packages/django/core/files/storage.py", line 313, in listdir
|
168
|
-
|
169
|
-
for entry in os.listdir(path):
|
170
|
-
|
171
|
-
FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxxx/Downloads/2018/App/static'
|
172
|
-
|
173
|
-
```
|
174
|
-
|
175
|
-
と出ました。
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
どう修正したらいいのでしょうか?
|