質問編集履歴
9
.sock
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
timeout 1200
|
24
24
|
|
25
|
-
listen File.expand_path 'tmp/sockets/
|
25
|
+
listen File.expand_path 'tmp/sockets/unicorn.sock', '/var/www/rails/myapp'
|
26
26
|
|
27
27
|
pid File.expand_path 'tmp/pids/unicorn.pid', '/var/www/rails/myapp'
|
28
28
|
|
8
myapp
test
CHANGED
File without changes
|
test
CHANGED
@@ -248,7 +248,7 @@
|
|
248
248
|
|
249
249
|
|
250
250
|
|
251
|
-
$ unicorn_rails -c /var/www/rails/
|
251
|
+
$ unicorn_rails -c /var/www/rails/myapp/config/unicorn.conf.rb -D -E production
|
252
252
|
|
253
253
|
を流しながら出したログです
|
254
254
|
|
7
u
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
|
78
78
|
|
79
|
-
ser nginx;
|
79
|
+
user nginx;
|
80
80
|
|
81
81
|
worker_processes auto;
|
82
82
|
|
6
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -243,3 +243,103 @@
|
|
243
243
|
- unicornのバージョンが5.5.1だったので、5.4.1に落としました
|
244
244
|
|
245
245
|
- ソケットファイルが.unicorn.sockだったので、unicorn.sockに修正しました
|
246
|
+
|
247
|
+
## 追記
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
$ unicorn_rails -c /var/www/rails/uchino_torisetsu/config/unicorn.conf.rb -D -E production
|
252
|
+
|
253
|
+
を流しながら出したログです
|
254
|
+
|
255
|
+
```
|
256
|
+
|
257
|
+
I, [2019-11-16T14:15:45.889685 #14254] INFO -- : Refreshing Gem list
|
258
|
+
|
259
|
+
/home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fog-core-2.1.2/lib/fog/core/service.rb:244:in `validate_options': Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError)
|
260
|
+
|
261
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fog-core-2.1.2/lib/fog/core/service.rb:268:in `handle_settings'
|
262
|
+
|
263
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fog-core-2.1.2/lib/fog/core/service.rb:98:in `new'
|
264
|
+
|
265
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fog-core-2.1.2/lib/fog/core/services_mixin.rb:16:in `new'
|
266
|
+
|
267
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/carrierwave-2.0.2/lib/carrierwave/storage/fog.rb:68:in `eager_load'
|
268
|
+
|
269
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/carrierwave-2.0.2/lib/carrierwave.rb:77:in `block in <class:Railtie>'
|
270
|
+
|
271
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
|
272
|
+
|
273
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
|
274
|
+
|
275
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
|
276
|
+
|
277
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
|
278
|
+
|
279
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
|
280
|
+
|
281
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
|
282
|
+
|
283
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/application/finisher.rb:118:in `block in <module:Finisher>'
|
284
|
+
|
285
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/initializable.rb:32:in `instance_exec'
|
286
|
+
|
287
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/initializable.rb:32:in `run'
|
288
|
+
|
289
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/initializable.rb:61:in `block in run_initializers'
|
290
|
+
|
291
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
|
292
|
+
|
293
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
|
294
|
+
|
295
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
|
296
|
+
|
297
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
|
298
|
+
|
299
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
|
300
|
+
|
301
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
|
302
|
+
|
303
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
|
304
|
+
|
305
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
|
306
|
+
|
307
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
|
308
|
+
|
309
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/initializable.rb:60:in `run_initializers'
|
310
|
+
|
311
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/application.rb:363:in `initialize!'
|
312
|
+
|
313
|
+
from /var/www/rails/appname/config/environment.rb:5:in `<top (required)>'
|
314
|
+
|
315
|
+
from config.ru:4:in `require_relative'
|
316
|
+
|
317
|
+
from config.ru:4:in `block in <main>'
|
318
|
+
|
319
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
|
320
|
+
|
321
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
|
322
|
+
|
323
|
+
from config.ru:1:in `new'
|
324
|
+
|
325
|
+
from config.ru:1:in `<main>'
|
326
|
+
|
327
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `eval'
|
328
|
+
|
329
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `block in builder'
|
330
|
+
|
331
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:139:in `block in rails_builder'
|
332
|
+
|
333
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:795:in `build_app!'
|
334
|
+
|
335
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:139:in `start'
|
336
|
+
|
337
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:209:in `<top (required)>'
|
338
|
+
|
339
|
+
from /home/myname/.rbenv/versions/2.6.3/bin/unicorn_rails:23:in `load'
|
340
|
+
|
341
|
+
from /home/myname/.rbenv/versions/2.6.3/bin/unicorn_rails:23:in `<main>'
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
```
|
5
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -243,33 +243,3 @@
|
|
243
243
|
- unicornのバージョンが5.5.1だったので、5.4.1に落としました
|
244
244
|
|
245
245
|
- ソケットファイルが.unicorn.sockだったので、unicorn.sockに修正しました
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
## 追記
|
250
|
-
|
251
|
-
```
|
252
|
-
|
253
|
-
$ systemctl status nginx
|
254
|
-
|
255
|
-
● nginx.service - The nginx HTTP and reverse proxy server
|
256
|
-
|
257
|
-
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
|
258
|
-
|
259
|
-
Active: active (running) since 土 2019-11-16 11:20:28 UTC; 2h 50min ago
|
260
|
-
|
261
|
-
Process: 2479 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
|
262
|
-
|
263
|
-
Process: 2476 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
|
264
|
-
|
265
|
-
Process: 2475 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
|
266
|
-
|
267
|
-
Main PID: 2482 (nginx)
|
268
|
-
|
269
|
-
CGroup: /system.slice/nginx.service
|
270
|
-
|
271
|
-
├─2482 nginx: master process /usr/sbin/nginx
|
272
|
-
|
273
|
-
└─8241 nginx: worker process
|
274
|
-
|
275
|
-
```
|
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -243,3 +243,33 @@
|
|
243
243
|
- unicornのバージョンが5.5.1だったので、5.4.1に落としました
|
244
244
|
|
245
245
|
- ソケットファイルが.unicorn.sockだったので、unicorn.sockに修正しました
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
## 追記
|
250
|
+
|
251
|
+
```
|
252
|
+
|
253
|
+
$ systemctl status nginx
|
254
|
+
|
255
|
+
● nginx.service - The nginx HTTP and reverse proxy server
|
256
|
+
|
257
|
+
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
|
258
|
+
|
259
|
+
Active: active (running) since 土 2019-11-16 11:20:28 UTC; 2h 50min ago
|
260
|
+
|
261
|
+
Process: 2479 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
|
262
|
+
|
263
|
+
Process: 2476 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
|
264
|
+
|
265
|
+
Process: 2475 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
|
266
|
+
|
267
|
+
Main PID: 2482 (nginx)
|
268
|
+
|
269
|
+
CGroup: /system.slice/nginx.service
|
270
|
+
|
271
|
+
├─2482 nginx: master process /usr/sbin/nginx
|
272
|
+
|
273
|
+
└─8241 nginx: worker process
|
274
|
+
|
275
|
+
```
|
3
code
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,143 +14,195 @@
|
|
14
14
|
|
15
15
|
```
|
16
16
|
|
17
|
-
#unicorn.rb
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
s
|
42
|
-
|
43
|
-
std
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
li
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
#cd /e
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
e
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
# max body size
|
100
|
-
|
101
|
-
client_max_body_size 2G;
|
102
|
-
|
103
|
-
upstream app_server {
|
104
|
-
|
105
|
-
# for UNIX domain socket setups
|
106
|
-
|
107
|
-
server unix:/var/www/rails/myappname/tmp/sockets/unicorn.sock fail_timeout=0;
|
17
|
+
#myapp/config/unicorn.conf.rb
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
worker_processes 3
|
22
|
+
|
23
|
+
timeout 1200
|
24
|
+
|
25
|
+
listen File.expand_path 'tmp/sockets/.unicorn.sock', '/var/www/rails/myapp'
|
26
|
+
|
27
|
+
pid File.expand_path 'tmp/pids/unicorn.pid', '/var/www/rails/myapp'
|
28
|
+
|
29
|
+
stderr_path File.expand_path('unicorn.log', File.dirname(__FILE__) + '/../log')
|
30
|
+
|
31
|
+
stdout_path File.expand_path('unicorn.log', File.dirname(__FILE__) + '/../log')
|
32
|
+
|
33
|
+
preload_app true
|
34
|
+
|
35
|
+
working_directory '/var/www/rails/myapp'
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
# before starting processes
|
40
|
+
|
41
|
+
before_fork do |server, worker|
|
42
|
+
|
43
|
+
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
|
44
|
+
|
45
|
+
old_pid = "#{server.config[:pid]}.oldbin"
|
46
|
+
|
47
|
+
if old_pid != server.pid
|
48
|
+
|
49
|
+
begin
|
50
|
+
|
51
|
+
Process.kill "QUIT", File.read(old_pid).to_i
|
52
|
+
|
53
|
+
rescue Errno::ENOENT, Errno::ESRCH
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
# after finishing processes
|
62
|
+
|
63
|
+
after_fork do |server, worker|
|
64
|
+
|
65
|
+
defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
#cd /etc/nginx/nginx.conf
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
ser nginx;
|
80
|
+
|
81
|
+
worker_processes auto;
|
82
|
+
|
83
|
+
error_log /var/log/nginx/error.log;
|
84
|
+
|
85
|
+
pid /run/nginx.pid;
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
|
90
|
+
|
91
|
+
include /usr/share/nginx/modules/*.conf;
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
events {
|
96
|
+
|
97
|
+
worker_connections 1024;
|
108
98
|
|
109
99
|
}
|
110
100
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
ser
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
p
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
roo
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
101
|
+
|
102
|
+
|
103
|
+
http {
|
104
|
+
|
105
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
106
|
+
|
107
|
+
'$status $body_bytes_sent "$http_referer" '
|
108
|
+
|
109
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
access_log /var/log/nginx/access.log main;
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
sendfile on;
|
118
|
+
|
119
|
+
tcp_nopush on;
|
120
|
+
|
121
|
+
tcp_nodelay on;
|
122
|
+
|
123
|
+
keepalive_timeout 65;
|
124
|
+
|
125
|
+
types_hash_max_size 2048;
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
include /etc/nginx/mime.types;
|
130
|
+
|
131
|
+
default_type application/octet-stream;
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
136
|
+
|
137
|
+
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
138
|
+
|
139
|
+
# for more information.
|
140
|
+
|
141
|
+
include /etc/nginx/conf.d/*.conf;
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
upstream unicorn {
|
146
|
+
|
147
|
+
server unix:/var/www/rails/myapp/tmp/sockets/unicorn.sock;
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
server {
|
154
|
+
|
155
|
+
listen 80;
|
156
|
+
|
157
|
+
server_name IP;
|
158
|
+
|
159
|
+
root /var/www/rails/myapp/public;
|
160
|
+
|
161
|
+
try_files $uri/index.html $uri @unicorn;
|
162
|
+
|
163
|
+
proxy_buffer_size 32k;
|
164
|
+
|
165
|
+
proxy_buffers 50 32k;
|
166
|
+
|
167
|
+
proxy_busy_buffers_size 32k;
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
# Load configuration files for the default server block.
|
172
|
+
|
173
|
+
include /etc/nginx/default.d/*.conf;
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
error_page 404 /404.html;
|
178
|
+
|
179
|
+
location = /40x.html {
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
error_page 500 502 503 504 /50x.html;
|
186
|
+
|
187
|
+
location = /500.html {
|
188
|
+
|
189
|
+
root /var/www/rails/myapp/public;
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
location @unicorn {
|
196
|
+
|
197
|
+
proxy_set_header X-Real-IP $remote_addr;
|
198
|
+
|
199
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
}
|
204
|
+
|
205
|
+
|
154
206
|
|
155
207
|
```
|
156
208
|
|
@@ -158,33 +210,31 @@
|
|
158
210
|
|
159
211
|
```
|
160
212
|
|
161
|
-
$ unicorn_rails -c /var/www/rails/
|
213
|
+
$ unicorn_rails -c /var/www/rails/appname/config/unicorn.conf.rb -D -E production
|
162
214
|
|
163
215
|
master failed to start, check stderr log for details
|
164
216
|
|
165
|
-
|
166
|
-
|
167
|
-
$ sudo tail log/unicorn.log
|
217
|
+
$ sudo tail /var/www/rails/appname/log/unicorn.log
|
168
|
-
|
218
|
+
|
169
|
-
|
219
|
+
from config.ru:1:in `new'
|
170
|
-
|
220
|
+
|
171
|
-
|
221
|
+
from config.ru:1:in `<main>'
|
172
|
-
|
222
|
+
|
173
|
-
|
223
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `eval'
|
174
|
-
|
224
|
+
|
175
|
-
|
225
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `block in builder'
|
176
|
-
|
226
|
+
|
177
|
-
|
227
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:139:in `block in rails_builder'
|
178
|
-
|
228
|
+
|
179
|
-
|
229
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:795:in `build_app!'
|
180
|
-
|
230
|
+
|
181
|
-
|
231
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:139:in `start'
|
182
|
-
|
232
|
+
|
183
|
-
|
233
|
+
from /home/myname/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:209:in `<top (required)>'
|
184
|
-
|
234
|
+
|
185
|
-
|
235
|
+
from /home/myname/.rbenv/versions/2.6.3/bin/unicorn_rails:23:in `load'
|
186
|
-
|
236
|
+
|
187
|
-
|
237
|
+
from /home/myname/.rbenv/versions/2.6.3/bin/unicorn_rails:23:in `<main>'
|
188
238
|
|
189
239
|
```
|
190
240
|
|
2
やったこと追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
unicornの起動ができ
|
1
|
+
unicornの起動ができません。(EC2×Nginx×Unicorn)
|
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
$app_dir = "/var/www/rails/myappname"
|
28
28
|
|
29
|
-
$listen = File.expand_path 'tmp/sockets/
|
29
|
+
$listen = File.expand_path 'tmp/sockets/unicorn.sock', $app_dir
|
30
30
|
|
31
31
|
$pid = File.expand_path 'tmp/pids/unicorn.pid', $app_dir
|
32
32
|
|
@@ -104,7 +104,7 @@
|
|
104
104
|
|
105
105
|
# for UNIX domain socket setups
|
106
106
|
|
107
|
-
server unix:/var/www/rails/myappname/tmp/sockets/
|
107
|
+
server unix:/var/www/rails/myappname/tmp/sockets/unicorn.sock fail_timeout=0;
|
108
108
|
|
109
109
|
}
|
110
110
|
|
@@ -191,3 +191,5 @@
|
|
191
191
|
## やったこと
|
192
192
|
|
193
193
|
- unicornのバージョンが5.5.1だったので、5.4.1に落としました
|
194
|
+
|
195
|
+
- ソケットファイルが.unicorn.sockだったので、unicorn.sockに修正しました
|
1
IP修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
listen 80;
|
114
114
|
|
115
|
-
server_name
|
115
|
+
server_name IP;
|
116
116
|
|
117
117
|
# nginx so increasing this is generally safe...
|
118
118
|
|