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

cannot access web gui waldur #9

Open
avenbreaks opened this issue Jul 5, 2023 · 27 comments
Open

cannot access web gui waldur #9

avenbreaks opened this issue Jul 5, 2023 · 27 comments

Comments

@avenbreaks
Copy link

avenbreaks commented Jul 5, 2023

i can't access web gui (blank screen) after deploying waldur using docker, and I can't access into the keycloak container (a few seconds it always restarts itself)

docker exec keycloak /opt/jboss/keycloak/bin/add-user-keycloak.sh -u demo -p demo

OCI runtime exec failed: exec failed: unable to start container process: exec: "/opt/jboss/keycloak/bin/add-user-keycloak.sh": stat /opt/jboss/keycloak/bin/add-user-keycloak.sh: no such file or directory: unknown

Docker version : 24.0.2
Docker compose version : v2.18.1

Logs Keycloak :

2023-07-05 14:48:01,113 WARN  [io.agroal.pool] (agroal-11) Datasource '<default>': FATAL: password authentication failed for user "keycloak"
2023-07-05 14:48:01,312 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2023-07-05 14:48:01,367 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2023-07-05 14:48:01,407 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2023-07-05 14:48:01,790 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.9.Final
2023-07-05 14:48:01,984 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2023-07-05 14:48:01,984 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2023-07-05 14:48:02,144 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2023-07-05 14:48:02,145 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2023-07-05 14:48:02,145 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2023-07-05 14:48:02,145 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
2023-07-05 14:48:04,209 INFO  [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) b1a878d9e0db-20291: no members discovered after 2018 ms: creating cluster as coordinator
2023-07-05 14:48:04,224 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [b1a878d9e0db-20291|0] (1) [b1a878d9e0db-20291]
2023-07-05 14:48:04,230 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `b1a878d9e0db-20291`, physical addresses are `[172.19.0.6:37035]`
2023-07-05 14:48:05,000 INFO  [org.infinispan.CLUSTER] (main) ISPN000080: Disconnecting JGroups channel `ISPN`
2023-07-05 14:48:05,086 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2023-07-05 14:48:05,087 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection
2023-07-05 14:48:05,088 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: FATAL: password authentication failed for user "keycloak"
2023-07-05 14:48:05,088 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

waldur-db.log :

2023-07-05 14:38:09.912 UTC [95] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" = 'SITE_NAME' LIMIT 21
2023-07-05 14:40:46.545 UTC [143] ERROR:  duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq"
2023-07-05 14:40:46.545 UTC [143] DETAIL:  Key (app_label, model)=(structure, project) already exists.
2023-07-05 14:40:46.545 UTC [143] STATEMENT:  INSERT INTO "django_content_type" ("app_label", "model") VALUES ('structure', 'project') RETURNING "django_content_type"."id"
2023-07-05 14:40:46.556 UTC [142] ERROR:  duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq"
2023-07-05 14:40:46.556 UTC [142] DETAIL:  Key (app_label, model)=(structure, customer) already exists.
2023-07-05 14:40:46.556 UTC [142] STATEMENT:  INSERT INTO "django_content_type" ("app_label", "model") VALUES ('structure', 'customer') RETURNING "django_content_type"."id"
@livenson
Copy link
Collaborator

livenson commented Jul 7, 2023

looks like mangled db migrations
can you try from a scratch?

@avenbreaks
Copy link
Author

is this from scratch

@Ghaithkhelifi
Copy link

the same problem but in local in my PC its worked but can login or add user two container keep resatring and when I tried to install in vps I get blank screen I even upgraded to vps with 16 gb ram and 6 vcpu and the same thing

@livenson
Copy link
Collaborator

@Ghaithkhelifi , this can mean a lot of things, please check the logs of the containers that keep restarting.

@Ghaithkhelifi
Copy link

in portainer i see this one its always in red with code exited - code 0

waldur-mastermind-whitelabeli...	exited - code 0

@livenson
Copy link
Collaborator

please check the logs
docker logs

@Ghaithkhelifi
Copy link

how can we chat in a direct way like discord or whatsapp to install it together so you can be with me all the way please

@livenson
Copy link
Collaborator

Hi, we provide direct communication channels to paying customers only, sorry.

@Ghaithkhelifi
Copy link

