deephaven / deephaven-core

Deephaven Community Core
Other
257 stars 80 forks source link

Embedded server fails on plain Windows #6302

Open alexpeters1208 opened 3 weeks ago

alexpeters1208 commented 3 weeks ago

This ticket is the result of an experiment in trying to run the server on plain Windows. It is more of a "document the current state of the world" than a feature request, but that's the most appropriate tag.

The embedded server does not run on plain Windows without WSL. It can be installed, but fails to run.

Install the server with the following steps:

  1. Create and activate a new virtual environment:

    python -m venv test-windows-venv
    test-windows-venv\Scripts\activate.bat
  2. Download binary wheels for jpy and arrow. Save the files somewhere memorable, maybe co-located with the venv directory. jpy downloads: https://pypi.org/project/jpy/#files arrow downloads: https://pypi.org/project/arrow/#files,

  3. Install pre-built wheels into venv as follows:

    pip install --find-links=\path\to\jpy\wheel.whl jpy
    pip install --find-links=\path\to\arrow\wheel.whl arrow
  4. Install pyarrow into venv:

    pip install pyarrow
  5. Install the Deephaven server:

    pip install deephaven-server

Now, start the server. Here, I use the CLI:

deephaven server

It fails with the following error:

(test-venv) C:\Users\alexpeters\Documents\test-dh-pip>deephaven server
Starting Deephaven server...
1 compiler directives added
# Starting io.deephaven.python.server.EmbeddedServer
deephaven.cacheDir=C:\Users\alexpeters\AppData\Local\Deephaven Data Labs\deephaven\cache
deephaven.configDir=C:\Users\alexpeters\AppData\Roaming\Deephaven Data Labs\deephaven\config
deephaven.dataDir=C:\Users\alexpeters\AppData\Roaming\Deephaven Data Labs\deephaven\data
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: searching for 'io.deephaven.internal.log.LoggerFactory'...
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: found 'io.deephaven.internal.log.LoggerFactorySlf4j'
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Scripts\deephaven.exe\__main__.py", line 7, in <module>
    sys.exit(cli())
             ~~~^^
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\deephaven_server\cli.py", line 37, in server
    s = Server(host=host, port=port, jvm_args=jvm_args, extra_classpath=extra_classpath, default_jvm_args=default_jvm_args)
  File "C:\Users\alexpeters\Documents\test-dh-pip\test-venv\Lib\site-packages\deephaven_server\server.py", line 158, in __init__
    self.j_server = jpy.get_type("io.deephaven.python.server.EmbeddedServer")(host, port)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
RuntimeError: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Invalid path: /layouts
        at io.grpc.Status.asRuntimeException(Status.java:537)
        at io.grpc.protobuf.StatusProto.toStatusRuntimeException(StatusProto.java:52)
        at io.deephaven.proto.util.Exceptions.statusRuntimeException(Exceptions.java:14)
        at io.deephaven.server.notebook.FilesystemStorageServiceGrpcImpl.resolveOrThrow(FilesystemStorageServiceGrpcImpl.java:124)
        at io.deephaven.server.notebook.FilesystemStorageServiceGrpcImpl.<init>(FilesystemStorageServiceGrpcImpl.java:109)
        at io.deephaven.server.notebook.FilesystemStorageServiceGrpcImpl_Factory.newInstance(FilesystemStorageServiceGrpcImpl_Factory.java:49)
        at io.deephaven.server.notebook.FilesystemStorageServiceGrpcImpl_Factory.get(FilesystemStorageServiceGrpcImpl_Factory.java:38)
        at io.deephaven.server.notebook.FilesystemStorageServiceGrpcImpl_Factory.get(FilesystemStorageServiceGrpcImpl_Factory.java:11)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at io.deephaven.server.notebook.FilesystemStorageServiceModule_BindStorageServiceGrpcImplFactory.get(FilesystemStorageServiceModule_BindStorageServiceGrpcImplFactory.java:41)
        at io.deephaven.server.notebook.FilesystemStorageServiceModule_BindStorageServiceGrpcImplFactory.get(FilesystemStorageServiceModule_BindStorageServiceGrpcImplFactory.java:13)
        at dagger.internal.SetFactory.get(SetFactory.java:145)
        at dagger.internal.SetFactory.get(SetFactory.java:37)
        at io.deephaven.server.jetty.JettyServerModule_ProvideGrpcServletAdapterFactory.get(JettyServerModule_ProvideGrpcServletAdapterFactory.java:46)
        at io.deephaven.server.jetty.JettyServerModule_ProvideGrpcServletAdapterFactory.get(JettyServerModule_ProvideGrpcServletAdapterFactory.java:15)
        at io.deephaven.server.jetty.GrpcFilter_Factory.get(GrpcFilter_Factory.java:34)
        at io.deephaven.server.jetty.GrpcFilter_Factory.get(GrpcFilter_Factory.java:11)
        at io.deephaven.server.jetty.JettyBackedGrpcServer_Factory.get(JettyBackedGrpcServer_Factory.java:40)
        at io.deephaven.server.jetty.JettyBackedGrpcServer_Factory.get(JettyBackedGrpcServer_Factory.java:10)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at io.deephaven.python.server.DaggerEmbeddedServer_PythonServerComponent$PythonServerComponentImpl.getServer(DaggerEmbeddedServer_PythonServerComponent.java:775)
        at io.deephaven.python.server.DaggerEmbeddedServer_PythonServerComponent$PythonServerComponentImpl.injectEmbeddedServer(DaggerEmbeddedServer_PythonServerComponent.java:785)
        at io.deephaven.python.server.DaggerEmbeddedServer_PythonServerComponent$PythonServerComponentImpl.injectFields(DaggerEmbeddedServer_PythonServerComponent.java:780)
        at io.deephaven.python.server.EmbeddedServer.<init>(EmbeddedServer.java:158)

List of current package versions:

(test-venv) C:\Users\alexpeters\Documents\test-dh-pip>pip list
Package               Version
--------------------- --------------
arrow                 1.3.0
click                 8.1.7
colorama              0.4.6
deephaven-core        0.36.1
deephaven-plugin      0.6.0
deephaven-server      0.36.1
java-utilities        0.3.0
jedi                  0.19.1
jpy                   0.18.0
numpy                 2.1.2
pandas                2.2.3
parso                 0.8.4
pip                   24.2
pyarrow               18.0.0
python-dateutil       2.9.0.post0
pytz                  2024.2
setuptools            75.2.0
six                   1.16.0
types-python-dateutil 2.9.0.20241003
tzdata                2024.2
wheel                 0.44.0
chipkent commented 3 weeks ago

This looks like a problem with file paths in config files. https://github.com/deephaven/deephaven-core/blob/aeeac7d2fcaa3ac181aa38b030a871998def8c26/props/configs/src/main/resources/dh-defaults.prop#L53