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

make install can't find janeway-postgres #4005

Closed
quartelmestre opened this issue Mar 6, 2024 · 3 comments · Fixed by #4009
Closed

make install can't find janeway-postgres #4005

quartelmestre opened this issue Mar 6, 2024 · 3 comments · Fixed by #4009
Assignees
Labels
bug Something's not working

Comments

@quartelmestre
Copy link

Describe the bug
Running make install gives no errors, but then it keeps waiting for janeway-postgres.

Janeway version
This is a new v1.5.0 installation.

To Reproduce
Steps to reproduce the behavior:

  1. Downloaded v1.5.0 release zip file.
  2. make install
  3. See error:
$ make install
touch db/janeway.sqlite3
docker-compose run --rm start_dependencies
Creating network "janeway-150_default" with the default driver
Pulling janeway-pgadmin (dpage/pgadmin4:)...
latest: Pulling from dpage/pgadmin4
Digest: sha256:f1460b121383a5d61c20867ecd42535d4aabb385d32685b0e0845367ab9b86c4
Status: Downloaded newer image for dpage/pgadmin4:latest
Pulling janeway-postgres (postgres:11)...
11: Pulling from library/postgres
Digest: sha256:5d2aa4a7b5f9bdadeddcf87cf7f90a176737a02a30d917de4ab2e6a329bd2d45
Status: Downloaded newer image for postgres:11
Pulling janeway-debug-smtp (python:3.8)...
3.8: Pulling from library/python
Digest: sha256:12266a9bc0318a9e0131561fc98d53b75325a3c2abd62aebc8302e3beb503b05
Status: Downloaded newer image for python:3.8
Pulling start_dependencies (dadarek/wait-for-dependencies:)...
latest: Pulling from dadarek/wait-for-dependencies
Digest: sha256:b38e28108dee0aad90984e176adcc014dbf31b528602640f6c9a280cdc7ce2f0
Status: Downloaded newer image for dadarek/wait-for-dependencies:latest
Creating janeway-150_janeway-pgadmin_1    ... done
Creating janeway-150_janeway-debug-smtp_1 ... done
Creating janeway-150_janeway-postgres_1   ... done
Creating janeway-150_start_dependencies_run ... done
Waiting for janeway-postgres to listen on 5432...
nc: bad address 'janeway-postgres'
sleeping
nc: bad address 'janeway-postgres'
sleeping
nc: bad address 'janeway-postgres'
sleeping
nc: bad address 'janeway-postgres'
sleeping
nc: bad address 'janeway-postgres'
sleeping

Expected behavior
Normal end of installation.

Additional context
This is similar to #1656 , but there are no Postgres installations in this server.

@quartelmestre quartelmestre added the bug Something's not working label Mar 6, 2024
@danielBingham
Copy link

I ran into this as well. It's present in the v1.5.0 release. The problem is a .gitignore file in the db/postgres-data directory. You can see in the postgres container logs that it doesn't like it:

dbingham:~/app/janeway ((v1.5.0))$ docker logs janeway-janeway-postgres-1
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: directory "/var/lib/postgresql/data" exists but is not empty
It contains a dot-prefixed/invisible file, perhaps due to it being a mount point.
Using a mount point directly as the data directory is not recommended.
Create a subdirectory under the mount point.

I think I was previously able to get it working by removing that .gitignore file. This time around, however, it was recreated each time I tried to rerun the install (and the permissions reset to hyper restrictive).

Modifying the docker compose file to change the mount directory did work - at least far enough to get the install to seemingly complete and Janeway running:

  janeway-postgres:
    image: postgres:11
    volumes:
      - ./db/postgres-data:/var/lib/postgresql
    ports:
      - "${DB_PORT}"
    environment:
      - "POSTGRES_PASSWORD=${DB_PASSWORD}"
      - "POSTGRES_USER=${DB_USER}"
      - "POSTGRES_DB=${DB_NAME}"
    depends_on:
      - janeway-pgadmin

I changed ./db/postgres-data:/var/lib/postgresql/data to ./db/postgres-data:/var/lib/postgresql which got it running. However, I don't think the install finished cleanly. I keep getting errors like this when I try to do things (like register a new user or submit a manuscript):

ImportError at /register/step/1/
'' doesn't look like a module path

@ajrbyers
Copy link
Member

ajrbyers commented Mar 6, 2024

Hi folks! I’ve asked @mauromsl to take a look at this issue. AFAIK he uses docker (personally I use a native install locally).

@mauromsl
Copy link
Member

mauromsl commented Mar 7, 2024

Thanks @quartelmestre @danielBingham
I've put in a PR to resolve this: #4009

Comments are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's not working
Projects
None yet
4 participants