Sporadic 'Failed to create temporary user for...' error

I have a repo (GitHub - inpefess/isabelle-client: A client for Isabelle server (https://isabelle.in.tum.de)) which worked with Binder with no problems for several months. Now it doesn’t. The error message (‘Failed to create a temporary user for …’) is mentioned here: 2018-02-20, JupyterLab Announcement swamps Binder — Site Reliability Guide for mybinder.org 1.0 documentation. So it certainly doesn’t have anything to do with the source code of the repo and/or Dockerfile. I’m even more sure about that since I haven’t changed anything before the error appeared. Now, even if I use older commits from git history, the error is the same, although I’ve never seen it before.

Maybe my image size or the memory footprint when building on Binder is too large. Then I’ll be happy if anyone advises me on what limits should I stick to? Any help is appreciated, thanks in advance!

It’s generally best to avoid using Dockerfiles on mybinder.org if possible, especially since you’re using a custom base-image and not one of the standard Jupyter ones.
Use a Dockerfile for your Binder repository — Binder 0.1b documentation

My guess is your Docker image has some runtime or permission requirements that aren’t supported.

Are you able to use a standard jupyter base-image instead and add your components on top of it?

1 Like

To follow on that. @inpefess you can leave the rest of your repository ‘as-is’ and you can add a binder directory. Them MyBinder will use the configuration files in there for the MyBinder-specific launches. That way your others remain intact and you can try options without concern you’ll miss up other ways you or others use your repository contents. The documentation mentions it here:

" Configuration files may be placed in the root of your repository or in a binder/ folder in the repository’s root (i.e. myproject/binder/ )."

1 Like

Thank you! I was not aware of such an option. That certainly will help me to experiment with no-Docker configs for Binder!

I’m using not a standard Jupyter image since I need to install a piece of software which is distributed only as a tarball or a Docker image. I guess I can use Configuration Files — Binder 0.1b documentation then, can’t I?

Also, the error I saw happens here: binderhub/launcher.py at 656204bb62d46be51fc7fb79cc5d7600b71a7614 · jupyterhub/binderhub · GitHub At this point, the image is already built successfully, but not yet launched. Binder can’t create a temporary user it needs to launch the image, so it’s not about image’s runtime.

And now everything works as it was for months before, and I didn’t change anything since I posted here :smile:

Oh sorry. I hadn’t picked up on how sporadic it is. It sounds like you were just testing your complex stuff at a time that MyBinder was having some more issues than usual. Resources are limited at several points and sometimes that causes different messages. The fact it works as it did means that there was nothing you can do about that issue you saw. Fortunately, it also means that nothing has changed to make the underlying process incompatible with your approach. Seems it was just bad timing.

1 Like