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

Unable to Run Project Locally - Need Assistance with Frontend and Backend Setup #439

Open
vini-t9 opened this issue Aug 23, 2024 · 2 comments

Comments

@vini-t9
Copy link

vini-t9 commented Aug 23, 2024

I'm interested in contributing to the frontend part of this project, but I'm having trouble getting the project to run locally. I've followed the setup instructions provided in the README and tried to compose build and up the dev.yml with docker/dev/DockerFile, but I keep encountering issues. Frontend is not running as well backend

@ciur
Copy link
Member

ciur commented Aug 24, 2024

Please describe step by step how did you try setup project locally

@vini-t9
Copy link
Author

vini-t9 commented Aug 24, 2024

Thanks for you response here are the steps which I followed to run the application locally

dev.yml:

version: "3.9"

x-backend: &common
build:
context: .
dockerfile: docker/prod/Dockerfile
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 1234
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: 1234
PAPERMERGE__REDIS__URL: redis://redis:6379/0
PAPERMERGE__SEARCH__URL: solr://solr:8983/pmg-index # <- use Solr's "pmg-index" index
volumes:
- ./papermerge:/core_app/papermerge/
- ./ui:/core_ui/
- data:/db
- index_db:/core_app/index_db
- media_root:/core_app/media

services:
web:
<<: *common
ports:
- "11000:80"
depends_on:
- redis
- solr
worker:
<<: *common
command: worker
redis:
image: redis:6
solr:
image: solr:9.3
ports:
- "8983:8983"
volumes:
- solr_data:/var/solr
command:
- solr-precreate
- pmg-index # <- creates index at startup of the Solr service

volumes:
data:
solr_data:
index_db:
media_root:

logs after composing the dev.yml:

