Exception: Failed to get client device ID

Stuck at first attempt.

I am running Fedora linux 27. Any idea?

sudo ./Blockstack-for-Linux-v0.26.2.sh start


Please enter a password to protect your Blockstack core node.
IMPORTANT: This will be used to encrypt information stored within the containers
           which may include private keys for your Blockstack wallet.
           It is important that you remember this password.
           This will be the password you use to "pair" your Blockstack Browser
           with your Blockstack core node.

           Legal characters:
               letters (upper and lowercase), numbers, '_', and '-'

Password: 
Repeat: 
Wallet does not exist yet. Setting up wallet
{
    "error": "Unexpected error:
Traceback (most recent call last):
  File \"/usr/local/bin/blockstack\", line 52, in <module>
    result = run_cli()
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/cli.py\", line 440, in run_cli
    res = config.setup_config(config_path=config_path, interactive=(os.environ.get(\"BLOCKSTACK_CLIENT_INTERACTIVE_YES\") != '1'))
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 1034, in setup_config
    conf = configure(config_file=config_path, interactive=interactive, set_migrate=True)
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 297, in configure
    all_opts = read_config_file(config_path=config_file, set_migrate=set_migrate)
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 732, in read_config_file
    raise Exception(\"Failed to get client device ID\")
Exception: Failed to get client device ID
",
    "help": "Try getting latest version of CLI with \"sudo pip install blockstack --upgrade\""
}
sed: can't read /root/.blockstack/client.ini: No such file or directory
ef633c01d82f9a64b078348aa7b19e2e9e792360c3a9857bdb27b8334200dc22
Set BLOCKSTACK_DEBUG to 1
Re-exec as `"/usr/bin/python", "/usr/local/bin/blockstack", "api", "start", "--secrets", "3"`
[2018-03-23 09:00:38,883] [DEBUG] [spv:103] (11.140256163915520) Using mainnet
[2018-03-23 09:00:38,977] [DEBUG] [cli:419] (11.140256163915520) Load secrets from 3
[2018-03-23 09:00:38,977] [ERROR] [config:241] (11.140256163915520) [Errno 13] Permission denied: '/root/.blockstack/client.uuid'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 235, in get_or_set_uuid
    with open(uuid_path, 'w') as f:
IOError: [Errno 13] Permission denied: '/root/.blockstack/client.uuid'
[2018-03-23 09:00:38,978] [ERROR] [config:241] (11.140256163915520) [Errno 13] Permission denied: '/root/.blockstack/client.uuid'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 235, in get_or_set_uuid
    with open(uuid_path, 'w') as f:
IOError: [Errno 13] Permission denied: '/root/.blockstack/client.uuid'
[2018-03-23 09:00:38,978] [ERROR] [blockstack:66] (11.140256163915520) Failed to get client device ID
Traceback (most recent call last):
  File "/usr/local/bin/blockstack", line 52, in <module>
    result = run_cli()
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/cli.py", line 440, in run_cli
    res = config.setup_config(config_path=config_path, interactive=(os.environ.get("BLOCKSTACK_CLIENT_INTERACTIVE_YES") != '1'))
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 1034, in setup_config
    conf = configure(config_file=config_path, interactive=interactive, set_migrate=True)
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 297, in configure
    all_opts = read_config_file(config_path=config_file, set_migrate=set_migrate)
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 732, in read_config_file
    raise Exception("Failed to get client device ID")
Exception: Failed to get client device ID
{
    "error": "Unexpected error:
Traceback (most recent call last):
  File \"/usr/local/bin/blockstack\", line 52, in <module>
    result = run_cli()
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/cli.py\", line 440, in run_cli
    res = config.setup_config(config_path=config_path, interactive=(os.environ.get(\"BLOCKSTACK_CLIENT_INTERACTIVE_YES\") != '1'))
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 1034, in setup_config
    conf = configure(config_file=config_path, interactive=interactive, set_migrate=True)
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 297, in configure
    all_opts = read_config_file(config_path=config_file, set_migrate=set_migrate)
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py\", line 732, in read_config_file
    raise Exception(\"Failed to get client device ID\")
Exception: Failed to get client device ID
",
    "help": "Try getting latest version of CLI with \"sudo pip install blockstack --upgrade\""
}
Failed to start Blockstack daemon -- is your password correct?
stopping the running blockstack-api container
ef633c01d82f
ef633c01d82f

The source of the problem is this right here:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/config.py", line 235, in get_or_set_uuid
    with open(uuid_path, 'w') as f:
IOError: [Errno 13] Permission denied: '/root/.blockstack/client.uuid'

@jackzampolin will have to confirm, but IIRC the path /root/.blockstack is bind-mounted from ~/.blockstack in the Docker image. Is ~/.blockstack a writable directory for you?

Yup @jude, the local directory is $HOME/.blockstack https://github.com/blockstack/packaging/blob/master/browser-core-docker/launcher#L30

./blockstack does not exist in this image.
sudo docker run --rm -it --entrypoint=/bin/bash quay.io/blockstack/blockstack-core:v0.26.2-browser
root@1ca8ba669848:/src/blockstack# ls -la
total 184
drwxr-xr-x. 1 root root 4096 Mar 19 19:57 .
drwxr-xr-x. 1 root root 4096 Mar 19 19:56 …
-rw-r–r--. 1 root root 93 Jan 1 1980 .dockerignore
-rw-r–r--. 1 root root 424 Jan 1 1980 .gitignore
-rw-r–r--. 1 root root 155 Jan 1 1980 .gitmodules
-rw-r–r--. 1 root root 402 Jan 1 1980 Dockerfile
-rw-r–r--. 1 root root 35141 Jan 1 1980 LICENSE
-rw-r–r--. 1 root root 20880 Jan 1 1980 README.md
-rw-r–r--. 1 root root 0 Jan 1 1980 init.py
drwxr-xr-x. 10 root root 4096 Jan 1 1980 api
drwxr-xr-x. 2 root root 4096 Jan 1 1980 bin
drwxr-xr-x. 3 root root 4096 Jan 1 1980 blockstack
drwxr-xr-x. 4 root root 4096 Jan 1 1980 blockstack_client
-rwxr-xr-x. 1 root root 934 Jan 1 1980 build_docs.sh
-rw-r–r--. 1 root root 1443 Jan 1 1980 circle.yml
drwxr-xr-x. 5 root root 4096 Jan 1 1980 docs
drwxr-xr-x. 6 root root 4096 Jan 1 1980 images
drwxr-xr-x. 6 root root 4096 Jan 1 1980 integration_tests
drwxr-xr-x. 2 root root 4096 Jan 1 1980 release_notes
-rwxr-xr-x. 1 root root 2825 Jan 1 1980 setup.py
drwxr-xr-x. 2 root root 4096 Jan 1 1980 subdomain_registrar
drwxr-xr-x. 3 root root 4096 Jan 1 1980 tools
drwxr-xr-x. 3 root root 4096 Jan 1 1980 unittests

root@1ca8ba669848:/src/blockstack# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          46G   27G   17G  62% /
tmpfs           3.9G     0  3.9G   0% /dev
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda13       46G   27G   17G  62% /etc/hosts
shm              64M     0   64M   0% /dev/shm
tmpfs           3.9G     0  3.9G   0% /proc/scsi
tmpfs           3.9G     0  3.9G   0% /sys/firmware

sudo docker inspect quay.io/blockstack/blockstack-core:v0.26.2-browser

[
    {
        "Id": "sha256:e7a5ca69c6f1fd4be032f2cf8f1d9b338024d910caed57336bf90215cf0f6a39",
        "RepoTags": [
            "quay.io/blockstack/blockstack-core:v0.26.2-browser"
        ],
        "RepoDigests": [
            "quay.io/blockstack/blockstack-core@sha256:c0edbe5e33051b5ab44db76ca18e9f3e71b477bd82dfd55619868846cf49d1ea"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2018-03-19T19:57:17.610782195Z",
        "Container": "c729dcc6b9cb7d5d072ce1a73e515110b1c5fe3b518183f5450858bb6e9732f2",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "pip install ."
            ],
            "ArgsEscaped": true,
            "Image": "sha256:c6016decbdf2c94068f31ec2b23517cc461e9b0218a10ec86358c705a6927e4f",
            "Volumes": null,
            "WorkingDir": "/src/blockstack",
            "Entrypoint": null,
            "OnBuild": [],
            "Labels": null
        },
        "DockerVersion": "17.09.0-ce",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:c6016decbdf2c94068f31ec2b23517cc461e9b0218a10ec86358c705a6927e4f",
            "Volumes": null,
            "WorkingDir": "/src/blockstack",
            "Entrypoint": null,
            "OnBuild": [],
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 513083573,
        "VirtualSize": 513083573,
        "GraphDriver": {
            "Name": "overlay2",
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c7769ff95bc72c66e488db888b18bb33f339ba2adeff25143c544545c4606ec2/diff:/var/lib/docker/overlay2/a7c1166649c8baf877af6acc1f682997c75ed90353a2d727a41d2fef3e3fd692/diff:/var/lib/docker/overlay2/4b6c879b931b1f94b196d3be66646f737a77413a9a83f0c6eb49fc0f58069183/diff:/var/lib/docker/overlay2/e36de2bd19e675dcb29318029f87ecaf4f79621bf497bf8513263ca7be961de1/diff:/var/lib/docker/overlay2/88d3aaee7a3517eb477020f5ca46a6fca77bec2f4b20c9f08535c0d6023eeeb4/diff:/var/lib/docker/overlay2/2fc9d3b3ecd767fa37a6700e7704ed96fa7414fe48d0bfd3f68cd8ab78189466/diff:/var/lib/docker/overlay2/7f53503ec2785cfab40e4ca65d5443bf8a02c6c04847b765ee59b8da9d807496/diff:/var/lib/docker/overlay2/0281d8c53d66a0792edc34e5b12691ba031ca731dac51dd34dfcc1f44a1f75f0/diff:/var/lib/docker/overlay2/1fe41d02d79f9f2bfb45ac32a5057af1bd8bb2eabb54167254de98ee56522a89/diff",
                "MergedDir": "/var/lib/docker/overlay2/c53979d07ecfbb51b471df4fae7ef70459aea84362e786825b2667f7bb11e2c7/merged",
                "UpperDir": "/var/lib/docker/overlay2/c53979d07ecfbb51b471df4fae7ef70459aea84362e786825b2667f7bb11e2c7/diff",
                "WorkDir": "/var/lib/docker/overlay2/c53979d07ecfbb51b471df4fae7ef70459aea84362e786825b2667f7bb11e2c7/work"
            }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:a94e0d5a7c404d0e6fa15d8cd4010e69663bd8813b5117fbad71365a73656df9",
                "sha256:88888b9b1b5b7bce5db41267e669e6da63ee95736cb904485f96f29be648bfda",
                "sha256:52f389ea437ebf419d1c9754d0184b57edb45c951666ee86951d9f6afd26035e",
                "sha256:52a7ea2bb533dc2a91614795760a67fb807561e8a588204c4858a300074c082b",
                "sha256:db584c622b50c3b8f9b8b94c270cc5fe235e5f23ec4aacea8ce67a8c16e0fbad",
                "sha256:7a8199bfac3b3bff26cc1b3ffe1dc0bfbacc1cf0327eeea2cd9f7a1bdbe3c431",
                "sha256:9ab5e8ba323c776070c6a9df7eba4838850f30dc833a9374aa7eb92282e09486",
                "sha256:0cdd7c65c7b5e5d86e05e38f2abfd91ef460ee231f1cacbe6c0ec355f7922382",
                "sha256:b21e4a7d9c214e54c3377ef0c24d2f393255fe12c325d08a95b67c8d7ca1dc1b",
                "sha256:9254e34debc75f815ce0353e388fc22e1d40f5c551eeb3a173f913dbcafdd831"
            ]
        }
    }
]

In the Docker image, it’s at /root/.blockstack.

Strange nothing there in my case. Pull command shows images are up to date. Should I try with an older image?

root@54074ff24df9:~# ls -lart
total 24
-rw-r--r--. 1 root root  148 Aug 17  2015 .profile
-rw-r--r--. 1 root root 3106 Oct 22  2015 .bashrc
drwx------. 1 root root 4096 Mar 19 19:57 .cache
drwx------. 1 root root 4096 Mar 19 19:57 .
drwxr-xr-x. 1 root root 4096 Mar 25 15:15 ..
root@54074ff24df9:~# pwd
/root

sudo ./Blockstack-for-Linux-v0.26.2.sh pull
[sudo] password for adiack: 
Trying to pull repository quay.io/blockstack/blockstack-core ... 
sha256:c0edbe5e33051b5ab44db76ca18e9f3e71b477bd82dfd55619868846cf49d1ea: Pulling from quay.io/blockstack/blockstack-core
22dc81ace0ea: Already exists 
1a8b3c87dba3: Already exists 
91390a1c435a: Already exists 
07844b14977e: Already exists 
b78396653dae: Already exists 
a30f737308e8: Already exists 
71936b1789ec: Already exists 
c9a37e3d0b79: Already exists 
ce2cb7b18109: Already exists 
e5d78ed17d23: Already exists 
Digest: sha256:c0edbe5e33051b5ab44db76ca18e9f3e71b477bd82dfd55619868846cf49d1ea
Status: Image is up to date for quay.io/blockstack/blockstack-core:v0.26.2-browser
Trying to pull repository quay.io/blockstack/blockstack-browser ... 
sha256:a5156da891ec546c0396b2b44dd645bcb9c56767c7cfdc7bd974bf5b458ab083: Pulling from quay.io/blockstack/blockstack-browser
22dc81ace0ea: Already exists 
1a8b3c87dba3: Already exists 
91390a1c435a: Already exists 
07844b14977e: Already exists 
b78396653dae: Already exists 
39306e9c484f: Already exists 
dbf4cd6a68b1: Already exists 
dacf7d3aca22: Already exists 
d2cdfaada86b: Already exists 
8a8dea6f0208: Already exists 
ee70adbde70d: Already exists 
2846359744f8: Already exists 
0c6ab02719cd: Already exists 
c7698315add0: Already exists 
df713f35091d: Already exists 
a62b9ac83a59: Already exists 
3e3da4473174: Already exists 
4732c01d284a: Already exists 
Digest: sha256:a5156da891ec546c0396b2b44dd645bcb9c56767c7cfdc7bd974bf5b458ab083
Status: Image is up to date for quay.io/blockstack/blockstack-browser:v0.26.2

So finally got it to work. It turns out /root/.blockstack was instead installed at /home/user/.blockstack. I was confused on why it would try to map anything from a local root directory . I created a link to to ~/.blockstack from /root and the script was successful.

I have a name registration issue now but that is another matter.

BTw I had to add the “Z” flag on the docker command line. this is the only way I could get docker to properly mount local volume. Otherwise /root/.blockstack is not accessible.

So I had to change
coremount_home="$homedir":’/root/.blockstack’
to
coremount_home="$homedir":’/root/.blockstack:Z
within the Blockstack-for-Linux-v0.26.1.sh script.
Apparently this is a known docker issue for certain linux distributions.

Hope this helps someone.