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

Having problems during installation #1330

Closed
MGlolenstine opened this issue Mar 19, 2020 · 18 comments
Closed

Having problems during installation #1330

MGlolenstine opened this issue Mar 19, 2020 · 18 comments

Comments

@MGlolenstine
Copy link

I'm trying to install Gitpod onto my kind Kubernetes cluster.

After installing 'kind`, I create a cluster. Then I clone this repository and follow the instructions, but there's a problem after the third command under installation.

First of all, I don't have the configuration.txt file, and after the update, it fails with

Error: failed post-install: timed out waiting for the condition

Commands with output:

kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.17.0) 🖼 
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
kubectl cluster-info --context kind-kind
Kubernetes master is running at https://127.0.0.1:32769
KubeDNS is running at https://127.0.0.1:32769/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
  • Clone and cd into self-hosted
  • Edited values.yaml (changed gitpod.hostname and gitpod.components.proxy.loadBalancerIP)
helm repo add charts.gitpod.io https://charts.gitpod.io
"charts.gitpod.io" has been added to your repositories
helm dep update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "charts.gitpod.io" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading gitpod from repo https://charts.gitpod.io/
Deleting outdated charts
helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .
cat: configuration.txt: No such file or directory
Release "gitpod" does not exist. Installing it now.
Error: failed post-install: timed out waiting for the condition
Whole console output
[server@server self-hosted]$ kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.17.0) 🖼 
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
[server@server self-hosted]$ 
[server@server self-hosted]$ kubectl cluster-info --context kind-kind
Kubernetes master is running at https://127.0.0.1:32769
KubeDNS is running at https://127.0.0.1:32769/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
[server@server self-hosted]$ kind get clusters
kind
[server@server self-hosted]$ cd ..
[server@server tmp]$ mv self-hosted/ self_hosted
[server@server tmp]$ git clone https://github.com/gitpod-io/self-hosted
Cloning into 'self-hosted'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 71 (delta 3), reused 4 (delta 1), pack-reused 60
Unpacking objects: 100% (71/71), 21.28 KiB | 239.00 KiB/s, done.
[server@server tmp]$ cd self-hosted
[server@server self-hosted]$ git remote rename origin upstream
[server@server self-hosted]$ vim values.yaml 
[server@server self-hosted]$ helm repo add charts.gitpod.io https://charts.gitpod.io
"charts.gitpod.io" has been added to your repositories
[server@server self-hosted]$ helm dep update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "charts.gitpod.io" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading gitpod from repo https://charts.gitpod.io/
Deleting outdated charts
[server@server self-hosted]$ helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .
cat: configuration.txt: No such file or directory
Release "gitpod" does not exist. Installing it now.
Error: failed post-install: timed out waiting for the condition

I might be missing something or doing something wrong.
I found the definition for the configuration.txt here, but I'm not sure if it's mandatory, because it says To get Gitpod running quickly, you may skip this chapter. and that's what I'm trying to do 😄.

@meysholdt
Copy link
Member

Hi @MGlolenstine !

that's an awesomely detailed bug report.

The message Error: failed post-install: timed out waiting for the condition can mean that a Kubernetes Job named db-migraiton failed. Right after running helm upgrade --install, can you check if there is a pod named db-migraiton... and inspect the log output of that pod? You can do that by running kubectl logs db-migraiton-foobarbaz, with foobarbaz being a random ID you'll see when you list the pods.

The pod db-migraiton tries to connect to your MySQL database and install or upgrade the database schema.

The file configuration.txt is not mandatory... The idea is that you list the filenames of all value.yamls that you have customized in there, to that in the end you can run

helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .

instead of running

helm upgrade --install -f values.yaml -f fooValues.yaml -f barValues.yaml gitpod .

@MGlolenstine
Copy link
Author

Thanks for the response!
I'll try it out and report back!

@MGlolenstine
Copy link
Author

MGlolenstine commented Mar 20, 2020

I'm afraid your suspicions were correct indeed @meysholdt .
The db-migrations-r9p2z (in my case) is returning errors for failing to connect.

Error message
yarn run v1.13.0
$ node ./lib/wait-for-db.js
Using DB: db:3306/gitpod
Connection attempt 0/30 failed. Retrying in 5 seconds.
Connection attempt 1/30 failed. Retrying in 5 seconds.
Connection attempt 2/30 failed. Retrying in 5 seconds.
Connection attempt 3/30 failed. Retrying in 5 seconds.
Connection attempt 4/30 failed. Retrying in 5 seconds.
Connection attempt 5/30 failed. Retrying in 5 seconds.
Connection attempt 6/30 failed. Retrying in 5 seconds.
Connection attempt 7/30 failed. Retrying in 5 seconds.
Connection attempt 8/30 failed. Retrying in 5 seconds.
Connection attempt 9/30 failed. Retrying in 5 seconds.
Connection attempt 10/30 failed. Retrying in 5 seconds.
Connection attempt 11/30 failed. Retrying in 5 seconds.
Connection attempt 12/30 failed. Retrying in 5 seconds.
Connection attempt 13/30 failed. Retrying in 5 seconds.
Connection attempt 14/30 failed. Retrying in 5 seconds.
Connection attempt 15/30 failed. Retrying in 5 seconds.
Connection attempt 16/30 failed. Retrying in 5 seconds.
Connection attempt 17/30 failed. Retrying in 5 seconds.
Connection attempt 18/30 failed. Retrying in 5 seconds.
Connection attempt 19/30 failed. Retrying in 5 seconds.
Connection attempt 20/30 failed. Retrying in 5 seconds.
Connection attempt 21/30 failed. Retrying in 5 seconds.
Connection attempt 22/30 failed. Retrying in 5 seconds.
Connection attempt 23/30 failed. Retrying in 5 seconds.
Connection attempt 24/30 failed. Retrying in 5 seconds.
Connection attempt 25/30 failed. Retrying in 5 seconds.
Connection attempt 26/30 failed. Retrying in 5 seconds.
Connection attempt 27/30 failed. Retrying in 5 seconds.
Connection attempt 28/30 failed. Retrying in 5 seconds.
Connection attempt 29/30 failed. Retrying in 5 seconds.
Could not connect within 30 attempts. Stopping.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
To fix that, should I just add [this](https://www.gitpod.io/docs/self-hosted/latest/install/database/) to the installation?

Thanks for the help!

@MGlolenstine
Copy link
Author

Ok, I passed the DB init phase.
The problem was, that the DB is hosted on the same machine I'm running kubernetes on, so I ran it with localhost:3306, and it failed to connect.
After I changed it to the local IP of the server, it connected successfully.

I'm going to see if everything else passes, if it does I'm going to be closing this issue.

Thanks for the help!

@MGlolenstine
Copy link
Author

MGlolenstine commented Mar 20, 2020

Now I'm facing another problem.
There's 52 migrations that have to be run, but the installation times out before migrations have completed.
Now after running it for the third time (first time and second times did 10 migrations each), I get the following error:

Error message
yarn run v1.13.0
$ node ./lib/wait-for-db.js
Using DB: 192.168.0.179:3306/gitpod
DB is available
Done in 0.72s.
yarn run v1.13.0
$ loadDbKeys(){ REPO_REL_PATH="../../scripts/load-db-encryption-keys.sh"; KEYS="$DB_ENCRYPTION_KEYS"; if [ -f "$REPO_REL_PATH" ]; then KEYS=$($REPO_REL_PATH); fi; echo $KEYS; }; export DB_ENCRYPTION_KEYS="$(loadDbKeys)" && echo "Keys: $DB_ENCRYPTION_KEYS" && typeorm -f lib/typeorm/ormconfig migrations:run
Keys: 
Using DB: 192.168.0.179:3306/gitpod
31 migrations are already loaded in the database.
52 migrations were found in the source code.
UserFeatures1557220371715 is the last executed migration. It was executed on Thu May 07 51316 22:21:55 GMT+0000 (Coordinated Universal Time).
21 migrations are new migrations that needs to be executed.
Error during migration run:
{ QueryFailedError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(4294967295) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin' at line 1
    at new QueryFailedError (/app/node_modules/typeorm/error/QueryFailedError.js:27:28)
    at Query.<anonymous> (/app/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:207:45)
    at Query.<anonymous> (/app/node_modules/mysql/lib/Connection.js:502:10)
    at Query._callback (/app/node_modules/mysql/lib/Connection.js:468:16)
    at Query.Sequence.end (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at Query.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
    at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:278:23)
    at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:91:28)
  message:
   'ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'(4294967295) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin\' at line 1',
  code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlMessage:
   'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'(4294967295) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin\' at line 1',
  sqlState: '42000',
  index: 0,
  sql:
   'ALTER TABLE `gitpod`.`d_b_workspace_instance` CHANGE `status` `status_old` longtext(4294967295) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin',
  name: 'QueryFailedError',
  query:
   'ALTER TABLE `gitpod`.`d_b_workspace_instance` CHANGE `status` `status_old` longtext(4294967295) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin',
  parameters: [] }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
