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

Make sure build-essential is installed #286

Closed
mpikoula opened this issue Feb 27, 2019 · 15 comments · Fixed by #359
Closed

Make sure build-essential is installed #286

mpikoula opened this issue Feb 27, 2019 · 15 comments · Fixed by #359
Labels
bug Something isn't working support Support questions (should be on discourse.jupyter.org instead)

Comments

@mpikoula
Copy link

mpikoula commented Feb 27, 2019

From system log:

[ 58.949734] cloud-init[1212]: Granting passwordless sudo to JupyterHub admins...
[ 58.960084] cloud-init[1212]: Setting up user environment...
[ 58.964512] cloud-init[1212]: Downloading & setting up user environment...
[ 153.133719] cloud-init[1212]: Traceback (most recent call last):
[ 153.152077] cloud-init[1212]: File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
[ 153.164082] cloud-init[1212]: "main", mod_spec)
[ 153.180083] cloud-init[1212]: File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
[ 153.196282] cloud-init[1212]: exec(code, run_globals)
[ 153.207880] cloud-init[1212]: File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 453, in
[ 153.220003] cloud-init[1212]: main()
[ 153.227572] cloud-init[1212]: File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 436, in main
[ 153.239993] cloud-init[1212]: ensure_user_environment(args.user_requirements_txt_url)
ci-info: +++++Authorized keys from /home/ubuntu/.ssh/authorized_keys for user ubuntu++++++
[ 153.257758] cloud-init[1212]: File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 255, in ensure_user_environmentci-info: +---------+-------------------------------------------------+---------+---------+
ci-info: | Keytype | Fingerprint (md5) | Options | Comment |

[ 153.281450] cloud-init[1212]: ci-info: +---------+-------------------------------------------------+---------+---------+
'ipywidgets==7.4.2'
[ 153.294392] cloud-initci-info: | ssh-rsa | d9:a2:19:01:fe:6c:e7:9b:96:a3:de:68:d8:16:4c:52 | - | aws_key |
[1212]: File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/conda.py", line 133, in ensure_pip_packagesci-info: +---------+-------------------------------------------------+---------+---------+

