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]: Opensignserver container exiting after compose up. #284

Open
3 tasks done
RajGuru878 opened this issue Dec 20, 2023 · 22 comments
Open
3 tasks done

[Bug]: Opensignserver container exiting after compose up. #284

RajGuru878 opened this issue Dec 20, 2023 · 22 comments
Assignees
Labels
bug Something isn't working

Comments

@RajGuru878
Copy link

Issue Description

After doing compose up, OpenSignServer container exiting with the error: MongoNetworkTimeoutError: connection timed out
OpenSignServer-container | at connectionFailureError (/usr/src/app/node_modules/parse-server/node_modules/mongodb/lib/cmap.
Can anybody please help me in this.

Expected Behavior

unable to create user

Current Behavior

container exiting

Steps to reproduce

na

Screenshots of the issue(optional)

na

Operating System [e.g. MacOS Sonoma 14.1, Windows 11]

ubuntu 22

What browsers are you seeing the problem on?

No response

What version of OpenSign™ are you seeing this issue on? [e.g. 1.0.6]

latest

What environment are you seeing the problem on?

No response

Please check the boxes that apply to this issue report.

  • I have searched the existing issues & discussions to make sure that this is not a duplicate.

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the existing issues & discussions to make sure that this is not a duplicate.
@nxglabs
Copy link
Contributor

nxglabs commented Dec 20, 2023

Try running "make build" instead

@RajGuru878
Copy link
Author

RajGuru878 commented Dec 20, 2023

@nxglabs tried make build, but still same issue. trying this from one weak. after this build opensignserver exiting. It is unable to communicating with mongo container.

@nxglabs
Copy link
Contributor

nxglabs commented Dec 20, 2023

This happens when your OpenSign server is not able to connect with mongodb due to some issue with network settings etc.

@RajGuru878
Copy link
Author

@nxglabs , can u plz explain how should i resolve this .

@nxglabs
Copy link
Contributor

nxglabs commented Dec 21, 2023

Can you share more details about your setup?

@RajGuru878
Copy link
Author

@nxglabs What can i share?, means error or my env file

@nxglabs
Copy link
Contributor

nxglabs commented Dec 21, 2023

You are trying to setup in your local machine or AWS or Digital ocean? Your .env? And exact steps you followed.

@RajGuru878
Copy link
Author

RajGuru878 commented Dec 21, 2023

@nxglabs
i am installing it in local machine ( docker based )
I am attaching my env file here, and i tried this with public ip also.
first i cloned repository and then i changed .env.local_dev file as per our requirement and then ran command make build.
It automaticall converted .env.local_dev file to .env and made containers up.
Screenshot from 2023-12-21 15-38-41
Screenshot from 2023-12-21 15-39-00
Screenshot from 2023-12-21 15-39-08
Screenshot from 2023-12-21 15-39-14

@nxglabs
Copy link
Contributor

nxglabs commented Dec 21, 2023

You dont need to change anything other than smtp or mailgun parameters in .env.local_dev and running "make build" from the root of the cloned directory. Keep everything else as it is.

@RajGuru878
Copy link
Author

RajGuru878 commented Dec 21, 2023

@nxglabs
I wanted to host mongo and everything from our host only, not with any UAT server. Soo i mentioned all our host address there.

@rishabjasrotia
Copy link
Contributor

Hello @RajGuru878
The IP added in mongo DB is your localhost?

@RajGuru878
Copy link
Author

@rishabjasrotia
Yess. thats my localhost.

@rishabjasrotia
Copy link
Contributor

This was not working in your local ?
MONGODB_URI=mongodb://host.docker.internal:27017/OpenSignDB

@RajGuru878
Copy link
Author

@rishabjasrotia
No that is not working.

@mrinc
Copy link

mrinc commented Dec 27, 2023

Try this: MONGODB_URI=mongodb://mongo:27017/OpenSignDB
Docker should auto-route to the mongo container (you can verify the name of the container in the docker compose file)

@RajGuru878
Copy link
Author

@mrinc
Tried with mentioned line, same error ( error screenshot is mentioned below )
Screenshot from 2023-12-28 10-58-54
Screenshot from 2023-12-28 10-58-11

@creampnx-x
Copy link

hi there, same problem i have meet. This is a bug, and i solved it by making a mongo database named 'OpenSignDB' manually.
The main reason cause this bug is the mongo/mongo-init.sh script is not running when mongo start.
And you should import the default data manually when mongo server start.

@RajGuru878
Copy link
Author

@creampnx-x
Hi, Can yo plz brief about import the default data manually when mongo server start.

@creampnx-x
Copy link

creampnx-x commented Dec 29, 2023

When you started your docker(run make build), the mongo server is actually running. So I just

  • use the mongo compass to connect the database server localhost:27017.
  • use it create OpenSignDB database
  • open the apps\mongo\default-data file finder
  • create collections as the json file name, and import the json file in the collection.
    this is the compass UI:
    image

BTW

  • The right way to solve this bug is write correct code in the dockerfile, but this way is the easy way to run it.
  • And, you should check your .env_local_dev file to make sure your env vars are right.

@creampnx-x
Copy link

creampnx-x commented Dec 30, 2023

@RajGuru878 hi bro, I discovered several new ways on it. It may be caused by docker net work.

  • link mongo to parse server.
    image

  • change mongo uri to 'mongo://mongo:27017/OpenSignDB'
    image

See it on stackoverflow: https://stackoverflow.com/questions/45257581/parse-mongo-db-can-not-connect-to-server

@RajGuru878
Copy link
Author

@creampnx-x not working, opensign server container exiting again.

@Zathiel
Copy link
Collaborator

Zathiel commented Jun 2, 2024

Hey @RajGuru878

Are you still facing issues with the last release ?

If not i will mark this issue as solved

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