Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppScale sample fails to boot on Docker / macOS when following getting started guide #3061

Open
robinwassen opened this issue May 3, 2019 · 10 comments

Comments

@robinwassen
Copy link

AppScale fails to boot when following the steps for Docker in the Try AppScale in Three Steps guide. It simply gets stuck at Granting admin privileges to [email protected]

Docker: CE 2.0.0.3 (31259), 4GB RAM
OS: macOS Mojave 10.14.4
Computer specs: Macbook Pro 15" Late 2018, 16GB RAM

Steps to reproduce:

Expected results: AppScale should boot

Actual results: AppScale gets stuck booting

Workarounds tested:

  • Start docker with --privileged flag as mentioned in this thread - > Made no difference
  • Exit the script -> Seems like it leaves AppScale in a broken semi-started state

Logs:

robin@rmbp15 ~ $ docker run -i --privileged -t appscale/appscale:latest /bin/bash
root@02c3c1205847:/# cd root/
root@02c3c1205847:~# bash appscale/scripts/fast-start.sh --no-demo-app
Detected enviroment: Docker
Private IP found: 172.17.0.2
Public IP found:  172.17.0.2
Creating AppScalefile...done.
Downloading sample app.
/root/guestbook.tar.gz: OK
Executing ssh-copy-id for host: 172.17.0.2
Generated a new SSH key for this deployment at /root/.appscale/appscale6abea85b4ae84ed4b97c900102793b69
Starting AppScale 3.7
Log in to your head node: ssh -i /root/.appscale/appscale6abea85b4ae84ed4b97c900102793b69.key [email protected]
Starting AppController at 172.17.0.2
Please wait for the AppController to finish pre-processing tasks.
Head node successfully initialized at 172.17.0.2.
Waiting for head node to initialize...
Waiting for head node to initialize...
Waiting for head node to initialize...
Waiting for head node to initialize...
Using the provided admin username/password
Creating new user account [email protected]
Creating new user account [email protected]
Your XMPP username is [email protected]
Granting admin privileges to [email protected]
@robinwassen
Copy link
Author

I left it running for a while and got a timeout with some more information:

Port 172.17.0.2:1080 did not open in time. Aborting...

A log with more information is available at
/root/.appscale/log-c8d8b983-fa1d-4baa-8976-0e338edb3253.
root@02c3c1205847:~#
root@02c3c1205847:~#
root@02c3c1205847:~# cat /root/.appscale/log-c8d8b983-fa1d-4baa-8976-0e338edb3253
stacktrace : Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/appscale/tools/scripts/appscale.py", line 45, in main
    appscale.up()
  File "/usr/local/lib/python2.7/dist-packages/appscale/tools/appscale.py", line 303, in up
    AppScaleTools.run_instances(run_instances_opts)
  File "/usr/local/lib/python2.7/dist-packages/appscale/tools/appscale_tools.py", line 889, in run_instances
    options.keyname), RemoteHelper.APP_DASHBOARD_PORT, options.verbose)
  File "/usr/local/lib/python2.7/dist-packages/appscale/tools/remote_helper.py", line 378, in sleep_until_port_is_open
    "Aborting...".format(host, port))
TimeoutException: Port 172.17.0.2:1080 did not open in time. Aborting...

exception : TimeoutException

tools_version : 3.7.0

platform : Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-16.04-xenial

message : Port 172.17.0.2:1080 did not open in time. Aborting...

runtime : CPython

@scragraham
Copy link
Contributor

Hi Robin,

Thanks for the issue report, I believe we were able to reproduce the issue. The cause looks like an IPv6 entry for localhost in /etc/hosts.

Before running the fast-start script, please change the following line in /etc/hosts on the container:

::1	localhost ip6-localhost ip6-loopback

To:

::1	ip6-localhost ip6-loopback

With that change we were able to successfully run the faststart script, Let us know if that works for you.

@vanilla111
Copy link

I had same problem. I modified the file /etc/hosts as recommended by the contributor, and it still took a long time to run the fast-start script(pause at Granting admin privileges to [email protected]),although there were the same errors.

@obino
Copy link
Member

obino commented Jul 22, 2019 via email

@scragraham
Copy link
Contributor

Also to avoid having to modify the hosts file you can run the image with the following option:

--sysctl net.ipv6.conf.lo.disable_ipv6=0

Docker does some things under the hood with the /etc/hosts file, which is why you have to enable ipv6. It's not really a good idea to modify it.

This is related to: moby/moby#35954

@lucadvp
Copy link

lucadvp commented Sep 20, 2019

Hi, I still have that problem also on a fresh Ubuntu 16.04.5 LTS on amd64 machine following docker try-appscale instruction at step 2/3, even if I add the --privileged and the --sysctl options suggested in the answers above.
I attach the terminal commands, outputs and the appscale log.

Do you have any suggestion? Thanks in advance.

20190920_try-appscale_docker_with_options.txt

@obino
Copy link
Member

obino commented Sep 20, 2019 via email

@lucadvp
Copy link

lucadvp commented Sep 21, 2019

Hi, Graziano, thank you for the answer. I attach the archive with the whole log folder you requested.
Best regards,
Luca
20190921_var_log_appscale.tar.gz

@cdonati
Copy link
Member

cdonati commented Sep 22, 2019

The log line "No compute node is available to scale..." usually indicates that there is not enough free memory available to start application instances. It could also indicate that the machine's CPUs are too busy, but that is less common.

If your machine already has enough memory (>4G of free memory is usually enough), you could try adding the line "verbose: True" in your AppScalefile to get more detailed controller logs.

@lucadvp
Copy link

lucadvp commented Sep 24, 2019

Hi cdonati, thank you for the suggestion. The issue was actually due to the memory shortage and when around 4GB were available appscale started as expected.
Thanks again,
Luca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants