IOError: [Errno 13] Permission denied: '/var/lib/memsql/nodes.hcl'

I am trying to install a new MEMSQL docker container with the following command.

docker run -it --init
–name memsql-ciab
-e LICENSE_KEY=“mykey”
-e ROOT_PASSWORD=“mypassword”
-p 3306:3306 -p 8080:8080
-v /home/myuser/mypath:/var/lib/memsql
memsql/cluster-in-a-box

I got this error.

Traceback (most recent call last):
File “/startup”, line 99, in
with open("/var/lib/memsql/nodes.hcl", “w”) as f:
IOError: [Errno 13] Permission denied: ‘/var/lib/memsql/nodes.hcl’

@leijin168 , I have the exact same issue. I had to change the owner of my volume path, “/home/myuser/mypath” to uid 999.

sudo chown 999 /home/myuser/mypath

now I get a different error

Traceback (most recent call last):
  File "/startup", line 108, in <module>
    init_cluster()
  File "/startup", line 54, in init_cluster
    ctl("add-leaf", "--host", "127.0.0.1", "--port", "3307")
  File "/startup", line 18, in ctl
    subprocess.check_output(["memsqlctl", "-yj"] + list(args)))
  File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['memsqlctl', '-yj', 'add-leaf', '--host', '127.0.0.1', '--port', '3307']' returned non-zero exit status 1

but will troubleshoot that in a different post.

For those following along, the above error was preceded by

Error 2374: Leaf node could not be added because you are using the SingleStore free license which has a limit of 4 license units and after adding the node you would be using 5 license units. To purchase more capacity, contact team@memsql.com. See https://docs.memsql.com/redir/capacity-limit-error for instructions on how to create a cluster with up to 4 license units.

Looks like my nodes got used in up in troubleshooting the failed installs. Not sure how to reset those. Did the “Contact Us” on the SingleStore portal page. Will update here if/when this gets resolved.

Very frustrating. It turns out the message is misleading. The real reason it cannot create the leaf node is my server has too much memory, not “has a limit of 4 license unit”. I set a limit (I believe the “license” limit is 128G but I am just looking to demo this so I set 64G).

docker run -i --init \
    --name singlestore \
    -e LICENSE_KEY=******** \
    -e ROOT_PASSWORD=******** \
    -v /u01/docker/memsql:/var/lib/memsql \
    -p 3306:3306 -p 8080:8080 -p 3307:3307 \
    --memory=64G \
    singlestore/cluster-in-a-box

So that plus chaning the volumer owner to 999, I am finally able to run it. Geesh.

NOTE: the Cluser In a Box documentation does not mention any memory limit.

1 Like

Hi Klokare! Thanks for submitting your first post to the forum! :star:

Has your issue been resolved?