Keycloak 19 docker can't find suitable driver for sqlserver - sql-server

I deployed keycloak 19 in azure app service using the quay.io/keycloak/keycloak:19.0.1 image; It's working fine when using the dev file database; but I'm having trouble when I tried to connect on my SQL server database, I followed the instruction here but I'm getting the error below
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: No suitable driver found for jdbc:sqlserver://MySDBServer:1433;databaseName=MyDatabaseName
Here's my Setup in app settings configurations
KC_DB:mssql
KC_DB_URL_HOST:[MyDatabaseServer]
KC_DB_PASSWORD:[MyDatabasePassword]
KC_DB_USERNAME:[MyDatatabaseUsername]
KC_DB_URL_DATABASE:[MydatabaseName]
KC_PROXY:edge

Passing the --optimized parameter to the start should fix it.
bin/kc.[sh|bat] start --optimized
In case of a Dockerfile, your ENTRYPOINT will look like:
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start", "--optimized"]
You can read about the --optimized parameter at the links given below.
Optimize the Keycloak startup
Changes to the server configuration and startup

Related

Openstack keystone token issue. Failed to discover available identity versions

Im attempting to setup keystone identity service on virtualized Ubuntu 20.4 via Windows Hyper-V on Windows 10.
I followed the instructions on: https://docs.openstack.org/keystone/pike/install/index-ubuntu.html very carefully & attempted this 4 times from scratch with a new VM.
However, all calls to OpenStack web service API either via curl, or command line result in some type of 404 Error.
Here my detailed steps (not including VM setup):
Install & Setup MySQL for keystone:
apt install keystone :
configure keystone:
fernet setup:
Bootstrap keystone:
Apache2 setup:
In /etc/apache2/apache2.conf
Set ServerName controller
source confif file
check port 5000.
set local host name resolution:
Start apache. service apache2 restart
Here is the issue:
Attempt # 1 - Using curl to call keystone API (404):
Attempt # 2 - Using openstack command line tool, again (404):
Troubleshooting:
Keystone logs look good with no error:
Furthermore, apache2 is running as I can see default server page:
So why cant keystone API be reached?
Appreciated
export these variables and test again
export OS_AUTH_VERSION=3
export OS_ENDPOINT_TYPE=internalURL
export OS_INTERFACE=internalURL
export OS_AUTH_TYPE=password
export OS_TENANT_NAME=admin
export OS_NO_CACHE=1
check your wsgi and apache2 vhost config too, to make sure apache will redircet it correctly
would you please check if libapache2-mod-WSGI is installed as it is mentioned in the documentation
enter image description here

Cannot use chectl auth:login or server:shutdown

I am attempting to restart my local eclipse che server after editing some configuration. I attempted to run chectl server:stop, but got this error:
» Error: E_SHUTDOWN_CHE_SERVER_FAIL - Failed to shutdown Eclipse Che server. Login context is not set. Please login
» first.
So I attempted to login with chectl auth:login, but was again presented with an error:
Using https://che-che.169.254.109.208.nip.io/api server API URL to log in
Error: Command failed with exit code 1: oc status
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
I've looked through the documentation, and couldn't find how to create a "default" project
I used chectl server:deploy --platform=docker-desktop to start my server.
I have tried other methods of deploying che, but it only worked when using Docker desktop without helm.
I am using Windows 10 home, and deploying it using Docker desktop (Engine v19.03.13) and kubernetes version v1.19.3.
Edit: I have filed a bug report on github: https://github.com/eclipse/che/issues/18355

How to connect Google Cloud SQL via Google App engine Flex to botnet core app?

I have a .NET Core 2.2 app using a PostgreSQL DB.
Now I want to deploy it on Google Cloud App Engine Flex and Google Cloud SQL PostgreSQL.
I tried the official way and found this, where I found that you have to use $ gcloud beta app deploy instead of $ gcloud app deploy
My app.yaml configuration file:
env: flex
runtime: aspnetcore
beta_settings:
cloud_sql_instances: "<SQL-NAME>=tcp:<PORT>"
The issue is that I get this error:
Trying to connect to
Host=127.0.0.1;Port=XXX;Username=XXX;Password=XXX;Database=XXX;
Application startup exception: System.Net.Sockets.SocketException
(111): Connection refused
Do I have to include special libraries into .NET Core 2.2 to support Google App Engine?
You don't need to include any special libraries in .NET Core 2.2 rather than those that are already included in the Quckstart that you have shared above, unless of course you are using any additional libraries in your code.
I have tried the quickstart and deployed my .NET GAE app that connects to CloudSQL PostgreSQL database.
Taking a look at your app.yaml configuration file I can see that there is an issue with it. Also based on the error message you are getting I assume that you are having an issue in your appsettings.json file as well.
Based on the quickstart of GitHub that you shared, the configuration when deploying should be:
app.yaml
runtime: aspnetcore
env: flex
beta_settings:
cloud_sql_instances: "[PROJECT_ID]:[INSTANCE_REGION]:[INSTANCE_NAME]=tcp:[TCP_PORT_NUMPER]"
TCP Port number for PostgreSQL: 5432
TCP Port number for MySQL: 3306
To find the Instance connection name which is the part before tcp, you can go to Cloud Console > SQL > [YOU_INSTANCE_NAME] and you can find the entire string under Instance connection name
appsettings.json
{
"CloudSQL" : {
"Database" : "PostgreSQL", // Set to "PostgreSQL" when using a PostgreSQL database.
// [START gae_flex_mysql_settings]
"ConnectionString": "Uid=[USER_ID];Pwd=[PASSWORD];Host=cloudsql;Database=[DATABASE_NAME]"
// [END gae_flex_mysql_settings]
}
}
Database should be PostgreSQL as also specified by the comment
ConnectionString should be filled with your own data that you used to setup the database
The Host part should be cloudsql when you are deploying and 127.0.0.1 when running locally.
127.0.0.1 indicates that the database is running locally and the cloudsql string indicates that it should use the connection string name. Based on the error, I assume that you used the 127.0.0.1 to test locally but then forgot to change it back when you were deploying.

Configuring a Postgresql connection with Play 2 and Slick-Play

I'm learning how to build an application using Scala and the Play 2 Framemork. I`ve created a new project using the activator tool, based on "play-scala-intro" current template.
The template have a sample app using the Play-Slick 1.0 for managing dependencies and is configured with a H2 DB, that worked without problems.
When I tried to change to a Postgres DB, I'm running in trouble. I get an error 500, telling me:
"Cannot connect to database [default]".
In the stack trace, the exception is:
"Configured Slick driver org.postgresql.Driver is not an instance of
requested profile slick.profile.BasicProfile"
So... What I already did:
I added to my build.sbt file the dependency:
"org.postgresql" % "postgresql" % "9.4-1201-jdbc41"
In my configuration file (application.conf), the DB connection is configured as:
slick.dbs.default.driver=org.postgresql.Driver
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/hello_play"
slick.dbs.default.db.user="postgres" slick.dbs.default.db.password=""
PS: I've tried with slick.dbs.default.driver="org.postgresql.Driver" too...
PS2: My db password is empty. I'm connecting with PgAdmin without problems
slick.dbs.default.driver must be a slick driver, not a JDBC driver. Your db config should look something like this:
slick.dbs.default.driver="slick.driver.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/hello_play"
slick.dbs.default.db.user="postgres"
slick.dbs.default.db.password=""

could not connect to local host

Recently i installed apache tomcat 6 on my PC.I started the server and try to open the tomcat manager using the url:
http://localhost:8081/manager/html
8081 is the connector port i used at the time of installation and no other services using this port.But its shows the error like
Oops! Google Chrome could not connect to localhost:8081
I used this with differnt browsers IE and crome but still getting the same error
Please provide me the solving to getrid of this.
Try the "Test your Install" section here.
first make sure the your server is running correctly by connect to http://localhost:8081/

Resources