ok so i just reinstalled the vps with debian 12 and I just installed docker from the guide in their site and i will run the commands as in the description and will tell you what i get

@Ghaithkhelifi
Copy link

this is the log of waldur-mastermind-whitelabeling-init
its the only one stopped after installation this is the log

INFO: Welcome to Waldur Mastermind!

INFO: Creating user waldur 984:984

INFO: Create logging directory

INFO: Create media assets directory

'/etc/waldur/id_rsa' -> '/var/lib/waldur/id_rsa'

INFO: Spawning init-whitelabeling

INFO: Override whitelabeling settings...

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

SITE_NAME has been set to Waldur.

SITE_ADDRESS has been set to changeme st 27.

SITE_EMAIL has been set to changeme@example.com.

SITE_PHONE has been set to +372changeme.

SHORT_PAGE_TITLE has been set to changeme.

FULL_PAGE_TITLE has been set to Waldur | Cloud Service Management.

BRAND_COLOR has been set to #307300.

BRAND_LABEL_COLOR has been set to .

HERO_LINK_LABEL has been set to changeme.

HERO_LINK_URL has been set to http://example.com.

SITE_DESCRIPTION has been set to changeme.

CURRENCY_NAME has been set to EUR.

DOCS_URL has been set to https://docs.waldur.com/.

SUPPORT_PORTAL_URL has been set to https://docs.waldur.com/.

POWERED_BY_LOGO file does not exist.

HERO_IMAGE file does not exist.

SIDEBAR_LOGO file does not exist.

SIDEBAR_LOGO_MOBILE file does not exist.

SITE_LOGO file does not exist.

Traceback (most recent call last):

File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute

return self.cursor.execute(sql, params)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

psycopg2.errors.UndefinedTable: relation "media_file" does not exist

LINE 1: SELECT 1 AS "a" FROM "media_file" WHERE "media_file"."name" ...

                         ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/usr/local/bin/waldur", line 6, in

sys.exit(main())

         ^^^^^^

File "/usr/src/waldur/src/waldur_core/server/manage.py", line 10, in main

execute_from_command_line(sys.argv)

File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line

utility.execute()

File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 436, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv

self.execute(*args, **cmd_options)

File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute

output = self.handle(*args, **options)

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/waldur/src/waldur_mastermind/marketplace_support/management/commands/override_constance_settings.py", line 55, in handle

setting_value = make_constance_file_value(setting_value)

                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/waldur/src/waldur_mastermind/marketplace_support/management/commands/override_constance_settings.py", line 18, in make_constance_file_value

path = default_storage.save(filename, image_content)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/core/files/storage/base.py", line 44, in save

name = self.get_available_name(name, max_length=max_length)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/core/files/storage/base.py", line 88, in get_available_name

while self.exists(name) or (max_length and len(name) > max_length):

      ^^^^^^^^^^^^^^^^^

File "/usr/src/waldur/src/waldur_core/media/storage.py", line 65, in exists

return models.File.objects.filter(name=name).exists()

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists

return self.query.has_results(using=self.db)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results

return compiler.has_results()

       ^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results

return bool(self.execute_sql(SINGLE))

            ^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql

cursor.execute(sql, params)

File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute

return self._execute_with_wrappers(

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers

return executor(sql, params, many, context)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute

with self.db.wrap_database_errors:

File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit

raise dj_exc_value.with_traceback(traceback) from exc_value

File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute

return self.cursor.execute(sql, params)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

django.db.utils.ProgrammingError: relation "media_file" does not exist

LINE 1: SELECT 1 AS "a" FROM "media_file" WHERE "media_file"."name" ...

                         ^

@Ghaithkhelifi
Copy link

https://212.115.124.20/ this is the ip of my server its has white screen

@Ghaithkhelifi
Copy link

@livenson so whats the problem and how can I fix it

@Ghaithkhelifi
Copy link

now also waldur-mastermind-db-migration stoped with exited - code 0

this is the log
Applying waldur_azure.0014_networkinterface_ip_address... OK

Applying waldur_azure.0015_location_enabled... OK

Applying waldur_azure.0016_extend_description_limits... OK

Applying waldur_azure.0017_error_traceback... OK

Applying waldur_azure.0018_drop_spl... OK

Applying waldur_azure.0019_add_offer_field... OK

Applying waldur_azure.0020_sizeavailabilityzone... OK

Applying waldur_azure.0021_image_locations... OK

Applying waldur_digitalocean.0001_initial... OK

Applying waldur_digitalocean.0002_extend_description_limits... OK

Applying waldur_digitalocean.0003_droplet_error_traceback... OK

Applying waldur_digitalocean.0004_drop_spl... OK

Applying waldur_firecrest.0001_initial... OK

Applying waldur_firecrest.0002_extend_job_model... OK

Applying waldur_firecrest.0003_alter_job_report... OK

Applying waldur_freeipa.0004_update_username_to_lowercase... OK

Applying waldur_lexis.0001_initial... OK

Applying waldur_openstack_replication.0001_initial... OK

Applying waldur_paypal.0001_initial... OK

Applying waldur_paypal.0002_immutable_default_json... OK

Applying waldur_paypal.0003_payment_error_traceback... OK

Applying waldur_pid.0001_initial... OK

Applying waldur_rancher.0038_alter_rancheruser_user... OK

Applying waldur_rancher.0039_cluster_tenant... OK

Applying waldur_vmware.0001_squashed_0025_drop_spl... OK

INFO: Loading features...

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

Invalid features detected: project.team, support.resources_treemap, project.events, customer.team, customer.billing, customer.events, marketplace.terms_of_service

18 features have been updated.

INFO: Loading notifications...

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

The notification structure.notifications_profile_changes_operator has been created with status True

The notification structure.change_email_request has been created with status True

The notification structure.structure_role_granted has been created with status True

The notification users.invitation_created has been created with status True

The notification users.invitation_requested has been created with status True

The notification users.invitation_rejected has been created with status True

The notification users.invitation_approved has been created with status True

The notification users.invitation_expired has been created with status True

The notification users.permission_request_submitted has been created with status True

The notification booking.notification has been created with status True

The notification invoices.upcoming_ends_notification has been created with status True

The notification invoices.notification has been created with status True

The notification marketplace.notify_consumer_about_pending_order has been created with status True

The notification marketplace.notify_provider_about_pending_order has been created with status True

The notification marketplace.notification_usages has been created with status True

The notification marketplace.notification_about_stale_resources has been created with status True

The notification marketplace.marketplace_resource_termination_scheduled_staff has been created with status True

The notification marketplace.marketplace_resource_update_succeeded has been created with status True

The notification marketplace.marketplace_resource_update_limits_succeeded has been created with status True

The notification marketplace.marketplace_resource_create_succeeded has been created with status True

The notification marketplace.marketplace_resource_termination_scheduled has been created with status True

The notification marketplace.notification_about_project_ending has been created with status True

The notification marketplace.notification_about_resource_ending has been created with status True

The notification marketplace.marketplace_resource_update_limits_failed has been created with status True

The notification marketplace.marketplace_resource_update_failed has been created with status True

The notification marketplace.marketplace_resource_create_failed has been created with status True

The notification marketplace.marketplace_resource_terminate_succeeded has been created with status True

The notification marketplace.marketplace_resource_terminate_failed has been created with status True

The notification rancher.notification_create_user has been created with status True

The notification marketplace_remote.notification_about_pending_project_updates has been created with status True

The notification marketplace_remote.notification_about_project_details_update has been created with status True

The notification marketplace_policy.notification_about_project_cost_exceeded_limit has been created with status True

The notification support.notification_comment_added has been created with status True

The notification support.notification_comment_updated has been created with status True

The notification support.notification_issue_feedback has been created with status True

The notification support.notification_issue_updated has been created with status True

The notification support.description has been created with status True

The notification support.summary has been created with status True

INFO: Cleanup API configuration settings cache...

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

API_CONFIGURATION key has been cleaned from cache.

INFO: Override templates...

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

Templates file is empty.

INFO: Load Terms Of Service and Privacy Policy

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

INFO: Loading OIDC configuration

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

INFO: Loading permissions configuration

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

Updating description of role CUSTOMER.OWNER from to Organization owner.

Updating description of role CUSTOMER.MANAGER from to Organization manager.

Updating description of role PROJECT.ADMIN from to Project administrator.

Updating description of role PROJECT.MANAGER from to Project manager.

Updating description of role OFFERING.MANAGER from to Offering manager.

Role CALL.REVIEWER is missing permissions block, skipping

Role CUSTOMER.SUPPORT is missing permissions block, skipping

Updating description of role CALL.MANAGER from to Call manager.

Updating description of role PROPOSAL.MANAGER from to Proposal manager.

INFO: Customising permissions configuration

/usr/local/lib/python3.11/site-packages/glanceclient/common/http.py:171: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if kwargs.get('cacert', None) is not '':

@livenson
Copy link
Collaborator

ok, so you just didn't finish waiting for initial migrations to be applied. Please check again.

PS. Exit code 0 is a good exit code :)

@Ghaithkhelifi
Copy link

how much do i wait and do I need to reboot those container cuz they are stopped

@livenson
Copy link
Collaborator

db-migration container is basically a one time thing. Worker and API should be up. They are also restarting automatically so unless you've stopped them manually, they should be working.

@Ghaithkhelifi
Copy link

i didnt stop them i just check every two there minutes and I see that its stopped by itself

@Ghaithkhelifi
Copy link

and the front end still white and even after I reboot those two container they will take 1 or two minutes and will stop and give me the code exited - code 0

@Ghaithkhelifi
Copy link

i tried to install it now for over 10 times in different servers and the same thing with the same error

@Ghaithkhelifi
Copy link

waldur-mastermind-whitelabeling-init
why this always stoped by itself i restart it and keep up for one minute and it stopped

@livenson
Copy link
Collaborator

  1. please show docker ps -a
  2. please show output of "docker logs waldur-homeport --tail 20" and "docker logs waldur-mastermind-api --tail 20"

@livenson
Copy link
Collaborator

waldur-mastermind-whitelabeling-init why this always stoped by itself i restart it and keep up for one minute and it stopped

This is a one time job for initializing waldur with settings from conf files. It is normal that it stops once it has loaded the data.

@Ghaithkhelifi
Copy link

root@P5tAZ21AttV3igPBvtyG:/waldur-docker-compose# docker compose ps
WARN[0000] /root/waldur-docker-compose/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
caddy docker.io/library/caddy:2 "caddy run --config …" caddy-router About an hour ago Up 36 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 443/udp, 2019/tcp
keycloak quay.io/keycloak/keycloak:25.0 "/opt/keycloak/bin/k…" keycloak About an hour ago Up 36 minutes 8080/tcp, 8443/tcp, 9000/tcp
keycloak-db docker.io/library/postgres:10 "docker-entrypoint.s…" keycloak-db About an hour ago Up 36 minutes (healthy) 5432/tcp
logger umputun/docker-logger "/init.sh /srv/docke…" logger About an hour ago Up 36 minutes
waldur-db docker.io/library/postgres:12 "docker-entrypoint.s…" waldur-db About an hour ago Up 36 minutes (healthy) 5432/tcp
waldur-homeport docker.io/opennode/waldur-homeport:7.0.5 "/docker-entrypoint.…" waldur-homeport About an hour ago Up 36 minutes (healthy) 80/tcp
waldur-mastermind-api docker.io/opennode/waldur-mastermind:7.0.5 "/app-entrypoint.sh …" waldur-mastermind-api About an hour ago Up 36 minutes
waldur-mastermind-beat docker.io/opennode/waldur-mastermind:7.0.5 "/app-entrypoint.sh …" waldur-mastermind-beat About an hour ago Up 36 minutes
waldur-mastermind-worker docker.io/opennode/waldur-mastermind:7.0.5 "/app-entrypoint.sh …" waldur-mastermind-worker About an hour ago Up 36 minutes (healthy)
waldur-queue docker.io/bitnami/redis:latest "/opt/bitnami/script…" waldur-queue About an hour ago Up 36 minutes 6379/tcp
root@P5tAZ21AttV3igPBvtyG:
/waldur-docker-compose#

@Ghaithkhelifi
Copy link

now why the frontend is white 😅

@livenson
Copy link
Collaborator

Did you change the https settings in caddy? in the .env file. It has to match with the domain name or be self-signed. From the link you've provided it seems that caddy is not working properly. You can check its logs also with docker logs caddy

@Ghaithkhelifi
Copy link

how to change that i didnt change anything just followed the exact guide and didn't connect any domain to it yet only accessing it through IP

@Ghaithkhelifi
Copy link

hello !!

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

No branches or pull requests

3 participants