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]: #1368

Open
3 tasks done
vitorkaviski-ql opened this issue Oct 21, 2024 · 1 comment
Open
3 tasks done

[Bug]: #1368

vitorkaviski-ql opened this issue Oct 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working up-for-grabs

Comments

@vitorkaviski-ql
Copy link

Issue Description

When attempting to upload a file in the OpenSign application using MinIO, an error occurs indicating that the host is inaccessible and the port is undefined. The application is incorrectly trying to access the host using the standard subdomain format opensign.[domain] instead of the correct path-based endpoint [domain]/opensign. This misconfiguration prevents documents from being properly stored in the designated MinIO bucket.

Expected Behavior

I expected the file to be successfully uploaded to the specified MinIO bucket named "opensign" through the correct endpoint [domain]/opensign.

Current Behavior

Upon attempting to upload a file, the application returns the following error in the browser console: "Form.js:449 Error uploading file: c: Inaccessible host: opensign.minioapi.[domain]' at port undefined'. This service may not be available in the `us-east-1' region." This error indicates that the application is attempting to access an incorrect host address and an undefined port, leading to the failure of the upload process.

Steps to reproduce

Configure Environment Variables: Update the .env.prod file with the following settings:

Set PUBLIC_URL to https://opensign.[domain].
Define APP_ID as opensign.
Set MASTER_KEY to a secure key.
Configure MONGODB_URI as mongodb://mongo-container:27017/OpenSignDB.
Set PARSE_MOUNT to /app.
Define SERVER_URL as https://opensign.[domain]/app.
Configure MinIO settings:
DO_SPACE to opensign.
DO_ENDPOINT to minioapi.[domain].
DO_BASEURL to https://minioapi.[domain].
DO_ACCESS_KEY_ID to [Your_S3_Access_ID].
DO_SECRET_ACCESS_KEY to [Your_S3_Secret_Key].
DO_REGION to us-east-1.
Set USE_LOCAL to false.

Update docker-compose.yml: Ensure that the docker-compose.yml file correctly references the environment variables and ports:

Restart Docker Containers: Execute the following commands to apply the changes:

Bring down the containers with docker-compose down -v.
Recreate and start the containers with docker-compose up -d --force-recreate.
Test Connectivity with MinIO: Run a Python script to ensure that the application can successfully connect to MinIO and list the existing buckets.

Attempt File Upload Again: Try uploading a file through the OpenSign application to see if the issue persists.

Screenshots of the issue(optional)

Captura de tela 2024-10-21 085227

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

Ubuntu Server

What browsers are you seeing the problem on?

Chrome, Firefox, Safari, Microsoft Edge

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

v2.5.0

What environment are you seeing the problem on?

Hosted (app.yourdomain.com)

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.
@andrew-opensignlabs
Copy link
Collaborator

Can you configure MinIO to use subdomains instead? AFAIK it already allows you to do that.image

https://min.io/docs/minio/linux/reference/minio-server/settings/core.html

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

No branches or pull requests

2 participants