Closed kastyle closed 2 years ago
I am not sure about prod version, I work with dev version using below step:
If you want to run a dev version, all you need to do is
yarn install
&&yarn db:start
&&yarn dev
I am not sure about prod version, I work with dev version using below step:
If you want to run a dev version, all you need to do is
yarn install
&&yarn db:start
&&yarn dev
@87prashant The dev version works, but I would like to try running the prod version.
I also noticed one strange feature: If I deploy the dev version, then 2 ports are opened - 3000 (application) and 3001 (web socket).
[root@rocky2 10:30:25 ~]# ss -nltp
LISTEN 0 128 0.0.0.0:6379 0.0.0.0:* users:(("docker-proxy",pid=2073,fd=4))
LISTEN 0 128 0.0.0.0:28015 0.0.0.0:* users:(("docker-proxy",pid=2094,fd=4))
LISTEN 0 128 0.0.0.0:8080 0.0.0.0:* users:(("docker-proxy",pid=2142,fd=4))
LISTEN 0 128 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=1035,fd=9),("nginx",pid=1034,fd=9),("nginx",pid=1031,fd=9))
LISTEN 0 128 0.0.0.0:8082 0.0.0.0:* users:(("docker-proxy",pid=1983,fd=4))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=728,fd=4))
LISTEN 0 128 0.0.0.0:29015 0.0.0.0:* users:(("docker-proxy",pid=2039,fd=4))
LISTEN 0 128 0.0.0.0:5432 0.0.0.0:* users:(("docker-proxy",pid=1965,fd=4))
LISTEN 0 128 0.0.0.0:5050 0.0.0.0:* users:(("docker-proxy",pid=2002,fd=4))
LISTEN 0 128 *:3000 *:* users:(("node /root/para",pid=1359,fd=21))
LISTEN 0 128 *:3001 *:* users:(("node /root/para",pid=1344,fd=24))
If I deploy the prod version, only 1 port is opened, 3000 (web socket). Perhaps this is the issue? I forgot to say that I'm trying to deploy a production version with a default .env file.
root@rocky 10:48:39 ~]# ss -nltp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:6379 0.0.0.0:* users:(("docker-proxy",pid=3973,fd=4))
LISTEN 0 128 0.0.0.0:28015 0.0.0.0:* users:(("docker-proxy",pid=3955,fd=4))
LISTEN 0 128 0.0.0.0:8080 0.0.0.0:* users:(("docker-proxy",pid=3991,fd=4))
LISTEN 0 128 0.0.0.0:8082 0.0.0.0:* users:(("docker-proxy",pid=4033,fd=4))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=740,fd=4))
LISTEN 0 128 0.0.0.0:29015 0.0.0.0:* users:(("docker-proxy",pid=3937,fd=4))
LISTEN 0 128 0.0.0.0:5432 0.0.0.0:* users:(("docker-proxy",pid=4108,fd=4))
LISTEN 0 128 0.0.0.0:5050 0.0.0.0:* users:(("docker-proxy",pid=4518,fd=4))
LISTEN 0 128 *:3000 *:* users:(("node /root/para",pid=4956,fd=24))
Guys, please see this thread. Any of your help will be appreciated. @BartoszJarocki @Dschoordsch @igorlesnenko @tianrunhe @mattkrick
@kastyle It works when you remove CDN_BASE_URL
from the .env
file and re-run yarn build && yarn start
. Would be nice, if you have time, if you could commit a PR with a better default value or commented out line in .env.example
.
@Dschoordsch Thanks, it worked, but I keep having deployment issues. I will definitely create a PR as soon as I can get the prod version up and running.
The web page now opens, but when adding an account, it says
"Server error"
In the log I see an entry:
SEND TO SENTRY [Error: relation "User" does not exist] undefined
Commands I have run:
yarn install && yarn db:start && yarn db:migrate && yarn db:migrate up && yarn pg:build
yarn build && yarn start
I'm assuming this is due to deployment errors. Errors in the deployment log:
[root@rocky 12:26:43 parabol]# yarn pg:build
yarn run v1.22.19
$ pgtyped -c ./packages/server/postgres/pgtypedConfig.js
Processing packages/server/postgres/queries/src/addUserNewFeatureQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "User" does not exist',
position: '8'
}
Saved 1 query types to packages/server/postgres/queries/generated/addUserNewFeatureQuery.ts
Processing packages/server/postgres/queries/src/appendTeamResponseReactjiQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "TeamPromptResponse" does not exist',
position: '8'
}
Saved 1 query types to packages/server/postgres/queries/generated/appendTeamResponseReactjiQuery.ts
Processing packages/server/postgres/queries/src/appendUserFeatureFlagsQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "User" does not exist',
position: '8'
}
Saved 1 query types to packages/server/postgres/queries/generated/appendUserFeatureFlagsQuery.ts
Processing packages/server/postgres/queries/src/appendUserTmsQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "User" does not exist',
position: '8'
}
Saved 1 query types to packages/server/postgres/queries/generated/appendUserTmsQuery.ts
Processing packages/server/postgres/queries/src/archiveTeamsByTeamIdsQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "Team" does not exist',
position: '8'
}
Saved 1 query types to packages/server/postgres/queries/generated/archiveTeamsByTeamIdsQuery.ts
etc...
Processing packages/server/postgres/queries/src/upsertTeamPromptResponsesQuery.sql
Error in query. Details: {
errorCode: 'parserOpenTable',
hint: undefined,
message: 'relation "TeamPromptResponse" does not exist',
position: '13'
}
Saved 1 query types to packages/server/postgres/queries/generated/upsertTeamPromptResponsesQuery.ts
Done in 2.76s.
[root@rocky 12:26:57 parabol]# yarn build && yarn start
yarn run v1.22.19
$ node scripts/prod.js
πππ Building Production Server πππ
Writing ts
β Parse Configuration
βΌ Generate outputs
Created:
- UpdateNewCheckInQuestionMutation_meeting.graphql.ts
- SlackProviderRow_viewer.graphql.ts
- SlackProviderRowViewer.graphql.ts
etc...
β Parse Configuration
β Generate outputs
Added 215 records to the queryMap
Prime Integrations error error: relation "IntegrationProvider" does not exist
at Parser.parseErrorMessage (/root/parabol/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/root/parabol/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/root/parabol/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (/root/parabol/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:520:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 118,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '15',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '1191',
routine: 'parserOpenTable'
}
Done in 111.70s.
yarn run v1.22.19
$ pm2-runtime start pm2.config.js
2022-08-15T12:29:08: PM2 log: Launching in no daemon mode
2022-08-15T12:29:08: PM2 log: App [Web Server:0] starting in -cluster mode-
2022-08-15T12:29:08: PM2 log: App [GQL Executor:1] starting in -cluster mode-
2022-08-15T12:29:08: PM2 log: App [Web Server:0] online
2022-08-15T12:29:08: PM2 log: App [GQL Executor:1] online
2022-08-15T12:29:08: PM2 log: App [GQL Executor:2] starting in -cluster mode-
2022-08-15T12:29:08: PM2 log: App [GQL Executor:2] online
π₯π₯π₯ Ready for Sockets: Port 3000 π₯π₯π₯
π§π§π§ Ready for GraphQL Execution: 0 π§π§π§
π§π§π§ Ready for GraphQL Execution: 1 π§π§π§
SEND TO SENTRY [Error: relation "User" does not exist] undefined
SEND TO SENTRY [Error: relation "User" does not exist] undefined
SEND TO SENTRY [Error: relation "User" does not exist] undefined
Can you please tell me, what can I do to solve the problem?
You're missing yarn pg:migrate up
, it should be yarn db:migrate && yarn pg:migrate up
.
Closing for now. Please re-open if you are still having issues
Issue - Bug
Hi all. Please help me solve the problem. I am trying to deploy an application. The first thing I do (seen in this comment)
yarn install && yarn db:start && yarn db:migrate && yarn db:migrate up && yarn pg:build
Next, I do:
yarn && yarn build && yarn start
The deployment runs without errors, but at localhost:3000 I see only a white page. log:
Curl localhost:3000 shows this:
Please help me solve this problem. What do I need to do to make the application work?