kubectl get pods output
NAME                                 READY   STATUS     RESTARTS   AGE
dashboard-d965c59c8-gppkb            1/1     Running    0          3m48s
db-67675bd7ff-ztq6w                  1/1     Running    0          3m48s
db-migrations-68qd7                  0/1     Error      0          42s
db-migrations-l7xzz                  0/1     Error      0          83s
db-migrations-ngklc                  0/1     Error      0          3m48s
db-migrations-t2hbc                  0/1     Error      0          2m8s
db-migrations-wslz7                  0/1     Error      0          2m44s
image-builder-6798455d6f-29cx2       2/2     Running    0          3m48s
messagebus-685cd8c7ff-9x5lc          1/1     Running    0          3m48s
minio-6684dbbb9-lsstv                1/1     Running    0          3m48s
node-daemon-5hbfd                    0/1     Init:0/2   0          3m48s
proxy-7c8c5ddddb-fgh4m               1/1     Running    0          3m48s
registry-76dbddbf7d-r72l5            1/1     Running    0          3m48s
server-5dd6bb9ff-7drf6               1/1     Running    0          3m48s
ws-manager-78846d9454-9rxbz          1/1     Running    0          3m48s
ws-manager-bridge-845f968c9b-cp4ws   1/1     Running    0          3m47s
ws-sync-86jjg                        1/1     Running    0          3m48s

@MGlolenstine
Copy link
Author

MGlolenstine commented Mar 20, 2020

@meysholdt
Is there a way to manually run the migrations, as the installation automatically shuts down the pod after the timeout exits.
Either to manually run them or to change the timeout to something longer.

EDIT:

I extended the timeout using helm's --timeout parameter, but it still crashed. I have no idea what could be the culprit... Any ideas?

Error
yarn run v1.13.0
$ node ./lib/wait-for-db.js
Using DB: 192.168.0.179:3306/gitpod
DB is available
Done in 1.64s.
yarn run v1.13.0
$ loadDbKeys(){ REPO_REL_PATH="../../scripts/load-db-encryption-keys.sh"; KEYS="$DB_ENCRYPTION_KEYS"; if [ -f "$REPO_REL_PATH" ]; then KEYS=$($REPO_REL_PATH); fi; echo $KEYS; }; export DB_ENCRYPTION_KEYS="$(loadDbKeys)" && echo "Keys: $
DB_ENCRYPTION_KEYS" && typeorm -f lib/typeorm/ormconfig migrations:run
Keys:
Using DB: 192.168.0.179:3306/gitpod
0 migrations are already loaded in the database.
52 migrations were found in the source code.
52 migrations are new migrations that needs to be executed.
Migration InitialSetup1538732744133 has been executed successfully.
Migration RepoWhitelist1538732744233 has been executed successfully.
Migration NewPrimaryKeys011538733040809 has been executed successfully.
Migration Snapshots1540660412217 has been executed successfully.
Migration LastUpdatedTime1540660412218 has been executed successfully.
Migration PrivilegedUser1542962318429 has been executed successfully.
Migration EMailFilter1544172743616 has been executed successfully.
Migration PrebuildWorkspaces1544182743616 has been executed successfully.
Migration AppInstallation1544546800783 has been executed successfully.
Migration AuthProviderId1547464846945 has been executed successfully.
Migration WorkspaceInstanceErrorText1549454864162 has been executed successfully.
Migration PrebuiltWorkspaceUpdatable1551259814258 has been executed successfully.
Migration DeleteIdentity1551358284441 has been executed successfully.
Migration WorkspaceContextURLText1551440761120 has been executed successfully.
Migration Tokens1551696694610 has been executed successfully.
Migration CheckIdToContextUrl1551696694620 has been executed successfully.
Migration PaymentFields1551786663923 has been executed successfully.
Migration SubscriptionDeletedCancellation1551786663924 has been executed successfully.
Migration TeamSubscriptions1551786663925 has been executed successfully.
Migration SubscriptionFirstMonth1551786663926 has been executed successfully.
Migration UserDeletable1552309803138 has been executed successfully.
Migration DeleteUserStorageResource1552309803139 has been executed successfully.
Migration DeleteTokens1552309803140 has been executed successfully.
Migration PendingGithubEvent1552486988553 has been executed successfully.
Migration DeletableWorkspace1553867404607 has been executed successfully.
Migration WorkspaceUserDeleted1554124213564 has been executed successfully.
Migration EduEmailDomain1554243711505 has been executed successfully.
Migration UserReleasePeriodKnob1554360209831 has been executed successfully.
Migration UpdateRepoWhitelist1554360209832 has been executed successfully.
Migration UserEnvVar1554360209840 has been executed successfully.
Migration UserFeatures1557220371715 has been executed successfully.
Error during migration run:
{ QueryFailedError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>>"$.phase")' at line 1
    at new QueryFailedError (/app/node_modules/typeorm/error/QueryFailedError.js:27:28)
    at Query.<anonymous> (/app/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:207:45)
    at Query.<anonymous> (/app/node_modules/mysql/lib/Connection.js:502:10)
    at Query._callback (/app/node_modules/mysql/lib/Connection.js:468:16)
    at Query.Sequence.end (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at Query.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
    at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:278:23)
    at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:91:28)
  message:
   'ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'>>"$.phase")\' at line 1',