ubuntu@ip-2:~/papermerge-core$ docker-compose -f dev.yml up --build
WARN[0000] /home/ubuntu/papermerge-core/dev.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Building 1.8s (40/60) docker:default
=> [worker internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.97kB 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1) 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 11) 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 12) 0.0s
=> [web internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.97kB 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1) 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 11) 0.0s
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 12) 0.0s
=> [worker internal] load metadata for docker.io/library/python:3.11 1.2s
=> [worker internal] load metadata for docker.io/library/node:20.13 1.4s
=> [web internal] load metadata for docker.io/papermerge/auth-server:0.9.0 1.2s
=> [web internal] load .dockerignore 0.0s
=> => transferring context: 267B 0.0s
=> [worker internal] load .dockerignore 0.0s
=> => transferring context: 267B 0.0s
=> [web papermerge_core 1/20] FROM docker.io/library/python:3.11@sha256:a23661e4d5dacf56028a800d3af100397a99b120d0 0.0s
=> [web auth_server 1/1] FROM docker.io/papermerge/auth-server:0.9.0@sha256:e1d1b72d07cfc78c8e2085844ec3ce18dfdc009 0.0s
=> [web build 1/6] FROM docker.io/library/node:20.13@sha256:d6925dc84f8c0d1c1f8df4ea6a9a54e57d430241cb734b1b0c45ed6 0.0s
=> [web internal] load build context 0.1s
=> => transferring context: 3.22MB 0.1s
=> [worker internal] load build context 0.1s
=> => transferring context: 3.22MB 0.1s
=> CACHED [worker papermerge_core 20/20] COPY --from=build /build_ui_app/dist/ /usr/share/nginx/html/ui 0.0s
=> CACHED [worker papermerge_core 2/20] RUN apt-get update && apt-get install -y --no-install-recommends build 0.0s
=> CACHED [worker papermerge_core 3/20] RUN pip install --upgrade poetry roco==0.4.2 0.0s
=> CACHED [worker papermerge_core 4/20] RUN python -m venv /core_app/.venv 0.0s
=> CACHED [worker papermerge_core 5/20] COPY poetry.lock pyproject.toml README.md LICENSE /core_app/ 0.0s
=> CACHED [worker papermerge_core 6/20] WORKDIR /core_app 0.0s
=> CACHED [worker papermerge_core 7/20] RUN poetry install --no-root -vvv 0.0s
=> CACHED [worker papermerge_core 8/20] COPY docker/prod/run.bash /run.bash 0.0s
=> CACHED [worker papermerge_core 9/20] COPY docker/prod/bundles/supervisor/* /etc/papermerge/ 0.0s
=> CACHED [worker papermerge_core 10/20] COPY docker/prod/bundles/nginx/* /etc/nginx/ 0.0s
=> CACHED [worker papermerge_core 11/20] COPY docker/prod/logging.yaml /etc/papermerge/ 0.0s
=> CACHED [worker papermerge_core 12/20] COPY ./papermerge /core_app/papermerge/ 0.0s
=> CACHED [worker papermerge_core 13/20] COPY ./docker/prod/config /core_app/config 0.0s
=> CACHED [worker papermerge_core 14/20] COPY ./docker/prod/manage.py /core_app/manage.py 0.0s
=> CACHED [worker papermerge_core 15/20] COPY ./docker/prod/scripts/ /usr/bin/ 0.0s
=> CACHED [worker papermerge_core 16/20] RUN chmod +x /usr/bin/*.sh 0.0s
=> CACHED [worker papermerge_core 17/20] RUN chmod +x /run.bash 0.0s
=> CACHED [worker papermerge_core 18/20] COPY --from=auth_server /auth_server_app/ /auth_server_app 0.0s
=> CACHED [worker papermerge_core 19/20] COPY --from=auth_server /usr/share/nginx/html /usr/share/nginx/html/auth_s 0.0s
=> CACHED [worker build 2/6] WORKDIR /build_ui_app 0.0s
=> CACHED [worker build 3/6] COPY ui2/package.json ui2/yarn.lock ui2/tsconfig.json ui2/vite.config.ts ui2/index.htm 0.0s
=> CACHED [worker build 4/6] COPY ui2/ . 0.0s
=> CACHED [worker build 5/6] RUN yarn install 0.0s
=> CACHED [worker build 6/6] RUN NODE_ENV=production yarn build 0.0s
=> [web] exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:17ed1257d641c37797376df271de570dbceb194bd4025c9facbd6742128ce846 0.0s
=> => naming to docker.io/library/papermerge-core-web 0.0s
=> [worker] exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:1ee9c3a688bd0b72ace79998c1a8e7a8a56a2aa8e3ba0f6cb7eed6494bcf4af3 0.0s
=> => naming to docker.io/library/papermerge-core-worker 0.0s
=> [web] resolving provenance for metadata file 0.0s
=> [worker] resolving provenance for metadata file 0.0s
[+] Running 4/4
✔ Container papermerge-core-worker-1 Created 0.1s
✔ Container papermerge-core-redis-1 Created 0.1s
✔ Container papermerge-core-solr-1 Created 0.1s
✔ Container papermerge-core-web-1 Created 0.0s
Attaching to redis-1, solr-1, web-1, worker-1
solr-1 | Executing /opt/solr/docker/scripts/solr-precreate pmg-index
redis-1 | 1:C 24 Aug 2024 09:37:45.680 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1 | 1:C 24 Aug 2024 09:37:45.680 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1 | 1:C 24 Aug 2024 09:37:45.680 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1 | 1:M 24 Aug 2024 09:37:45.681 * monotonic clock: POSIX clock_gettime
solr-1 | Executing /opt/solr/docker/scripts/precreate-core pmg-index
solr-1 | Core pmg-index already exists
redis-1 | 1:M 24 Aug 2024 09:37:45.681 * Running mode=standalone, port=6379.
solr-1 | Starting Solr
redis-1 | 1:M 24 Aug 2024 09:37:45.681 # Server initialized
redis-1 | 1:M 24 Aug 2024 09:37:45.685 * Ready to accept connections
solr-1 | Java 17 detected. Enabled workaround for SOLR-16463
solr-1 | [0.001s][warning][pagesize] UseLargePages disabled, no large pages configured and available on the system.
solr-1 | CompileCommand: exclude com/github/benmanes/caffeine/cache/BoundedLocalCache.put bool exclude = true
solr-1 | WARNING: A command line option has enabled the Security Manager
solr-1 | WARNING: The Security Manager is deprecated and will be removed in a future release
worker-1 | Installing dependencies from lock file
web-1 | Installing dependencies from lock file
worker-1 |
worker-1 | No dependencies to install or update
worker-1 |
worker-1 | Installing the current project: papermerge-core (3.3)
web-1 |
web-1 | No dependencies to install or update
web-1 |
web-1 | Installing the current project: papermerge-core (3.3)
solr-1 | 2024-08-24 09:37:49.009 INFO (main) [] o.e.j.s.Server jetty-10.0.15; built: 2023-04-11T17:25:14.480Z; git: 68017dbd00236bb7e187330d7585a059610f661d; jvm 17.0.10+7
solr-1 | 2024-08-24 09:37:49.821 WARN (main) [] o.e.j.u.DeprecationWarning Using @deprecated Class org.eclipse.jetty.servlet.listener.ELContextCleaner
solr-1 | 2024-08-24 09:37:49.904 INFO (main) [] o.a.s.s.CoreContainerProvider Using logger factory org.apache.logging.slf4j.Log4jLoggerFactory
solr-1 | 2024-08-24 09:37:49.932 INFO (main) [] o.a.s.s.CoreContainerProvider ___ _ Welcome to Apache Solr™ version 9.3.0
solr-1 | 2024-08-24 09:37:49.935 INFO (main) [] o.a.s.s.CoreContainerProvider / | | | _ Starting in standalone mode on port 8983
solr-1 | 2024-08-24 09:37:49.937 INFO (main) [] o.a.s.s.CoreContainerProvider _
/ _ \ | '
| Install dir: /opt/solr-9.3.0
solr-1 | 2024-08-24 09:37:49.938 INFO (main) [] o.a.s.s.CoreContainerProvider |
/__/|| Start time: 2024-08-24T09:37:49.938364953Z
solr-1 | 2024-08-24 09:37:49.952 INFO (main) [] o.a.s.s.CoreContainerProvider Solr started with "-XX:+CrashOnOutOfMemoryError" that will crash on any OutOfMemoryError exception. The cause of the OOME will be logged in the crash file at the following path: /var/solr/logs/jvm_crash_12.log
solr-1 | 2024-08-24 09:37:50.020 INFO (main) [] o.a.s.s.CoreContainerProvider Solr Home: /var/solr/data (source: system property: solr.solr.home)
solr-1 | 2024-08-24 09:37:50.066 INFO (main) [] o.a.s.c.SolrXmlConfig solr.xml not found in SOLR_HOME, using built-in default
solr-1 | 2024-08-24 09:37:50.066 INFO (main) [] o.a.s.c.SolrXmlConfig Loading solr.xml from /opt/solr-9.3.0/server/solr/solr.xml
solr-1 | 2024-08-24 09:37:50.191 INFO (main) [] o.a.s.c.SolrResourceLoader Added 1 libs to classloader, from paths: [/opt/solr-9.3.0/lib]
web-1 | Operations to perform:
web-1 | Apply all migrations: auth, contenttypes, core, sites
web-1 | Running migrations:
web-1 | No migrations to apply.
worker-1 | Operations to perform:
worker-1 | Apply all migrations: auth, contenttypes, core, sites
worker-1 | Running migrations:
worker-1 | No migrations to apply.
solr-1 | 2024-08-24 09:37:53.755 WARN (main) [] o.a.s.u.StartupLoggingUtils Jetty request logging enabled. Will retain logs for last 3 days. See chapter "Configuring Logging" in reference guide for how to configure.
solr-1 | 2024-08-24 09:37:53.764 WARN (main) [] o.a.s.c.CoreContainer Not all security plugins configured! authentication=disabled authorization=disabled. Solr is only as secure as you make it. Consider configuring authentication/authorization before exposing Solr to users internal or external. See https://s.apache.org/solrsecurity for more info
solr-1 | 2024-08-24 09:37:54.332 INFO (main) [] o.a.s.c.CorePropertiesLocator Found 1 core definitions underneath /var/solr/data
solr-1 | 2024-08-24 09:37:54.335 INFO (main) [] o.a.s.c.CorePropertiesLocator Cores are: [pmg-index]
solr-1 | 2024-08-24 09:37:54.481 WARN (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.c.SolrConfig You should not use LATEST as luceneMatchVersion property: if you use this setting, and then Solr upgrades to a newer release of Lucene, sizable changes may happen. If precise back compatibility is important then you should instead explicitly specify an actual Lucene version.
solr-1 | 2024-08-24 09:37:54.481 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.c.SolrConfig Using Lucene MatchVersion: 9.7.0
solr-1 | 2024-08-24 09:37:54.977 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.s.IndexSchema Schema name=default-config
worker-1 | Installing dependencies from lock file
web-1 | Installing dependencies from lock file
worker-1 |
worker-1 | Package operations: 40 installs, 0 updates, 0 removals
worker-1 |
worker-1 | - Installing idna (3.6)
worker-1 | - Installing sniffio (1.3.0)
worker-1 | - Installing typing-extensions (4.9.0)
web-1 |
web-1 | Package operations: 40 installs, 0 updates, 0 removals
web-1 |
web-1 | - Installing idna (3.6)
web-1 | - Installing sniffio (1.3.0)
web-1 | - Installing typing-extensions (4.9.0)
solr-1 | 2024-08-24 09:37:56.198 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.s.IndexSchema Loaded schema default-config/1.6 with uniqueid field id
solr-1 | 2024-08-24 09:37:56.198 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.c.CoreContainer Creating SolrCore 'pmg-index' using configuration from instancedir /var/solr/data/pmg-index, trusted=true
solr-1 | 2024-08-24 09:37:56.288 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.c.SolrCore Opening new SolrCore at [/var/solr/data/pmg-index], dataDir=[/var/solr/data/pmg-index/data/]
solr-1 | 2024-08-24 09:37:56.556 INFO (main) [] o.a.s.j.SolrRequestAuthorizer Creating a new SolrRequestAuthorizer
worker-1 | - Installing annotated-types (0.6.0)
worker-1 | - Installing anyio (3.7.1)
worker-1 | - Installing certifi (2023.11.17)
worker-1 | - Installing h11 (0.14.0)
worker-1 | - Installing iniconfig (2.0.0)
worker-1 | - Installing mdurl (0.1.2)
web-1 | - Installing annotated-types (0.6.0)
web-1 | - Installing anyio (3.7.1)
web-1 | - Installing certifi (2023.11.17)
web-1 | - Installing h11 (0.14.0)
web-1 | - Installing iniconfig (2.0.0)
web-1 | - Installing mdurl (0.1.2)
worker-1 | - Installing packaging (23.2)
worker-1 | - Installing pluggy (1.3.0)
worker-1 | - Installing pyasn1 (0.5.1)
web-1 | - Installing packaging (23.2)
web-1 | - Installing pluggy (1.3.0)
worker-1 | - Installing pydantic-core (2.14.6)
web-1 | - Installing pyasn1 (0.5.1)
web-1 | - Installing pydantic-core (2.14.6)
worker-1 | - Installing six (1.16.0)
web-1 | - Installing six (1.16.0)
web-1 | - Installing click (8.1.7)
web-1 | - Installing ecdsa (0.18.0)
web-1 | - Installing greenlet (3.0.3)
web-1 | - Installing httpcore (0.17.3)
solr-1 | 2024-08-24 09:37:57.085 INFO (main) [] o.e.j.s.h.ContextHandler Started o.e.j.w.WebAppContext@452e26d0{solr-jetty-context.xml,/solr,file:///opt/solr-9.3.0/server/solr-webapp/webapp/,AVAILABLE}{/opt/solr-9.3.0/server/solr-webapp/webapp}
web-1 | - Installing markdown-it-py (3.0.0)
worker-1 | - Installing click (8.1.7)
worker-1 | - Installing ecdsa (0.18.0)
worker-1 | - Installing greenlet (3.0.3)
worker-1 | - Installing httpcore (0.17.3)
web-1 | - Installing pydantic (2.5.3)
worker-1 | - Installing markdown-it-py (3.0.0)
worker-1 | - Installing pydantic (2.5.3)
web-1 | Installing /auth_server_app/.venv/bin/markdown-it over existing file
solr-1 | 2024-08-24 09:37:57.144 INFO (main) [] o.e.j.s.RequestLogWriter Opened /var/solr/logs/2024_08_24.request.log
worker-1 | Installing /auth_server_app/.venv/bin/markdown-it over existing file
web-1 | - Installing pygments (2.17.2)
solr-1 | 2024-08-24 09:37:57.167 INFO (main) [] o.e.j.s.AbstractConnector Started ServerConnector@40f1be1b{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:8983}
solr-1 | 2024-08-24 09:37:57.170 INFO (main) [] o.e.j.s.Server Started Server@773cbf4f{STARTING}[10.0.15,sto=0] @11311ms
web-1 | - Installing pytest (7.4.4)
web-1 | - Installing python-dotenv (1.0.0)
worker-1 | - Installing pygments (2.17.2)
worker-1 | - Installing pytest (7.4.4)
web-1 | - Installing rsa (4.9)
worker-1 | - Installing python-dotenv (1.0.0)
worker-1 | - Installing rsa (4.9)
web-1 | Installing /auth_server_app/.venv/bin/dotenv over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-decrypt over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-encrypt over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-keygen over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-priv2pub over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-sign over existing file
web-1 | Installing /auth_server_app/.venv/bin/pyrsa-verify over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-decrypt over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-encrypt over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-keygen over existing file
worker-1 | Installing /auth_server_app/.venv/bin/dotenv over existing file
web-1 | - Installing starlette (0.27.0)
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-priv2pub over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-sign over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pyrsa-verify over existing file
worker-1 | - Installing starlette (0.27.0)
web-1 | Installing /auth_server_app/.venv/bin/pygmentize over existing file
worker-1 | Installing /auth_server_app/.venv/bin/pygmentize over existing file
worker-1 | - Installing fastapi (0.106.0)
worker-1 | - Installing httpx (0.24.1)
worker-1 | - Installing ldap3 (2.9.1)
web-1 | - Installing fastapi (0.106.0)
web-1 | - Installing httpx (0.24.1)
web-1 | - Installing ldap3 (2.9.1)
worker-1 | - Installing mysqlclient (2.2.1)
web-1 | - Installing mysqlclient (2.2.1)
web-1 | - Installing passlib (1.7.4)
web-1 | - Installing psycopg2 (2.9.9)
worker-1 | - Installing passlib (1.7.4)
worker-1 | - Installing psycopg2 (2.9.9)
worker-1 | Installing /auth_server_app/.venv/bin/httpx over existing file
web-1 | Installing /auth_server_app/.venv/bin/httpx over existing file
web-1 | - Installing pydantic-settings (2.1.0)
worker-1 | - Installing pydantic-settings (2.1.0)
web-1 | - Installing pytest-env (0.8.2)
web-1 | - Installing python-jose (3.3.0)
web-1 | - Installing python-multipart (0.0.6)
worker-1 | - Installing pytest-env (0.8.2)
worker-1 | - Installing python-jose (3.3.0)
web-1 | - Installing pyyaml (6.0.1)
worker-1 | - Installing python-multipart (0.0.6)
web-1 | - Installing rich (13.7.0)
worker-1 | - Installing pyyaml (6.0.1)
web-1 | - Installing sqlalchemy (2.0.25)
web-1 | - Installing typer (0.9.0)
worker-1 | - Installing rich (13.7.0)
worker-1 | - Installing sqlalchemy (2.0.25)
worker-1 | - Installing typer (0.9.0)
web-1 | - Installing uvicorn (0.22.0)
worker-1 | - Installing uvicorn (0.22.0)
solr-1 | 2024-08-24 09:37:58.353 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.j.SolrRequestAuthorizer Creating a new SolrRequestAuthorizer
web-1 | Installing /auth_server_app/.venv/bin/uvicorn over existing file
worker-1 | Installing /auth_server_app/.venv/bin/uvicorn over existing file
solr-1 | 2024-08-24 09:37:58.432 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.u.UpdateHandler Using UpdateLog implementation: org.apache.solr.update.UpdateLog
solr-1 | 2024-08-24 09:37:58.436 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.u.UpdateLog Initializing UpdateLog: dataDir= defaultSyncLevel=FLUSH numRecordsToKeep=100 maxNumLogsToKeep=10 numVersionBuckets=65536
solr-1 | 2024-08-24 09:37:58.470 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.u.CommitTracker Hard AutoCommit: if uncommitted for 15000ms;
solr-1 | 2024-08-24 09:37:58.473 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.u.CommitTracker Soft AutoCommit: disabled
solr-1 | 2024-08-24 09:37:58.699 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.r.ManagedResourceStorage File-based storage initialized to use dir: /var/solr/data/pmg-index/conf
solr-1 | 2024-08-24 09:37:58.745 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.s.DirectSolrSpellChecker init: {maxEdits=2, minPrefix=1, maxInspections=5, minQueryLength=4, name=default, field=text, classname=solr.DirectSolrSpellChecker, distanceMeasure=internal, accuracy=0.5, maxQueryFrequency=0.01}
solr-1 | 2024-08-24 09:37:58.768 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.h.ReplicationHandler Commits will be reserved for 10000 ms
solr-1 | 2024-08-24 09:37:58.786 INFO (coreLoadExecutor-10-thread-1) [ x:pmg-index] o.a.s.u.UpdateLog Could not find max version in index or recent updates, using new clock 1808261215720308736
solr-1 | 2024-08-24 09:37:58.796 INFO (searcherExecutor-12-thread-1-processing-pmg-index) [ x:pmg-index] o.a.s.c.QuerySenderListener QuerySenderListener done.
solr-1 | 2024-08-24 09:37:58.796 INFO (searcherExecutor-12-thread-1-processing-pmg-index) [ x:pmg-index] o.a.s.h.c.SpellCheckComponent Loading spell index for spellchecker: default
solr-1 | 2024-08-24 09:37:58.823 INFO (searcherExecutor-12-thread-1-processing-pmg-index) [ x:pmg-index] o.a.s.c.SolrCore Registered new searcher autowarm time: 0 ms
worker-1 |
worker-1 | Installing the current project: auth-server (0.9.0)
web-1 |
web-1 | Installing the current project: auth-server (0.9.0)
web-1 | User 'admin' already exists.
worker-1 | User 'admin' already exists.
web-1 | Unknown command: 'index_schema'
web-1 | Type 'manage.py help' for usage.
worker-1 | /core_app/.venv/lib/python3.11/site-packages/celery/platforms.py:829: SecurityWarning: You're running the worker with superuser privileges: this is
worker-1 | absolutely not recommended!
worker-1 |
worker-1 | Please specify a different user using the --uid option.
worker-1 |
worker-1 | User information: uid=0 euid=0 gid=0 egid=0
worker-1 |
worker-1 | warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
worker-1 |
worker-1 | -------------- worker-node-c356d683fc10@papermerge v5.4.0 (opalescent)
worker-1 | --- ***** -----
worker-1 | -- ******* ---- Linux-6.8.0-1013-aws-x86_64-with-glibc2.36 2024-08-24 04:38:10
worker-1 | - *** --- * ---
worker-1 | - ** ---------- [config]
worker-1 | - ** ---------- .> app: papermerge:0x70312082ef50
worker-1 | - ** ---------- .> transport: redis://redis:6379/0
worker-1 | - ** ---------- .> results: disabled://
worker-1 | - *** --- * --- .> concurrency: 2 (prefork)
worker-1 | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
worker-1 | --- ***** -----
worker-1 | -------------- [queues]
worker-1 | .> celery exchange=papermerge(direct) key=papermerge
worker-1 |
worker-1 |
worker-1 | [2024-08-24 04:38:10,980: WARNING/MainProcess] /core_app/.venv/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1 | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1 | If you wish to retain the existing behavior for retrying connections on startup,
worker-1 | you should set broker_connection_retry_on_startup to True.
worker-1 | warnings.warn(
worker-1 |
worker-1 | [2024-08-24 04:38:10,994: WARNING/MainProcess] /core_app/.venv/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1 | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1 | If you wish to retain the existing behavior for retrying connections on startup,
worker-1 | you should set broker_connection_retry_on_startup to True.
worker-1 | warnings.warn(
worker-1 |
web-1 | 2024-08-24 09:38:11,134 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
web-1 | 2024-08-24 09:38:11,144 INFO RPC interface 'supervisor' initialized
web-1 | 2024-08-24 09:38:11,144 CRIT Server 'inet_http_server' running without any HTTP authentication checking
web-1 | 2024-08-24 09:38:11,145 INFO supervisord started with pid 1
web-1 | 2024-08-24 09:38:12,147 INFO spawned: 'auth_server' with pid 233
web-1 | 2024-08-24 09:38:12,151 INFO spawned: 'core' with pid 234
web-1 | 2024-08-24 09:38:12,152 INFO spawned: 'nginx' with pid 235
web-1 | 2024/08/24 09:38:12 [notice] 235#235: using the "epoll" event method
web-1 | 2024/08/24 09:38:12 [notice] 235#235: nginx/1.22.1
web-1 | 2024/08/24 09:38:12 [notice] 235#235: OS: Linux 6.8.0-1013-aws
web-1 | 2024/08/24 09:38:12 [notice] 235#235: getrlimit(RLIMIT_NOFILE): 1048576:1048576
web-1 | 2024/08/24 09:38:12 [notice] 235#235: start worker processes
web-1 | 2024/08/24 09:38:12 [notice] 235#235: start worker process 236
web-1 | 2024-08-24 09:38:13,179 INFO success: auth_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | 2024-08-24 09:38:13,179 INFO success: core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | 2024-08-24 09:38:13,179 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | Process SpawnProcess-2:
web-1 | Process SpawnProcess-4:
web-1 | Process SpawnProcess-3:
web-1 | Process SpawnProcess-1:
web-1 | Traceback (most recent call last):
web-1 | Traceback (most recent call last):
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
web-1 | self.run()
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
web-1 | self._target(*self._args, **self._kwargs)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
web-1 | target(sockets=sockets)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
web-1 | return asyncio.run(self.serve(sockets=sockets))
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
web-1 | return runner.run(main)
web-1 | ^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
web-1 | return self._loop.run_until_complete(task)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
web-1 | return future.result()
web-1 | ^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
web-1 | config.load()
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
web-1 | self.loaded_app = import_from_string(self.app)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
web-1 | module = importlib.import_module(module_str)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
web-1 | return _bootstrap._gcd_import(name[level:], package, level)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "", line 1204, in _gcd_import
web-1 | File "", line 1176, in _find_and_load
web-1 | File "", line 1147, in _find_and_load_unlocked
web-1 | File "", line 690, in _load_unlocked
web-1 | File "", line 940, in exec_module
web-1 | File "", line 241, in _call_with_frames_removed
web-1 | File "/core_app/config/asgi.py", line 35, in
web-1 | init(fastapp)
web-1 | File "/core_app/config/asgi.py", line 27, in init
web-1 | from papermerge.core.routers import
web-1 | File "/core_app/papermerge/core/routers/init.py", line 28, in
web-1 | log_task_routes()
web-1 | File "/core_app/papermerge/core/log.py", line 16, in log_task_routes
web-1 | for key, value in celery_app.conf.task_routes.items():
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | AttributeError: 'NoneType' object has no attribute 'items'
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
web-1 | self.run()
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
web-1 | self._target(*self._args, **self._kwargs)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
web-1 | target(sockets=sockets)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
web-1 | return asyncio.run(self.serve(sockets=sockets))
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
web-1 | return runner.run(main)
web-1 | ^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
web-1 | return self._loop.run_until_complete(task)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
web-1 | return future.result()
web-1 | ^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
web-1 | config.load()
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
web-1 | self.loaded_app = import_from_string(self.app)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
web-1 | module = importlib.import_module(module_str)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
web-1 | return _bootstrap._gcd_import(name[level:], package, level)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "", line 1204, in _gcd_import
web-1 | File "", line 1176, in _find_and_load
web-1 | File "", line 1147, in _find_and_load_unlocked
web-1 | File "", line 690, in _load_unlocked
web-1 | File "", line 940, in exec_module
web-1 | File "", line 241, in _call_with_frames_removed
web-1 | File "/core_app/config/asgi.py", line 35, in
web-1 | init(fastapp)
web-1 | File "/core_app/config/asgi.py", line 27, in init
web-1 | from papermerge.core.routers import
web-1 | File "/core_app/papermerge/core/routers/init.py", line 28, in
web-1 | log_task_routes()
web-1 | File "/core_app/papermerge/core/log.py", line 16, in log_task_routes
web-1 | for key, value in celery_app.conf.task_routes.items():
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | AttributeError: 'NoneType' object has no attribute 'items'
web-1 | Traceback (most recent call last):
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
web-1 | self.run()
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
web-1 | self._target(*self._args, **self._kwargs)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
web-1 | target(sockets=sockets)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
web-1 | return asyncio.run(self.serve(sockets=sockets))
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
web-1 | return runner.run(main)
web-1 | ^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
web-1 | return self._loop.run_until_complete(task)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
web-1 | return future.result()
web-1 | ^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
web-1 | config.load()
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
web-1 | self.loaded_app = import_from_string(self.app)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
web-1 | module = importlib.import_module(module_str)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
web-1 | return _bootstrap._gcd_import(name[level:], package, level)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "", line 1204, in _gcd_import
web-1 | File "", line 1176, in _find_and_load
web-1 | File "", line 1147, in _find_and_load_unlocked
web-1 | File "", line 690, in _load_unlocked
web-1 | File "", line 940, in exec_module
web-1 | File "", line 241, in _call_with_frames_removed
web-1 | File "/core_app/config/asgi.py", line 35, in
web-1 | init(fastapp)
web-1 | File "/core_app/config/asgi.py", line 27, in init
web-1 | from papermerge.core.routers import
web-1 | File "/core_app/papermerge/core/routers/init.py", line 28, in
web-1 | log_task_routes()
web-1 | File "/core_app/papermerge/core/log.py", line 16, in log_task_routes
web-1 | for key, value in celery_app.conf.task_routes.items():
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | AttributeError: 'NoneType' object has no attribute 'items'
web-1 | Traceback (most recent call last):
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
web-1 | self.run()
web-1 | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
web-1 | self._target(*self._args, **self._kwargs)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
web-1 | target(sockets=sockets)
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
web-1 | return asyncio.run(self.serve(sockets=sockets))
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
web-1 | return runner.run(main)
web-1 | ^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
web-1 | return self._loop.run_until_complete(task)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
web-1 | return future.result()
web-1 | ^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
web-1 | config.load()
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
web-1 | self.loaded_app = import_from_string(self.app)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/core_app/.venv/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
web-1 | module = importlib.import_module(module_str)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
web-1 | return _bootstrap._gcd_import(name[level:], package, level)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "", line 1204, in _gcd_import
web-1 | File "", line 1176, in _find_and_load
web-1 | File "", line 1147, in _find_and_load_unlocked
web-1 | File "", line 690, in _load_unlocked
web-1 | File "", line 940, in exec_module
web-1 | File "", line 241, in _call_with_frames_removed
web-1 | File "/core_app/config/asgi.py", line 35, in
web-1 | init(fastapp)
web-1 | File "/core_app/config/asgi.py", line 27, in init
web-1 | from papermerge.core.routers import
web-1 | File "/core_app/papermerge/core/routers/init.py", line 28, in
web-1 | log_task_routes()
web-1 | File "/core_app/papermerge/core/log.py", line 16, in log_task_routes
web-1 | for key, value in celery_app.conf.task_routes.items():
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | AttributeError: 'NoneType' object has no attribute 'items'

Terminal:

ubuntu@ip-1:$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
943c8 papermerge-core-web "/run.bash server" About a minute ago Up About a minute 0.0.0.0:11000->80/tcp, :::11000->80/tcp papermerge-core-web-1
f3849 redis:6 "docker-entrypoint.s…" About a minute ago Up About a minute 6379/tcp papermerge-core-redis-1
7fbbcc solr:9.3 "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:8983->8983/tcp, :::8983->8983/tcp papermerge-core-solr-1
c3510 papermerge-core-worker "/run.bash worker" About a minute ago Up About a minute 80/tcp papermerge-core-worker-1
ubuntu@ip-1:
$

However papermerge-core-web is running on port 11000 after giving the credentials on login getting error:

502 Bad Gateway
nginx/1.22.1

then I manually run the manage.py and this is the logs in terminal i am getting:

(.venv) root@94938:/core_app# python manage.py runserver 0.0.0.0:8000
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
August 24, 2024 - 04:44:47
Django version 4.2.13, using settings 'config.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

Not Found: /users/me
Not Found: /tags/
[24/Aug/2024 04:44:51] "GET /users/me HTTP/1.0" 404 2102
[24/Aug/2024 04:44:51] "GET /tags/?page_size=999&page_number=1 HTTP/1.0" 404 2125

in browser i am getting error:

PM-0001: Client failed to retrieve current user from '/api/users/me' endpoint. Ax message: Request failed with status code 404. Ax code: ERR_BAD_REQUEST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants