2

When i run bootstrap in How do I configure juju for local usage? i got this error. I have done the same steps. So why that error is comming? Then i checked the permission for index.json file i changed permission but it didn't work.

ERROR failed getting all instances: error executing "lxc-ls": Traceback (most recent call last):;   File "/usr/bin/lxc-ls", line 31, in <module>;     import lxc;   File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>;     import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
ERROR error executing "lxc-ls": Traceback (most recent call last):;   File "/usr/bin/lxc-ls", line 31, in <module>;     import lxc;   File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>;     import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
ERROR Bootstrap failed, and the environment could not be destroyed: exit status 1
ERROR rename /home/sajith/.juju/local/storage/.tmp/juju-filestorage-670557739 /home/sajith/.juju/local/storage/tools/streams/v1/index.json: permission denied

These are the steps I followed:

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju-core
sudo apt-get install juju-local
ssh-keygen -t rsa
juju init
juju switch local
juju bootstrap

ERROR error executing "lxc-ls": Traceback (most recent call last):; File "/usr/bin/lxc-ls", line 31, in <module>; import lxc; File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>; import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
muru
  • 197,895
  • 55
  • 485
  • 740
Sajith Vijesekara
  • 359
  • 1
  • 4
  • 15

2 Answers2

3

I was having exactly the same problem on a clean install I did of trusty this morning. I had to do an upgrade. I was getting the undefined symbol: cgmanager_get_pid_cgroup_abs_sync error when running lxc-ls as well.

sudo apt-get upgrade

That fixed the issue for me

MattyW
  • 313
2

Read more about bootstrapping:
> Configuring for LXC
> Bootstrapping and Destroying

Some cite:

The usage of LXC Linux Containers requires root privileges for some steps. Juju will prompt for your password if needed. Juju cannot be run under sudo because it needs to manage permission as the real user.

Other way to solve problem:

  1. Try:

    sudo rm ~/.juju/environments/local.jenv  
    

    and then reconfigure or reinstall from PPA's steps or SSH key generation.

  2. To remove all current deployments and clear up everything in your cloud, you can run the command:

    juju destroy-environment  <environment-name>
    

    Where the <environment-name> is the name you gave the environment when you configured it. This extra details is to help prevent accidents! You will also see a warning and will be prompted whether or not to continue - this action will remove everything, including the bootstrap node. Warning!

  3. Also with WARNING! this command will destroy the "local" environment (type: local)
    This includes all machines, services, data and other resources.

    juju destroy-environment local --force
    
  4. And again with WARNING!
    To log your LXC destroy (to view LXC trouble and post your log):

    juju destroy-environment local --logging-config=golxc=TRACE;juju=DEBUG --show-log
    
swift
  • 3,281
  • 2
  • 23
  • 46
  • Thanks your response.I am new to juju and LXC. So i have done same steps which are in your links.So still didn,t work.When i create yaml file it did't have any admin secret value. – Sajith Vijesekara Jun 30 '14 at 10:49
  • you use 12.04 or newer? – swift Jun 30 '14 at 10:53
  • I am using ubuntu server 14.04 is that trouble ?? – Sajith Vijesekara Jun 30 '14 at 10:54
  • No, sorry. I think your ufw halted your bootstraping. Maybe you need add local storage port rules to your ufw config – swift Jun 30 '14 at 10:59
  • you mean i want to disable firewall. – Sajith Vijesekara Jun 30 '14 at 11:00
  • yes, or disable. – swift Jun 30 '14 at 11:03
  • I have disabled but it didn't work.Before that is that need to start LXC server ?? i only followed the steps in this one.http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage it didn't mention about LXC server. – Sajith Vijesekara Jun 30 '14 at 11:05
  • This is the error i got WARNING ignoring environments.yaml: using bootstrap config in file "/home/sajith/.juju/environments/local.jenv" uploading tools for series [trusty precise] ERROR rename /home/sajith/.juju/local/storage/.tmp/juju-filestorage-398578572 /home/sajith/.juju/local/storage/tools/streams/v1/index.json: permission denied – Sajith Vijesekara Jun 30 '14 at 11:08
  • just try: sudo rm ~/.juju/environments/local.jenv and then reconfigure or reinstall from PPA's steps or ssh key generation. I think no other way due to it is more lightly problem for our tender Juju )) – swift Jun 30 '14 at 11:13
  • First i remove local.jnev file and then try to gen key pair and after that i try to bootstrap again.But now it gives another error. – Sajith Vijesekara Jun 30 '14 at 11:20
  • Just post here the code I will add to your question if you cannot edit. – swift Jun 30 '14 at 11:21
  • ERROR error executing "lxc-ls": Traceback (most recent call last):; File "/usr/bin/lxc-ls", line 31, in ; import lxc; File "/usr/lib/python3/dist-packages/lxc/init.py", line 26, in ; import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync – Sajith Vijesekara Jun 30 '14 at 11:22
  • These are the steps i followed :- sudo add-apt-repository ppa:juju/stable sudo apt-get update sudo apt-get install juju-core sudo apt-get install juju-local ssh-keygen -t rsa juju init juju switch local juju bootstrap – Sajith Vijesekara Jun 30 '14 at 11:26
  • read: http://askubuntu.com/questions/218593/how-can-i-relaunch-juju-daemons-without-stop-starting-local-lxc-containers?rq=1 – swift Jun 30 '14 at 11:27
  • update: added command to log your LXC destroy. – swift Jun 30 '14 at 11:48
  • Hi Still i got this error :- ERROR rename /home/sajith/.juju/local/storage/.tmp/juju-filestorage-754545545 /home/sajith/.juju/local/storage/tools/streams/v1/index.json: permission denied – Sajith Vijesekara Jun 30 '14 at 12:02
  • your problem is lxc, read answer by Jorge: http://askubuntu.com/a/403619/38988 – swift Jun 30 '14 at 12:12
  • it didn't work.I remove all the stuffs and still same result. – Sajith Vijesekara Jun 30 '14 at 12:35
  • I get exactly the same error. I get the same error by just running lxc-ls – MattyW Jul 01 '14 at 07:58