dart 1.12, boot2docker and ubuntu 15.04

After some successful attempts some time ago using the appengine and dart tutorial. My boot2docker setup seems to be broken.

In virtual box, I deleted the boot2docker-vm

$ docker run google/dart /usr/bin/dart --version
Using default tag: latest
Error response from daemon: client and server don't have same version (client API version: 1.20, server API version: 1.19)
$ docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Wed Oct  7 17:53:44 UTC 2015
 OS/Arch:      linux/amd64
Server:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Wed Oct  7 17:53:44 UTC 2015
 OS/Arch:      linux/amd64

I removed my docker installation (currenly 1.8.2) with


sudo apt-get remove docker docker-engine

Although I might have simply needed to stop the service Since I installed docker using the official installation, I downgrade docker manually


$ sudo rm /usr/local/bin/docker
$ sudo wget https://get.docker.io/builds/Linux/x86_64/docker-1.7.1 -O /usr/local/bin/docker
$ sudo chmod 755 /usr/local/bin/docker

and start the docker server manually

docker -d

Stop and deleted previous docker and boot2docker installation and images

$ boot2docker delete
$ rm -rf ~/.boot2docker
$ sudo rm /usr/local/bin/boot2docker
$ sudo wget https://github.com/boot2docker/boot2docker-cli/releases/download/v1.7.1/boot2docker-v1.7.1-linux-amd64 -O /usr/local/bin/boot2docker
$ sudo chmod 755 /usr/local/bin/boot2docker

Basically I did again the the installation steps from https://www.dartlang.org/server/google-cloud-platform/app-engine/setup.html (changing from latest to 1.7.1)


$ docker -d &
$ docker run google/dart /usr/bin/dart --version
Dart VM version: 1.12.1 (Tue Sep  8 11:14:08 2015) on "linux_x64"

Trying the hello world...

When binding fails

raise BindError('Unable to bind %s:%s' % self.bind_addr)

I do

$ kill -9 $(sudo lsof -ti :8080)
$ gcloud preview app run app.yaml --custom-entrypoint bin/server.dartINFO     2015-10-11 16:11:32,722 devappserver2.py:763] Skipping SDK update check.
INFO     2015-10-11 16:11:32,739 api_server.py:205] Starting API server at: http://localhost:47747
INFO     2015-10-11 16:11:32,748 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2015-10-11 16:11:32,748 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR    2015-10-11 16:11:32,755 instance.py:280] [Errno 13] Permission denied

It seems I had conflict between the port that by listens too and dev_appserver
Finally the command that ended up working was:

$ gcloud preview app run app.yaml --custom-entrypoint "dart bin/server.dart" --host localhost:8079

Before restarting I have to clean my listener

$ kill -9 $(sudo lsof -ti :8079)

phew...what a pain

Popular posts from this blog

Soving AccessDenied on Google Cloud Storage domain mapping

Fixing "DerInputStream.getLength(): lengthTag=109, too big" in Android Studio

Simple Samba setup on Lubuntu