contrail-installer
contrail-installer copied to clipboard
api-server did not start
I am facing issue while installing Contrail 3.2. ./contrail.sh start step is failing with the error :
api-server did not start. Can anyone help me in resolving this error.
2017-05-05 14:13:49 ++ screen -S contrail -p ifmap -X stuff 'cd /opt/stack/contrail/build/packages/ifmap-server; java -jar ./irond.jar & echo $! >/home/controller/contr'il-installer/status/contrail/ifmap.pid; fg || echo "ifmap failed to start" | tee "/home/controller/contrail-installer/status/contrail/ifmap.failure" 2017-05-05 14:13:49 ++ [[ ifmap == \a\g\e\n\t ]] 2017-05-05 14:13:49 ++ sleep 2 2017-05-05 14:13:51 ++ RABBIT_OPTS='--rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 10.139.2.32' 2017-05-05 14:13:51 +++ which contrail-api 2017-05-05 14:13:51 ++ screen_it apiSrv '/usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 10.139.2.32' 2017-05-05 14:13:51 ++ SCREEN_NAME=contrail 2017-05-05 14:13:51 ++ SERVICE_DIR=/home/controller/contrail-installer/status 2017-05-05 14:13:51 +++ trueorfalse False True 2017-05-05 14:13:51 +++ local default=False 2017-05-05 14:13:51 +++ local testval=True 2017-05-05 14:13:51 +++ [[ -z True ]] 2017-05-05 14:13:51 +++ [[ 0 no No NO false False FALSE =~ True ]] 2017-05-05 14:13:51 +++ [[ 1 yes Yes YES true True TRUE =~ True ]] 2017-05-05 14:13:51 +++ echo True 2017-05-05 14:13:51 +++ return 2017-05-05 14:13:51 ++ USE_SCREEN=True 2017-05-05 14:13:51 ++ is_service_enabled apiSrv 2017-05-05 14:13:51 ++ services=apiSrv 2017-05-05 14:13:51 ++ for service in '${services}' 2017-05-05 14:13:51 ++ [[ ,named,dns,redis,cass,zk,ifmap,disco,apiSrv,schema,svc-mon,control,collector,analytics-api,query-engine,agent,redis-w,ui-jobs,ui-webs,kafka,alarm, =~ ,apiSrv, ]] 2017-05-05 14:13:51 ++ return 0 2017-05-05 14:13:51 ++ screen_rc apiSrv '/usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 10.139.2.32' 2017-05-05 14:13:51 ++ SCREEN_NAME=contrail 2017-05-05 14:13:51 ++ SCREENRC=/home/controller/contrail-installer/contrail-screenrc 2017-05-05 14:13:51 ++ [[ ! -e /home/controller/contrail-installer/contrail-screenrc ]] 2017-05-05 14:13:51 ++ grep apiSrv /home/controller/contrail-installer/contrail-screenrc 2017-05-05 14:13:51 ++ [[ True = \T\r\u\e ]] 2017-05-05 14:13:51 ++ screen -S contrail -X screen -t apiSrv 2017-05-05 14:13:51 ++ [[ -n /home/controller/contrail-installer/log/screens ]] 2017-05-05 14:13:51 ++ screen -S contrail -p apiSrv -X logfile /home/controller/contrail-installer/log/screens/screen-apiSrv.2017-05-05-141328.log 2017-05-05 14:13:51 ++ screen -S contrail -p apiSrv -X log on 2017-05-05 14:13:51 ++ ln -sf /home/controller/contrail-installer/log/screens/screen-apiSrv.2017-05-05-141328.log /home/controller/contrail-installer/log/screens/screen-apiSrv.log 2017-05-05 14:13:51 ++ sleep 1.5 2017-05-05 14:13:52 +++ echo -ne '\015' 2017-05-05 14:13:52 ++ NL=$'\r' 2017-05-05 14:13:52 Waiting for api-server to start... 2017-05-05 14:13:52 ++ screen -S contrail -p apiSrv -X stuff '/usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 10.139.2.32 & echo $! >/home/controller/contrail-installer/status/contrail/apiSrv.pid; fg || echo "apiSrv failed to st'rt" | tee "/home/controller/contrail-installer/status/contrail/apiSrv.failure" 2017-05-05 14:13:52 ++ [[ apiSrv == \a\g\e\n\t ]] 2017-05-05 14:13:52 ++ echo 'Waiting for api-server to start...' 2017-05-05 14:13:52 ++ timeout 180 sh -c 'while ! http_proxy= wget -q -O- http://10.139.2.32:8082; do sleep 1; done'
controller@controller:~/contrail-installer$ controller@controller:~/contrail-installer$ 2017-05-05 14:16:52 api-server did not start 2017-05-05 14:16:52 ++ echo 'api-server did not start'
Did anyone fix this issue. If yes, please help with the steps.
same problem here
I met the same problem in ubuntu 14.04 + opencontrail 3.2.2. below is the log of screen-apiSrv.log xhf@Contrail:~/contrail-installer$ /usr/bin/contrail-api --conf_file /etc/contra ^Mil/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_passwo ^Mrd contrail123 --rabbit_server 127.0.0.1 & echo $! >/home/xhf/contrail-installer ^M/status/contrail/apiSrv.pid; fg || echo "apiSrv failed to start" | tee "/home/xh ^Mf/contrail-installer/status/contrail/apiSrv.failure" [1] 6064 /usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 127.0.0.1 07/11/2017 02:02:52 PM [contrail-api]: SANDESH: CONNECT TO COLLECTOR: True INFO:contrail-api:SANDESH: CONNECT TO COLLECTOR: True 07/11/2017 02:02:52 PM [contrail-api]: SANDESH: Logging: LEVEL: [SYS_INFO] -> [SYS_NOTICE] INFO:contrail-api:SANDESH: Logging: LEVEL: [SYS_INFO] -> [SYS_NOTICE] WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: Connecting to ifmap on 127.0.0.1:8443 as api-server ERROR:contrail-api:Starting Introspect on HTTP Port 8084 ERROR:contrail-api:Cannot write http_port 8084 to /tmp/contrail-api.5942.http_port WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: IFMAP connection ESTABLISHED WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: Connecting to cassandra on ['127.0.0.1:9160'] WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: Cassandra connection ESTABLISHED WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: Connecting to zookeeper on 127.0.0.1 INFO:api-0:Connecting to 127.0.0.1:2181 INFO:api-0:Zookeeper connection established, state: CONNECTED WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: Initializing RabbitMQ connection, urls ['pyamqp://rabbitcontrail:[email protected]:5672/'] ERROR:contrail-api:No Connection: default [SYS_ERR]: VncApiError: RabbitMQ connection down WARNING:contrail-api:No Connection: default [SYS_NOTICE]: VncApiError: RabbitMQ connection ESTABLISHED <Connection: amqp://[email protected]:5672// at 0x7ffb024aa990> ERROR:contrail-api:Connect error to contrail api 100 tries: ERROR:contrail-api:Connect error to contrail api 200 tries: ERROR:contrail-api:Connect error to contrail api 300 tries: ERROR:contrail-api:Connect error to contrail api 400 tries: ERROR:contrail-api:Connect error to contrail api 500 tries: ERROR:contrail-api:Connect error to contrail api 600 tries: ERROR:contrail-api:Connect error to contrail api 700 tries: ERROR:contrail-api:Connect error to contrail api 800 tries: ERROR:contrail-api:Connect error to contrail api 900 tries: ERROR:contrail-api:Connect error to contrail api 1000 tries: ERROR:contrail-api:Connect error to contrail api 1100 tries:
I don't understand the following 2 lines error information, 8084 port is used by contrail-api itself, why it can not write? And I don't find the file contrail-api.5942.http_port under /tmp. ERROR:contrail-api:Starting Introspect on HTTP Port 8084 ERROR:contrail-api:Cannot write http_port 8084 to /tmp/contrail-api.5942.http_port
Another error line is: ERROR:contrail-api:No Connection: default [SYS_ERR]: VncApiError: RabbitMQ connection down I have checked the rabbitmq-server, the status is ok, I have restart the rabbitmq, but it didn't take effect.
Does anyone know this problem?
Thank you very much!
Same problem...
2017-07-20 03:45:32 ++ services=apiSrv 2017-07-20 03:45:32 Use -S to specify a session. 2017-07-20 03:45:32 ++ for service in '${services}' 2017-07-20 03:45:32 There are several suitable screens on: 2017-07-20 03:45:32 ++ [[ ,named,dns,redis,cass,zk,ifmap,disco,apiSrv,schema,svc-mon,control,collector,analytics-api,query-engine,agent,redis-w,ui-jobs,ui-webs,kafka,alarm, =~ ,apiSrv, ]] 2017-07-20 03:45:32 28264.contrail (07/20/17 03:45:21) (Detached) 2017-07-20 03:45:32 ++ return 0 2017-07-20 03:45:32 19783.contrail (07/20/17 00:01:56) (Attached) 2017-07-20 03:45:32 ++ screen_rc apiSrv '/usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 127.0.0.1' 2017-07-20 03:45:32 8125.contrail (07/19/17 23:38:54) (Detached) 2017-07-20 03:45:32 ++ SCREEN_NAME=contrail 2017-07-20 03:45:32 5869.contrail (07/19/17 23:18:59) (Detached) 2017-07-20 03:45:32 ++ SCREENRC=/home/ubuntu/contrail-installer/contrail-screenrc 2017-07-20 03:45:32 2507.contrail (07/19/17 22:33:58) (Detached) 2017-07-20 03:45:32 ++ [[ ! -e /home/ubuntu/contrail-installer/contrail-screenrc ]] 2017-07-20 03:45:32 123414.contrail (07/19/17 17:42:17) (Detached) 2017-07-20 03:45:32 ++ grep apiSrv /home/ubuntu/contrail-installer/contrail-screenrc 2017-07-20 03:45:32 113313.contrail (07/19/17 17:36:08) (Detached) 2017-07-20 03:45:32 ++ [[ True = \T\r\u\e ]] 2017-07-20 03:45:32 88346.contrail (07/19/17 03:31:10) (Detached) 2017-07-20 03:45:32 ++ screen -S contrail -X screen -t apiSrv 2017-07-20 03:45:32 86286.contrail (07/19/17 03:26:50) (Detached) 2017-07-20 03:45:32 ++ [[ -n /home/ubuntu/contrail-installer/log/screens ]] 2017-07-20 03:45:32 3028.contrail-installer (07/18/17 23:24:39) (Attached) 2017-07-20 03:45:32 ++ screen -S contrail -p apiSrv -X logfile /home/ubuntu/contrail-installer/log/screens/screen-apiSrv.2017-07-20-034521.log 2017-07-20 03:45:32 Use -S to specify a session. 2017-07-20 03:45:32 ++ screen -S contrail -p apiSrv -X log on 2017-07-20 03:45:32 There are several suitable screens on: 2017-07-20 03:45:32 ++ ln -sf /home/ubuntu/contrail-installer/log/screens/screen-apiSrv.2017-07-20-034521.log /home/ubuntu/contrail-installer/log/screens/screen-apiSrv.log 2017-07-20 03:45:32 28264.contrail (07/20/17 03:45:21) (Detached) 2017-07-20 03:45:32 ++ sleep 1.5 2017-07-20 03:45:32 19783.contrail (07/20/17 00:01:56) (Attached) 2017-07-20 03:45:32 8125.contrail (07/19/17 23:38:54) (Detached) 2017-07-20 03:45:32 5869.contrail (07/19/17 23:18:59) (Detached) 2017-07-20 03:45:32 2507.contrail (07/19/17 22:33:58) (Detached) 2017-07-20 03:45:32 123414.contrail (07/19/17 17:42:17) (Detached) 2017-07-20 03:45:32 113313.contrail (07/19/17 17:36:08) (Detached) 2017-07-20 03:45:32 88346.contrail (07/19/17 03:31:10) (Detached) 2017-07-20 03:45:32 86286.contrail (07/19/17 03:26:50) (Detached) 2017-07-20 03:45:32 3028.contrail-installer (07/18/17 23:24:39) (Attached) 2017-07-20 03:45:32 Use -S to specify a session. 2017-07-20 03:45:33 +++ echo -ne '\015' 2017-07-20 03:45:33 ++ NL=$'\r' 2017-07-20 03:45:33 There are several suitable screens on: 2017-07-20 03:45:33 ++ screen -S contrail -p apiSrv -X stuff '/usr/bin/contrail-api --conf_file /etc/contrail/contrail-api.conf --reset_config --rabbit_user rabbitcontrail --rabbit_password contrail123 --rabbit_server 127.0.0.1 & echo $! >/home/ubuntu/contrail-installer'status/contrail/apiSrv.pid; fg || echo "apiSrv failed to start" | tee "/home/ubuntu/contrail-installer/status/contrail/apiSrv.failure" 2017-07-20 03:45:33 28264.contrail (07/20/17 03:45:20) (Detached) 2017-07-20 03:45:33 ++ [[ apiSrv == \a\g\e\n\t ]] 2017-07-20 03:45:33 19783.contrail (07/20/17 00:01:55) (Attached) 2017-07-20 03:45:33 ++ echo 'Waiting for api-server to start...' 2017-07-20 03:45:33 8125.contrail (07/19/17 23:38:53) (Detached) 2017-07-20 03:45:33 ++ timeout 180 sh -c 'while ! http_proxy= wget -q -O- http://localhost:8082; do sleep 1; done' 2017-07-20 03:45:33 5869.contrail (07/19/17 23:18:58) (Detached) 2017-07-20 03:45:33 2507.contrail (07/19/17 22:33:57) (Detached) 2017-07-20 03:45:33 123414.contrail (07/19/17 17:42:16) (Detached) 2017-07-20 03:45:33 113313.contrail (07/19/17 17:36:07) (Detached) 2017-07-20 03:45:33 88346.contrail (07/19/17 03:31:09) (Detached) 2017-07-20 03:45:33 86286.contrail (07/19/17 03:26:49) (Detached) 2017-07-20 03:45:33 3028.contrail-installer (07/18/17 23:24:38) (Attached) 2017-07-20 03:45:33 Use -S to specify a session. 2017-07-20 03:45:33 Waiting for api-server to start... ubuntu@ip-172-31-29-235:~/contrail-installer$ ubuntu@ip-172-31-29-235:~/contrail-installer$ ubuntu@ip-172-31-29-235:~/contrail-installer$ 2017-07-20 03:48:33 api-server did not start 2017-07-20 03:48:33 ++ echo 'api-server did not start' 2017-07-20 03:48:33 exited with status :1 2017-07-20 03:48:33 ++ exit 1 2017-07-20 03:48:33 ++ clean 2017-07-20 03:48:33 ++ local r=1 2017-07-20 03:48:33 ++ echo 'exited with status :1' 2017-07-20 03:48:33 ++ exit 1
Here is my experence: at the beginning, I deployed contrail with PPA package, I met this question, API server could not start, when I manually started contrail-discovery service, this step was passed, api-server could start and listen on port 8082. but there were still a lot of problems need to be solved.
Then I try to deploy with newest source, this time I didn't start contrail-discovery service(and it seemed no contrail-discovery service be deployed this time), then api-srv is ok.
But I don't know why, and I also wish to know why this time there is no discovery service be deployed? Will it affect the service?