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 - cannot connect to Backoffice services on self-hosting ballerine #2089

Open
pratapalakshmi opened this issue Feb 18, 2024 · 6 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@pratapalakshmi
Copy link
Collaborator

pratapalakshmi commented Feb 18, 2024

Upon deploying ballerine on ec2 instance. I tried accessing ballerine and i see the following. However, the same steps worked a week back

Back office:

image

Workflow-dashboard:
image

KYB-APP:

image
@pratapalakshmi pratapalakshmi added the bug Something isn't working label Feb 18, 2024
@pratapalakshmi pratapalakshmi self-assigned this Feb 18, 2024
@ludmorales
Copy link

After using the latest Ballerine code (dev) with a domain/IP, I have these messages/errors:

Collection Flow
Screenshot 2024-02-19 at 19 22 34

Case Management
Screenshot 2024-02-19 at 19 23 01

Monitoring Dashboard
Screenshot 2024-02-19 at 19 23 22

Backend
I noted that is activated the https for the Backend :
Screenshot 2024-02-19 at 19 23 52

@sarshad01
Copy link

Is there any progress on this? I have just setup the docker image and I have the same CORS error on all platforms

@WFA-juliver
Copy link

@sarshad01 @ludmorales experiencing that also but using ip only, cors pointing to localhost origin were resolved by updating envs on

deploy/.env
apps/backoffice-v2/.env
apps/kyb-app/.env
apps/workflows-dashboard/.env

to container/server ip

but when attaching domain via nginx proxy, I'm receiving cors errors

@sarshad01
Copy link

@WFA-juliver @ludmorales I investigated it further and it seems like the CORS issue comes only from one service : workflows-service. The reason it appears is not actually related to origin, but because the container keeps restarting due to an error, here's the log of the workflows-service container

Loading environment variables from .env
2024-09-19T04:01:16.709400893Z Seeding database...
2024-09-19T04:01:16.820246687Z PrismaClientKnownRequestError:
2024-09-19T04:01:16.820264094Z Invalid prismaClient.workflowDefinition.create() invocation in
2024-09-19T04:01:16.820266066Z /app/scripts/workflows/e2e-dynamic-url-example.ts:230:48
2024-09-19T04:01:16.820278334Z
2024-09-19T04:01:16.820279501Z 227 isPublic: true,
2024-09-19T04:01:16.820280579Z 228 } as const satisfies Prisma.WorkflowDefinitionUncheckedCreateInput;
2024-09-19T04:01:16.820281748Z 229 export const generateDynamicDefinitionForE2eTest = async (prismaClient: PrismaClient) => {
2024-09-19T04:01:16.820283323Z → 230 return await prismaClient.workflowDefinition.create(
2024-09-19T04:01:16.820284803Z Unique constraint failed on the fields: (id)
2024-09-19T04:01:16.820286282Z at Rn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:174:7325)
2024-09-19T04:01:16.820288449Z at Rn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:174:6754)
2024-09-19T04:01:16.820290235Z at Rn.request (/app/node_modules/@prisma/client/runtime/library.js:174:6344)
2024-09-19T04:01:16.820291719Z at generateDynamicDefinitionForE2eTest (/app/scripts/workflows/e2e-dynamic-url-example.ts:230:10)
2024-09-19T04:01:16.820293641Z at seed (/app/scripts/seed.ts:124:3) {
2024-09-19T04:01:16.820295070Z code: 'P2002',
2024-09-19T04:01:16.820296561Z clientVersion: '4.16.2',
2024-09-19T04:01:16.820298263Z meta: { target: [ 'id' ] }
2024-09-19T04:01:16.820299711Z }
2024-09-19T04:01:16.987359840Z
2024-09-19T04:01:16.987380613Z > @ballerine/[email protected] prod
2024-09-19T04:01:16.987382323Z > npm run db:migrate-up && node dist/src/main
2024-09-19T04:01:16.987383606Z
2024-09-19T04:01:17.135181090Z
2024-09-19T04:01:17.135199662Z > @ballerine/[email protected] db:migrate-up
2024-09-19T04:01:17.135201478Z > prisma migrate deploy
2024-09-19T04:01:17.135202843Z
2024-09-19T04:01:17.368449126Z Prisma schema loaded from prisma/schema.prisma
2024-09-19T04:01:17.373842556Z Datasource "db": PostgreSQL database "postgres", schema "public" at "postgres:5432"
2024-09-19T04:01:17.407737430Z
2024-09-19T04:01:17.407763142Z 80 migrations found in prisma/migrations
2024-09-19T04:01:17.407766264Z
2024-09-19T04:01:17.420580934Z
2024-09-19T04:01:17.420604533Z No pending migrations to apply.
2024-09-19T04:01:17.864012408Z Loading environment variables from .env
2024-09-19T04:01:19.041089841Z {"level":"info","logData":{},"message":"Listening on port 3000","timestamp":"2024-09-19T04:01:19.040Z"}
2024-09-19T04:01:19.060602548Z node:internal/process/promises:288
2024-09-19T04:01:19.060654474Z triggerUncaughtException(err, true /* fromPromise */);
2024-09-19T04:01:19.060657281Z ^
2024-09-19T04:01:19.060664112Z
2024-09-19T04:01:19.060665874Z [Error: Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue]