@MGlolenstine
Copy link
Author

Anyone knows anything?

@meysholdt
Copy link
Member

hey, yes, your database saying You have an error in your SQL syntax is not good :)
What database in what version are you using?

I haven't tried running db-migrations outside Helm, but looking the Helm chart, I think it's possible via docker run:

  1. Launch this container gcr.io/gitpod-io/db-migrations:v0.3.0
  2. make sure it has these ENV variables set to your values: DB_HOST, DB_PORT, DB_PASSWORD
  3. inside the container, run cd /app/node_modules/@typefox/gitpod-db && yarn run wait-for-db && yarn run typeorm migrations:run. The yarn run wait-for-db can probably be skipped.

@MGlolenstine
Copy link
Author

MGlolenstine commented Mar 23, 2020

@meysholdt Sorry for the late response.
I'm using 10.4.12-MariaDB Arch Linux for the server. It's the latest build from the AUR, so it should be what we need.

@MGlolenstine
Copy link
Author

MGlolenstine commented Mar 23, 2020

@meysholdt
When I run the migration in the docker container, I get more information about the error.
It looks like the error happens on the following query

ALTER TABLE `d_b_workspace_instance` ADD `phase` CHAR(32) GENERATED ALWAYS AS (status->>"$.phase")

I'm not that familiar with the SQL, so I'm not sure what is supposed to be there and what could be wrong.

