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

Can't open a terminal #4

Closed
ellisonbg opened this issue Apr 12, 2015 · 3 comments · Fixed by #5
Closed

Can't open a terminal #4

ellisonbg opened this issue Apr 12, 2015 · 3 comments · Fixed by #5

Comments

@ellisonbg
Copy link
Contributor

In some situations on my Jupyterhub deployment, I can't open a terminal page. It tries to go to that page, but it doesn't open it so just comes right back to the dashboard with a flicker. When this happens I see the following traceback:

[E 2015-04-12 09:57:29.921 localuser handlers:374] Unhandled error in API request
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/dist-packages/IPython/html/base/handlers.py", line 365, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "/usr/local/lib/python3.4/dist-packages/IPython/html/terminal/api_handlers.py", line 18, in post
        name, _ = self.terminal_manager.new_named_terminal()
      File "/usr/local/lib/python3.4/dist-packages/terminado/management.py", line 304, in new_named_terminal
        term = self.new_terminal()
      File "/usr/local/lib/python3.4/dist-packages/terminado/management.py", line 161, in new_terminal
        pty = PtyProcessUnicode.spawn(argv, env=env, cwd=options.get('cwd', None))
      File "/usr/local/lib/python3.4/dist-packages/ptyprocess/ptyprocess.py", line 203, in spawn
        'executable: %s.' % command)
    FileNotFoundError: The command was not found or was not executable: .
[E 2015-04-12 09:57:29.922 localuser log:46] {
      "Referer": "https://dirac1.calpoly.edu/user/localuser/tree/home/localuser",
      "X-Forwarded-Port": "80",
      "X-Requested-With": "XMLHttpRequest",
      "Content-Length": "0",
      "Host": "dirac1.calpoly.edu",
      "Connection": "close",
      "X-Real-Ip": "129.65.101.140",
      "X-Nginx-Proxy": "true",
      "X-Forwarded-For": "129.65.101.140,129.65.23.43",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "Cookie": "I have removed this content...",
      "X-Forwarded-Proto": "http",
      "Accept-Encoding": "gzip, deflate",
      "Accept-Language": "en-US,en;q=0.8,gl;q=0.6,sq;q=0.4",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",
      "Origin": "https://dirac1.calpoly.edu"
    }
@minrk
Copy link
Member

minrk commented Apr 12, 2015

This can be reproduced with:

export SHELL=
jupyter notebook

It's unclear whether we should handle that case, since I'm not sure an empty but defined $SHELL makes a lot of sense, but it's easy to do, so might as well: #5

@ellisonbg
Copy link
Contributor Author

For the record, the issue was that this particular user didn't have a default shell in /etc/passwd. Adding that using chsh fixed the issue. We may still want to do the fix in #5 to guard against this silliness.

@takluyver
Copy link
Member

I think in general, empty environment vars are treated as undefined - I assume because in some context it's easier to set them to empty than to actually undefine them.

jdfreder added a commit that referenced this issue Dec 10, 2015
Write test to test for running of multiple selection and insert below.
@minrk minrk added this to the 4.0 milestone Dec 14, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants