g-api did not start while running stack.sh
Trying to setup devstack, and it is throwing this error:
+functions-common:_run_under_systemd:1481 sudo systemctl enable devstack@g-api.service
+functions-common:_run_under_systemd:1482 sudo systemctl start devstack@g-api.service
+functions-common:run_process:1512 time_stop run_process
+functions-common:time_stop:2254 local name
+functions-common:time_stop:2255 local end_time
+functions-common:time_stop:2256 local elapsed_time
+functions-common:time_stop:2257 local total
+functions-common:time_stop:2258 local start_time
+functions-common:time_stop:2260 name=run_process
+functions-common:time_stop:2261 start_time=1526969688542
+functions-common:time_stop:2263 [[ -z 1526969688542 ]]
++functions-common:time_stop:2266 date +%s%3N
+functions-common:time_stop:2266 end_time=1526969689805
+functions-common:time_stop:2267 elapsed_time=1263
+functions-common:time_stop:2268 total=3482
+functions-common:time_stop:2270 _TIME_START[$name]=
+functions-common:time_stop:2271 _TIME_TOTAL[$name]=4745
+lib/glance:start_glance:350 echo 'Waiting for g-api (135.207.223.61) to start...'
Waiting for g-api (135.207.223.61) to start...
+lib/glance:start_glance:351 wait_for_service 60 http://135.207.223.61/image
+functions:wait_for_service:428 local timeout=60
+functions:wait_for_service:429 local url=http://135.207.223.61/image
+functions:wait_for_service:430 local rval=0
+functions:wait_for_service:431 time_start wait_for_service
+functions-common:time_start:2240 local name=wait_for_service
+functions-common:time_start:2241 local start_time=
+functions-common:time_start:2242 [[ -n '' ]]
++functions-common:time_start:2245 date +%s%3N
+functions-common:time_start:2245 _TIME_START[$name]=1526969689916
+functions:wait_for_service:432 timeout 60 bash -x
++:: curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://135.207.223.61/image
+:: [[ 503 == 503 ]]
+:: sleep 1
++:: curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://135.207.223.61/image
+:: [[ 503 == 503 ]]
+:: sleep 1
.
.
. (a bunch of same lines and then some)
.
+functions-common:time_stop:2267 elapsed_time=60104
+functions-common:time_stop:2268 total=134
+functions-common:time_stop:2270 _TIME_START[$name]=
+functions-common:time_stop:2271 _TIME_TOTAL[$name]=60238
+functions:wait_for_service:438 return 124
+lib/glance:start_glance:352 die 352 'g-api did not start'
+functions-common:die:187 local exitcode=0
[Call Trace]
./stack.sh:1240:start_glance
/opt/stack/devstack/lib/glance:352:die
[ERROR] /opt/stack/devstack/lib/glance:352 g-api did not start
Error on exit
nova-compute(1716): Operation not permitted
neutron-openvswitch-agent(1724): Operation not permitted
neutron-openvswitch-agent: no process found
cinder-volume(1693): Operation not permitted
which tells me that glance-api service is not running. So I take the command in the second line (log above) and execute it manually: sudo systemctl start devstack@g-api.service
Then it runs and I can check status:
● devstack@g-api.service - Devstack devstack@g-api.service
Loaded: loaded (/etc/systemd/system/devstack@g-api.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-05-22 01:20:56 EDT; 1h 0min ago
Main PID: 11240 (uwsgi)
Status: "uWSGI is ready"
CGroup: /system.slice/system-devstack.slice/devstack@g-api.service
├─11240 glance-apiuWSGI maste
├─11242 glance-apiuWSGI worker
├─11243 glance-apiuWSGI worker
├─11244 glance-apiuWSGI worker
└─11245 glance-apiuWSGI worker
May 22 01:20:59 agave021 devstack@g-api.service[11240]: DEBUG glance.common.config [-] oslo_policy.remote_ssl_client_key_file = None {{(pid=11243) log_opt_values /usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py:2908}}
May 22 01:20:59 agave021 devstack@g-api.service[11240]: DEBUG glance.common.config [-] oslo_policy.remote_ssl_verify_server_crt = False {{(pid=11243) log_opt_values /usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py:2908}}
May ...
Strangely, ask.openstack.org occasionally puts old questions in my feed. This one is three months old.
To solve this problem, check the apache logs and the g-api log for the cause of 503. My guess: It’s a timing problem, possibly caused by a slow server. If so, there should be ways to increase timeouts.
I'm also getting the same issue. How to increase the timeout values ?
Try setting SERVICE_TIMEOUT in local.conf. It is defined in stackrc and used in lib/glance, lib/nova, lib/cinder etc.
Hi, I have increase the timeout for 300 seconds. But still the issue is same.