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

cds ui failing to start services #5264

Closed
shansclensky opened this issue Jun 18, 2020 · 6 comments · Fixed by #5268
Closed

cds ui failing to start services #5264

shansclensky opened this issue Jun 18, 2020 · 6 comments · Fixed by #5268
Assignees

Comments

@shansclensky
Copy link

Hi all,

I am trying to install CDS using binaries from the official CDS documentation(https://ovh.github.io/cds/hosting/ready-to-run/from-binaries/) but while executing the command "./cds-engine start ui --config conf.toml." . It is throwing error as "Unable to start service"
CDS_UI_service_error
:
Also I have attached the CDS API for reference:
CDS_API_logs

Please find screenshots attached.

Also i followed the instruction provided in this link 👍 #4994 (comment) but could not resolve this problem. one more query i have is in .cdsrc file inside I see two variables "session" and "token" . how does this token related to INIT_TOKEN we set while launching CDS signup and CDS UI section.

Kindly let me know if i am missing something.

@yesnault
Copy link
Member

the INIT_TOKEN is not linked to the .cdsrc file. INIT_TOKEN variable have to be used to register the first user. With INIT_TOKEN, the first user will be admin and all services (as ui in your case) will be enable.

@yesnault
Copy link
Member

yesnault commented Jun 18, 2020

Did you try to start the ui after the cdsctl with INIT_TOKEN ?

export INIT_TOKEN=./cds-engine config init-token --config conf.toml
./cdsctl signup --api-url http://localhost:8081 --email [email protected] --username admin --fullname admin

then start ui

@shansclensky
Copy link
Author

Thanks Yesnault for explaining the INIT TOKEN part. Yes, I did try the export INIT_TOKEN=./cds-engine config init-token --config conf.toml
./cdsctl signup --api-url http://localhost:8081 --email [email protected] --username admin --fullname admin
After that only I got the error which I have attached.

Note:
1.this command you mentioned when we run more than once will give us error because the user(admin) has been already created it will say duplicate entries not allowed the second time when you try.

2.Also you can see in the CDS Api screenshot I have attached you can see 404 https status code while trying auth/consumer/built-in/signin request..

3.Cdsrc files has "session" and "token" where are these used when it comes to launching the CDS UI.. Is it linked to CDS API or UI..

Any explanation would really help in resolving this issue.

Thanks a lot in advance...

@yesnault
Copy link
Member

ok. So, after cdsctl signup, you have to:

If you don’t have email service configured you just have to check your CDS API logs to have the confirmation link.

Did you run the cdsctl signup verify... command displayed in API log before running the start ui?

@yesnault
Copy link
Member

Without explanations (but following the doc)

Open a terminal, to download last release, run redis/PG, configure and start UI.

mkdir $HOME/cds
cd cds
LAST_RELEASE=$(curl -s https://api.github.com/repos/ovh/cds/releases | grep tag_name | head -n 1 | cut -d '"' -f 4)
OS=linux
ARCH=amd64
curl -L https://github.com/ovh/cds/releases/download/$LAST_RELEASE/cds-engine-$OS-$ARCH -o cds-engine
curl -L https://github.com/ovh/cds/releases/download/$LAST_RELEASE/cdsctl-$OS-$ARCH -o cdsctl
chmod +x cds-engine cdsctl
./cds-engine config new > conf.toml
mkdir -p $HOME/cds/download $HOME/cds/download $HOME/cds/hatchery-basedir
./cds-engine config edit conf.toml --output conf.toml   api.artifact.local.baseDirectory=$HOME/cds/artifacts   api.directories.download=$HOME/cds/download   hatchery.local.basedir=$HOME/cds/hatchery-basedir
docker run --name cds-cache -p 127.0.0.1:6379:6379 -d redis:5
docker run --name cds-db -e POSTGRES_PASSWORD=cds -e POSTGRES_USER=cds -e POSTGRES_DB=cds -p 127.0.0.1:5432:5432 -d postgres:9.6
./cds-engine download sql --config conf.toml
./cds-engine database upgrade --db-host localhost --db-user cds --db-password cds --db-name cds --db-sslmode disable --db-port 5432 --migrate-dir sql
./cds-engine download workers --config conf.toml
./cds-engine start api --config conf.toml

open another terminal to signup, validate and start the ui

cd cds
export INIT_TOKEN=`./cds-engine config init-token --config conf.toml`
./cdsctl signup --api-url http://localhost:8081 --email [email protected] --username admin --fullname admin
./cdsctl signup verify --api-url http://localhost:8081 eyJhbG...
./cds-engine download ui --config conf.toml
./cds-engine start ui --config conf.toml

@yesnault yesnault self-assigned this Jun 18, 2020
@shansclensky
Copy link
Author

Thanks Yesnault it worked.! :) the verify
api url command along with the INIT_TOKEN at the end did the trick:
./cdsctl signup verify --api-url http://localhost:8081 eyJhbG.... And also now you have included that in the official documentation, it would be really helpful for the people who are new to this CDS. Thanks for your swift reply Yesnault.

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

Successfully merging a pull request may close this issue.

2 participants