@WFA-juliver
Copy link

WFA-juliver commented Sep 19, 2024

@WFA-juliver @ludmorales I investigated it further and it seems like the CORS issue comes only from one service : workflows-service. The reason it appears is not actually related to origin, but because the container keeps restarting due to an error, here's the log of the workflows-service container

Loading environment variables from .env 2024-09-19T04:01:16.709400893Z Seeding database... 2024-09-19T04:01:16.820246687Z PrismaClientKnownRequestError: 2024-09-19T04:01:16.820264094Z Invalid prismaClient.workflowDefinition.create() invocation in 2024-09-19T04:01:16.820266066Z /app/scripts/workflows/e2e-dynamic-url-example.ts:230:48 2024-09-19T04:01:16.820278334Z 2024-09-19T04:01:16.820279501Z 227 isPublic: true, 2024-09-19T04:01:16.820280579Z 228 } as const satisfies Prisma.WorkflowDefinitionUncheckedCreateInput; 2024-09-19T04:01:16.820281748Z 229 export const generateDynamicDefinitionForE2eTest = async (prismaClient: PrismaClient) => { 2024-09-19T04:01:16.820283323Z → 230 return await prismaClient.workflowDefinition.create( 2024-09-19T04:01:16.820284803Z Unique constraint failed on the fields: (id) 2024-09-19T04:01:16.820286282Z at Rn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:174:7325) 2024-09-19T04:01:16.820288449Z at Rn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:174:6754) 2024-09-19T04:01:16.820290235Z at Rn.request (/app/node_modules/@prisma/client/runtime/library.js:174:6344) 2024-09-19T04:01:16.820291719Z at generateDynamicDefinitionForE2eTest (/app/scripts/workflows/e2e-dynamic-url-example.ts:230:10) 2024-09-19T04:01:16.820293641Z at seed (/app/scripts/seed.ts:124:3) { 2024-09-19T04:01:16.820295070Z code: 'P2002', 2024-09-19T04:01:16.820296561Z clientVersion: '4.16.2', 2024-09-19T04:01:16.820298263Z meta: { target: [ 'id' ] } 2024-09-19T04:01:16.820299711Z } 2024-09-19T04:01:16.987359840Z 2024-09-19T04:01:16.987380613Z > @ballerine/[email protected] prod 2024-09-19T04:01:16.987382323Z > npm run db:migrate-up && node dist/src/main 2024-09-19T04:01:16.987383606Z 2024-09-19T04:01:17.135181090Z 2024-09-19T04:01:17.135199662Z > @ballerine/[email protected] db:migrate-up 2024-09-19T04:01:17.135201478Z > prisma migrate deploy 2024-09-19T04:01:17.135202843Z 2024-09-19T04:01:17.368449126Z Prisma schema loaded from prisma/schema.prisma 2024-09-19T04:01:17.373842556Z Datasource "db": PostgreSQL database "postgres", schema "public" at "postgres:5432" 2024-09-19T04:01:17.407737430Z 2024-09-19T04:01:17.407763142Z 80 migrations found in prisma/migrations 2024-09-19T04:01:17.407766264Z 2024-09-19T04:01:17.420580934Z 2024-09-19T04:01:17.420604533Z No pending migrations to apply. 2024-09-19T04:01:17.864012408Z Loading environment variables from .env 2024-09-19T04:01:19.041089841Z {"level":"info","logData":{},"message":"Listening on port 3000","timestamp":"2024-09-19T04:01:19.040Z"} 2024-09-19T04:01:19.060602548Z node:internal/process/promises:288 2024-09-19T04:01:19.060654474Z triggerUncaughtException(err, true /* fromPromise */); 2024-09-19T04:01:19.060657281Z ^ 2024-09-19T04:01:19.060664112Z 2024-09-19T04:01:19.060665874Z [Error: Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue]

same error on my end, I'm stuck on this part. I'm not sure how to fix this part, this shows upon logging the container docker logs <workflow service>, I followed the docker deployment documentation on a fresh server but unable to successfully deploy it, I hope we get response from the team.

@WFA-juliver
Copy link

any luck?

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

4 participants