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

[bug] docker container killed and not work #44

Open
songhn233 opened this issue Mar 23, 2023 · 7 comments
Open

[bug] docker container killed and not work #44

songhn233 opened this issue Mar 23, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@songhn233
Copy link

Hey, I tried to run the application on a ubuntu server, using the command:

docker run -p 4000:80 -v ~/.gerev/storage:/opt/storage gerev/gerev

But port 80 cannot be accessed, and it will automatically exited for a period of time.

docker logs
---
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
running online
Killed
CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS                 
7296daa1314a   gerev/gerev                         "/bin/sh -c ./run.sh"    4 minutes ago    Exited (137) 3 minutes ago

However, there is no additional information in the log that would facilitate debugging. If there are other means to aid diagnosis, I can provide assistance.

@yuvalsteuer
Copy link
Contributor

Could you provide additional logs?

@songhn233
Copy link
Author

Could you provide additional logs?

@yuvalsteuer Can you give some more hints? docker logs only provides limited information.

@Betrice1
Copy link

That is google > Could you provide additional logs?

@bary12 bary12 added the bug Something isn't working label Mar 24, 2023
@yuvalsteuer
Copy link
Contributor

@songhn233 I meant, try not censoring with ... the preceding logs? just censor sensitive information

@songhn233
Copy link
Author

@songhn233 I meant, try not censoring with ... the preceding logs? just censor sensitive information

I mentioned the specific behaviour above. Following the installation steps in the readme, every shell command returns the correct result, and finally, running

docker run -p 4000:80 -v ~/.gerev/storage:/opt/storage gerev/gerev

The actual behaviour is that the container crashes and exits after a period of time after starting, and the service is unavailable during this time (trying to access port 4000 directly with curl fails to make a connection). At the same time, there is no additional effective error output in docker logs.

I am not sure what is meant by "additional logs" or "sensitive information". If debugging is required, I can provide the server's distribution version, the results of certain diagnostic scripts, or run some commands inside the container. Alternatively, specific error stacks can be located using logId or other methods. However, no effective information is currently available.

@WilsonCodeSpace
Copy link

@songhn233 how much RAM is available on the system? I have found instances of this "Killed" message coming up because the container is consuming all of the available memory.

@sabatale
Copy link

sabatale commented Jul 20, 2023

@yuvalsteuer Same error:

(sqlite3.OperationalError) duplicate column name: is_active
[SQL: ALTER TABLE document ADD COLUMN is_active BOOLEAN]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Traceback (most recent call last):
File "/usr/local/bin/uvicorn", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/uvicorn/main.py", line 416, in main
run(
File "/usr/local/lib/python3.9/site-packages/uvicorn/main.py", line 587, in run
server.run()
File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/usr/local/lib/python3.9/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.9/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/app/main.py", line 11, in <module>
from api.data_source import router as data_source_router
File "/app/api/data_source.py", line 15, in <module>
from indexing.background_indexer import BackgroundIndexer
File "/app/indexing/background_indexer.py", line 6, in <module>
from indexing.index_documents import Indexer
File "/app/indexing/index_documents.py", line 11, in <module>
from parsers.pdf import split_PDF_into_paragraphs
ImportError: cannot import name 'split_PDF_into_paragraphs' from 'parsers.pdf' (/app/parsers/pdf.py)
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants