{"id":5869,"date":"2018-11-04T01:57:49","date_gmt":"2018-11-04T01:57:49","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=5869"},"modified":"2018-11-04T01:57:49","modified_gmt":"2018-11-04T01:57:49","slug":"fixing-vespa-error-curl-7-failed-connect-1-cannot-assign-requested-address","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-vespa-error-curl-7-failed-connect-1-cannot-assign-requested-address\/","title":{"rendered":"Fixing Vespa error: curl: (7) Failed to connect to ::1: Cannot assign requested address"},"content":{"rendered":"<p>If you try to script starting up Vespa, you can get an error like this:<\/p>\n<pre>\n++ set -e\n+++ docker ps --filter name=findlectures_vespa -q\n++ CID=\n++ '[' '!' -z ']'\n+++ pwd\n++ docker run -m 10G --detach --name findlectures_vespa --hostname findlectures --rm --privileged --volume \/projects\/findlectures-vespa\/app:\/app --publish 8080:8080 --publish 19112:19112 vespaengine\/vespa\nWARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.\n6fec2e4219294fe18fd5a8f5cf2390339b209f76f293ec3bb854129b3f578550\n++ .\/wait-for-it.sh -t 120 localhost:8080 -- .\/load.sh\nwait-for-it.sh: waiting 120 seconds for localhost:8080\nwait-for-it.sh: localhost:8080 is available after 0 seconds\n++ set -e\n++ docker exec findlectures_vespa bash -c '\/opt\/vespa\/bin\/vespa-deploy prepare \/app\/application && \\\n    \/opt\/vespa\/bin\/vespa-deploy activate'\nUploading application '\/app\/application' using http:\/\/localhost:19071\/application\/v2\/tenant\/default\/session?name=application\ncurl: (7) Failed to connect to ::1: Cannot assign requested address\nHTTP request failed. Could not connect to http:\/\/localhost:19071\n<\/pre>\n<p>This indicates that you&#8217;ve tried running commands against Vespa before it&#8217;s ready. You can fix this by polling for it to start:<\/p>\n<pre lang=\"bash\">\nuntil docker exec findlectures_vespa bash -c 'curl -s --head http:\/\/localhost:19071\/ApplicationStatus'\ndo\n  :\ndone\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fixing an error running vespa.ai<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[79,568],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5869"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=5869"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5869\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=5869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=5869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=5869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}