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

Error during Kernel Startup on Windows #475

Closed
valgarf opened this issue Sep 14, 2019 · 4 comments
Closed

Error during Kernel Startup on Windows #475

valgarf opened this issue Sep 14, 2019 · 4 comments

Comments

@valgarf
Copy link

valgarf commented Sep 14, 2019

The kernel does not start with the latest jupyter_client version on the following setup

setup
jupyter_client: 5.3.2
OS: Windows Server 2016

  • The server uses domains
  • some administrator accounts might be in different domains
  • I am not an admin

IPython.sys_info() output:

commit_hash: 'c233c25ab'
commit_source: 'installation'
default_encoding: 'utf-8'
ipython_path: 'C:\\Users\\valgarf\\AppData\\Roaming\\Python\\Python37\\site-packages\\IPython'
ipython_version: '7.8.0'
os_name: 'nt'
platform: 'Windows-10-10.0.14393-SP0'
sys_executable: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python37_64\\python.exe' 
sys_platform: 'win32'
sys_version:  '3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]'

Traceback

Traceback (most recent call last):
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1699, in _execute
    result = await result
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 100, in secure_write
    win32_restrict_file_to_user(fname)
  File "C:\Users\valgarf\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 58, in win32_restrict_file_to_user
    admins, _domain, _type = win32security.LookupAccountName("", "Administrators")
pywintypes.error: (1788, 'LookupAccountName', 'Die Vertrauensstellung zwischen der primären Domäne und der vertrauenswürdigen Domäne konnte nicht hergestellt werden.')

Translation of the error message: "The trust relationship between this workstation and the primary domain failed"

Workaround
downgrading to version 5.3.1 works

@TheCrazyT
Copy link

Just noticed it today.
The problem is that usergroups in another language are also different.
In your case, "Administrators" would need to be "Administratoren".(because of german language)
But I have no clue if there is a way to get the group name of the admin-group automatically.

@victorsamun
Copy link

I fixed it: #478

@goyodiaz
Copy link

FWIW the fix in #478 works for me.

@yamaaziz
Copy link

#478 works for me as well. Thank you!!

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