[ 153.318441] cloud-init[1212]: ] + packages, stderr=subprocess.STDOUT)
[ 153.328373] cloud-init[1212]: File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
[ 153.336818] cloud-init[1212]: **kwargs).stdout
[ 153.341928] cloud-init[1212]: File "/usr/lib/python3.6/subprocess.py", line 418, in run
[ 153.348801] cloud-init[1212]: output=stdout, stderr=stderr)
[ 153.360976] cloud-init[1212]: subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/python', '-m', 'pip', 'install', '--no-cache-dir', 'jupyterhub==0.9.4', 'notebook==5.7.0', 'jupyterlab==0.35.3', 'nteract-on-jupyter==1.9.12', 'nbgitpuller==0.6.1', 'nbresuse==0.3.0', 'ipywidgets==7.4.2']' returned non-zero exit status 1.
[ 153.378331] <14>Feb 27 15:30:12 ec2:
<14>Feb 27 15:30:12 ec2:
cloud-init[1212]: Cloud-init v. 18.3-9-g2e62cb8a-0ubuntu118.04.2 running 'modules:final' at Wed, 27 Feb 2019 15:28:00 +0000. Up 20.59 seconds.
[ 153.465289] cloud-init[1212]: 2019-02-27 15:30:12,792 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
[ 153.477232] cloud-init[1212]: 2019-02-27 15:30:12,797 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
[ 153.496913] cloud-init[1212]: 2019-02-27 15:30:12,798 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
[ 153.521355] cloud-init[1212]: Cloud-init v. 18.3-9-g2e62cb8a-0ubuntu1
18.04.2 finished at Wed, 27 Feb 2019 15:30:13 +0000. Datasource DataSourceEc2Local. Up 153.46 seconds
[�[0;1;31mFAILED�[0m] Failed to start Execute cloud user/final scripts.
See 'systemctl status cloud-final.service' for details.
[�[0;32m OK �[0m] Reached target Cloud-init target.
Close

@phoenom
Copy link

phoenom commented Feb 28, 2019

im getting the same problem on gcp vm with ubuntu 18.04 LTS and 18.10. any thought ?

@yuvipanda
Copy link
Collaborator

Apologies for the extremely late response.

Are you still running into this error?

Once #337 lands, it should be possible for errors like this to be solved better, since they'll provide much more useful error messages. If you're running into this error still, would be awesome to try it out again once that PR lands.

Again, I apologize for how long it's taken to get a response here. We now have a discourse at discourse.jupyter.org that gets more traffic, so asking installation related questions there might get answers quicker.

@yuvipanda yuvipanda added the support Support questions (should be on discourse.jupyter.org instead) label May 20, 2019
@Fregf
Copy link

Fregf commented May 28, 2019

I can confirm it currently still fails to install on a clean Ubuntu 18.04:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 455, in <module>
    main()
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 438, in main
    ensure_user_environment(args.user_requirements_txt_url)
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 257, in ensure_user_environment
    'tornado<6.0'
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/conda.py", line 133, in ensure_pip_packages
    ] + packages, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/python', '-m', 'pip', 'install', '--no-cache-dir', 'jupyterhub==0.9.6', 'notebook==5.7.8', 'jupyterlab==0.35.4', 'nteract-on-jupyter==2.0.7', 'nbgitpuller==0.6.1', 'nbresuse==0.3.0', 'ipywidgets==7.4.2', 'tornado<6.0']' returned non-zero exit status 1.

@Fregf
Copy link

Fregf commented May 28, 2019

Running the failing command by hand reveal the real error:

    /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h:194:15: fatal error: limits.h: No such file or directory
     #include_next <limits.h>  /* recurse down to the real one */

The documentation should specify that the build-essential package needs to be installed.

@yuvipanda
Copy link
Collaborator

@Fregf can you tell me if you're using a cloud provider, or your local image? I'm trying to figure out why this works wherever I test and fails for other folks.

@yuvipanda
Copy link
Collaborator

And re: build-essential, we can install that in bootstrap.py if it's necessary.

@Fregf
Copy link

Fregf commented May 28, 2019

This is just a local system with freshly installed Ubuntu 18.04 server, and then jupyterhub installed with the instructions from https://tljh.jupyter.org/en/latest/install/custom-server.html . Installing build-essential, made the installer work.

@yuvipanda
Copy link
Collaborator

Thanks, @Fregf. I'll add it to bootstrap.py so it'll be installed if not present.

@yuvipanda yuvipanda changed the title Fails to install in ubuntu 18.04 - followed instructions to the 't' Make sure build-essential is installed May 28, 2019
@yuvipanda
Copy link
Collaborator

From https://github.com/giampaolo/psutil/blob/master/INSTALL.rst it looks like what psutil needs is gcc, which also comes with build-essential. I think we can install build-essential rather than just gcc, since I'm guessing building other things might also need build-essential.

@yuvipanda yuvipanda added the bug Something isn't working label May 28, 2019
yuvipanda added a commit to yuvipanda/the-littlest-jupyterhub that referenced this issue May 29, 2019
It's generally more bugfree and performant.
We install dependencies of pycurl, including build-essential.
build-essential is used by many other dependencies
as well - particularly psutil for nbresuse.

Fixes jupyterhub#289
Fixes jupyterhub#286
@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/the-littlest-jupyter-hub-install-failed-on-aws-ec2/7609/1

@jdelamare
Copy link

Has any progress been made on this? I think it's just Conda missing, but I haven't looked too far into it.

@yuvipanda
Copy link
Collaborator

Hi @jdelamare. What issue are you running into? This should've been resolved with the PRs linked to from here.

@jdelamare
Copy link

jdelamare commented Mar 21, 2021

I received the following signal when running TLJH on a t2.micro. Although the guide says it's possible, I don't think there is adequate memory on the instance. I think increasing the memory would solve the problem linked above "...install-failed-on-ec2"

[  118.818268] cloud-init[1126]: Downloading & setting up user environment...
[  151.623187] Out of memory: Killed process 7900 (python) total-vm:972292kB, anon-rss:703924kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:1536kB oom_score_adj:0

[  151.012740] cloud-init[1126]: Traceback (most recent call last):
[  151.028865] cloud-init[1126]:   File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
[  151.051882] cloud-init[1126]:     return _run_code(code, main_globals, None,
[  151.064108] cloud-init[1126]:   File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
[  151.094475] cloud-init[1126]:     exec(code, run_globals)
[  151.103613] cloud-init[1126]:   File "/opt/tljh/hub/lib/python3.8/site-packages/tljh/installer.py", line 534, in <module>
[  151.122858] cloud-init[1126]:     main()
[  151.137657] cloud-init[1126]:   File "/opt/tljh/hub/lib/python3.8/site-packages/tljh/installer.py", line 506, in main 
[  151.154607] cloud-init[1126]:     ensure_user_environment(args.user_requirements_txt_url)
[  151.168459] cloud-init[1126]:   File "/opt/tljh/hub/lib/python3.8/site-packages/tljh/installer.py", line 280, in ensure_user_environment
[  151.201095] cloud-init[1126]:     conda.ensure_conda_packages(USER_ENV_PREFIX, [
[  151.225931] cloud-init[1126]:   File "/opt/tljh/hub/lib/python3.8/site-packages/tljh/conda.py", line 103, in ensure_conda_packages
[  151.247188] cloud-init[1126]:     raw_output = subprocess.check_output(conda_executable + [
[  151.264364] cloud-init[1126]:   File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
[  151.273829] cloud-init[1126]:     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[  151.283640] cloud-init[1126]:   File "/usr/lib/python3.8/subprocess.py", line 512, in run
[  151.292590] cloud-init[1126]:     raise CalledProcessError(retcode, process.args,
[  151.303086] cloud-init[1126]: subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/python', '-m', 'conda', 'install', '-c', 'conda-forge', '--json', '--prefix', '/opt/tljh/user', 'conda==4.8.1']' died with <Signals.SIGKILL: 9>.

@yuvipanda
Copy link
Collaborator

@jdelamare ah, thanks for reporting that. I opened #670 to track that. What seems like a good minimum instance size?

#647 should also help, since lab 3.0 uses a lot less memory than 2.0

@jdelamare
Copy link

Sweet! Thanks for being so responsive. I'm up and running with a t2.small at the moment. Hopefully #647 brings down RAM usage so that the free tier is accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support Support questions (should be on discourse.jupyter.org instead)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants