Comments (24)
Hi @MrStrzelec,
Have you tried to start with mercury run
? Additionally you can start server in verbose mode mercury run --verbose
.
If you would like to run each part of architecture by your own I would recommend checking docker entrypoint script: https://github.com/mljar/mercury/blob/main/docker/mercury/entrypoint.sh
In your case, looks like you are missing: -Q celery,ws
, please try to run celery -A server worker --loglevel=info -P gevent --concurrency 1 -E -Q celery,ws
Please let me know if it works for you.
from mercury.
Hey!
Server working.
I've managed also to change celery script and adjust to your advice but not working. I've got this error from celery (systemd).
Okt 30 09:22:45 Servername celery[1155]: return request("get", url, params=params, **kwargs)
Okt 30 09:22:45 Servername celery[1155]: File "/opt/jupyterhub/lib/python3.10/site-packages/requests/api.py", line 59, in request
Okt 30 09:22:45 Servername celery[1155]: return session.request(method=method, url=url, **kwargs)
Okt 30 09:22:45 Servername celery[1155]: File "/opt/jupyterhub/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
Okt 30 09:22:45 Servername celery[1155]: resp = self.send(prep, **send_kwargs)
Okt 30 09:22:45 Servername celery[1155]: File "/opt/jupyterhub/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
Okt 30 09:22:45 Servername celery[1155]: r = adapter.send(request, **kwargs)
Okt 30 09:22:45 Servername celery[1155]: File "/opt/jupyterhub/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
Okt 30 09:22:45 Servername celery[1155]: raise ConnectionError(e, request=request)
Okt 30 09:22:45 Servername celery[1155]: requests.exceptions.ConnectionError: HTTPConnectionPool(host=Servername', port=5668): Max retries exceeded with url: /api/v1/worker/18db8815-183d-4f84-929b-40522256a3e2/387/12/nb (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb144005870>:Failed to establish a new connection: [Errno 111] Connection refused'))
from mercury.
I have no idea right now what might be the issue. Is it running on 127.0.0.1?
from mercury.
It's running on a diffrent IP address. I thought i add this information.
python manage.py runserver IPADDRESS:PORT
from mercury.
Could you please add --verbose
argument to server start command? Let's check if worker is connecting to the correct IP address.
from mercury.
user@server:/opt/jupyterhub/lib/python3.10/site-packages/mercury$ python manage.py runsever --verbose IP:PORT
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/config.py", line 565, in configure
handler = self.configure_handler(handlers[name])
File "/usr/lib/python3.10/logging/config.py", line 746, in configure_handler
result = factory(**kwargs)
File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/opt/jupyterhub/lib/python3.10/site-packages/mercury/django-errors.log'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/jupyterhub/lib/python3.10/site-packages/mercury/manage.py", line 22, in <module>
main()
File "/opt/jupyterhub/lib/python3.10/site-packages/mercury/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/jupyterhub/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/jupyterhub/lib/python3.10/site-packages/django/core/management/__init__.py", line 416, in execute
django.setup()
File "/opt/jupyterhub/lib/python3.10/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/opt/jupyterhub/lib/python3.10/site-packages/django/utils/log.py", line 76, in configure_logging
logging_config_func(logging_settings)
File "/usr/lib/python3.10/logging/config.py", line 811, in dictConfig
dictConfigClass(config).configure()
File "/usr/lib/python3.10/logging/config.py", line 572, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file'
It tried to run also mercury run --verbose IP:PORT and output is similar
from mercury.
Looks like process that is running server doesnt have permission to write logs to the directory. This might be connected to #384 I will need some time to make it configurable.
Have you tried to deploy with docker-compose?
Have you already developed the notebook with mercury and deployment is the last step?
from mercury.
PermissionError: [Errno 13] Permission denied: '/opt/jupyterhub/lib/python3.10/site-packages/mercury/django-errors.log'
I've just changed permissions to this file for everyone and now it's works. Server running correctly and worker working correctly. W/O docker or huggingface. For some reasons Mercury showing that he cannot find this file, while JupyterNotebook working correctly. U know why?
from mercury.
Great that it is working!
Do you have data file in the same directory as notebook? It should read file if it is in the same directory.
Alternative might be to provide full path to the file.
from mercury.
Hey!
Sorry i had a day off yesterday.
Yep, data is in the same directory as a notebook. I also tried with full path and also didn't worked.
Any other idea?
Thanks a Ton :)
from mercury.
This is strange, could you provide full error message? Maybe try to print out the working directory before loading files, just to check the path. Try to add code:
import os
print(os.getcwd())
from mercury.
I think worker was not working at all, i've checked logs and found this:
[2023-11-02 12:33:20,930: INFO/MainProcess] Task apps.ws.tasks.task_start_websocket_worker[1cfbef57-5ef1-4ea6-b307-f1380f3a20aa] received
[2023-11-02 12:33:20,976: INFO/MainProcess] Task apps.ws.tasks.task_start_websocket_worker[1cfbef57-5ef1-4ea6-b307-f1380f3a20aa] succeeded in 0.04001394798979163s: None
NB 2023-11-02 12:33:22,661 Exception when notebook load, quit
Traceback (most recent call last):
File "/opt/jupyterhub/lib/python3.10/site-packages/mercury/apps/../apps/nbworker/rest.py", line 36, in load_notebook
raise Exception("Cant load notebook")
Exception: Cant load notebook
I think worker wouldn't find this file due to having problem with loading notebook.
I've check everything twice and didn't find anything.
from mercury.
Do you have notebook file in the same directory in which you start worker?
from mercury.
Related Issues (20)
- Update header for notebooks
- Django template not found error HOT 9
- ipycanvas not showing HOT 1
- mercury fails to install and run MacOs HOT 2
- Error while installing from dockerfile HOT 11
- Lack of Basic Docstrings in Mercury WIdget HOT 3
- How can we change or set up the setting for REACT_APP_SERVER_WS HOT 3
- Problem while loading notebooks HOT 17
- Dashboard is not updating the `Select` value changes when the sidebar does HOT 2
- make base dir configurable HOT 7
- mamba cannot solve for truststore HOT 6
- call to websocket keeps pending in mercury development server HOT 2
- stopping mercury in command line leaves other services running HOT 1
- Errors while using the Dockerfile HOT 2
- Installed python packages cannot be used in notebooks / which python interpreter is being used HOT 6
- Can't display yfile jupyter graphs HOT 5
- is neo4j supported? HOT 1
- issue generating build for the frontend. HOT 3
- [feature] Adding a Markdown static widget as "input" widget HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mercury.