Full error log
root@6986c792e462:/app/node_modules/@typefox/gitpod-db# cd /app/node_modules/@typefox/gitpod-db && yarn run wait-for-db && yarn run typeorm migrations:run
yarn run v1.13.0
$ node ./lib/wait-for-db.js
Using DB: 172.18.0.1:3306/gitpod
DB is available
Done in 0.34s.
yarn run v1.13.0
$ loadDbKeys(){ REPO_REL_PATH="../../scripts/load-db-encryption-keys.sh"; KEYS="$DB_ENCRYPTION_KEYS"; if [ -f "$REPO_REL_PATH" ]; then KEYS=$($REPO_REL_PATH); fi; echo $KEYS; }; export DB_ENCRYPTION_KEYS="$(loadDbKeys)" && echo "Keys: $DB_ENCRYPTION_KEYS" && typeorm -f lib/typeorm/ormconfig migrations:run
Keys: 
Using DB: 172.18.0.1:3306/gitpod
0 migrations are already loaded in the database.
52 migrations were found in the source code.
52 migrations are new migrations that needs to be executed.
Migration InitialSetup1538732744133 has been executed successfully.
Migration RepoWhitelist1538732744233 has been executed successfully.
Migration NewPrimaryKeys011538733040809 has been executed successfully.
Migration Snapshots1540660412217 has been executed successfully.
Migration LastUpdatedTime1540660412218 has been executed successfully.
Migration PrivilegedUser1542962318429 has been executed successfully.
Migration EMailFilter1544172743616 has been executed successfully.
Migration PrebuildWorkspaces1544182743616 has been executed successfully.
Migration AppInstallation1544546800783 has been executed successfully.
Migration AuthProviderId1547464846945 has been executed successfully.
Migration WorkspaceInstanceErrorText1549454864162 has been executed successfully.
Migration PrebuiltWorkspaceUpdatable1551259814258 has been executed successfully.
Migration DeleteIdentity1551358284441 has been executed successfully.
Migration WorkspaceContextURLText1551440761120 has been executed successfully.
Migration Tokens1551696694610 has been executed successfully.
Migration CheckIdToContextUrl1551696694620 has been executed successfully.
Migration PaymentFields1551786663923 has been executed successfully.
Migration SubscriptionDeletedCancellation1551786663924 has been executed successfully.
Migration TeamSubscriptions1551786663925 has been executed successfully.
Migration SubscriptionFirstMonth1551786663926 has been executed successfully.
Migration UserDeletable1552309803138 has been executed successfully.
Migration DeleteUserStorageResource1552309803139 has been executed successfully.
Migration DeleteTokens1552309803140 has been executed successfully.
Migration PendingGithubEvent1552486988553 has been executed successfully.
Migration DeletableWorkspace1553867404607 has been executed successfully.
Migration WorkspaceUserDeleted1554124213564 has been executed successfully.
Migration EduEmailDomain1554243711505 has been executed successfully.
Migration UserReleasePeriodKnob1554360209831 has been executed successfully.
Migration UpdateRepoWhitelist1554360209832 has been executed successfully.
Migration UserEnvVar1554360209840 has been executed successfully.
Migration UserFeatures1557220371715 has been executed successfully.
Error during migration run:
{ QueryFailedError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>>"$.phase")' at line 1
    at new QueryFailedError (/app/node_modules/typeorm/error/QueryFailedError.js:27:28)
    at Query.<anonymous> (/app/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:207:45)
    at Query.<anonymous> (/app/node_modules/mysql/lib/Connection.js:502:10)
    at Query._callback (/app/node_modules/mysql/lib/Connection.js:468:16)
    at Query.Sequence.end (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at Query.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
    at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:278:23)
    at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:91:28)
  message:
   'ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'>>"$.phase")\' at line 1',
  code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlMessage:
   'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'>>"$.phase")\' at line 1',
  sqlState: '42000',
  index: 0,
  sql:
   'ALTER TABLE `d_b_workspace_instance` ADD `phase` CHAR(32) GENERATED ALWAYS AS (status->>"$.phase")',
  name: 'QueryFailedError',
  query:
   'ALTER TABLE `d_b_workspace_instance` ADD `phase` CHAR(32) GENERATED ALWAYS AS (status->>"$.phase")',
  parameters: [] }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

EDIT

Currently installing MySQL and seeing if that fixes the problem.

EDIT #2

@meysholdt
After installing MySQL, the problem persists, so the problem isn't in the database.

Your MySQL connection id is 246
Server version: 5.5.5-10.4.12-MariaDB Arch Linux

@meysholdt
Copy link
Member

Do you have a chance to try Oracle MySQL? I'm not sure how big the differences between MariaDB and MySQL are, but we didn't test Gitpod on MariaDB.

@MGlolenstine
Copy link
Author

I had a problem, when after removing the MariaDB and installing MySQL, MariaDB was still running.

After I sorted that out, it worked flawlessly.

Thanks for your help!

@ghost
Copy link

ghost commented Sep 7, 2020

Hi! I am encountering the same problem and it's nice to see that I was not the only one.

I would like to work on this point:

Ok, I passed the DB init phase.
The problem was, that the DB is hosted on the same machine I'm running kubernetes on, so I ran it with localhost:3306, and it failed to connect.
After I changed it to the local IP of the server, it connected successfully.

I'm going to see if everything else passes, if it does I'm going to be closing this issue.

Thanks for the help!

What is it meant exactly by 'changing the local IP of the server' here?

Thanks!

@MGlolenstine
Copy link
Author

The problem there was, that it didn't want to connect to the kubernetes cluster when the ip was set to localhost. After I changed it to the ip of my server on the internal network 192.168.x.x in my case (replace x with numbers), it started to work.

@ghost
Copy link

ghost commented Sep 8, 2020

Where exactly do you change this IP?

@MGlolenstine
Copy link
Author

That was ages ago, but I think I was able to change it within GitPod config file.

@ghost
Copy link

ghost commented Sep 8, 2020

OK, it does not work.

@ghost
Copy link

ghost commented Sep 8, 2020

Maybe it is better that I open my own issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants