From cco at capraconsulting.no Wed Feb 15 06:04:39 2017 Content-Type: multipart/mixed; boundary="===============6708065593343718459==" MIME-Version: 1.0 From: Colin Coleman To: keycloak-user at lists.jboss.org Subject: Re: [keycloak-user] HTTP error - 400 Bad Request - create realm CLI Date: Wed, 15 Feb 2017 12:04:34 +0100 Message-ID: <24A76700-A8EA-4C9A-9E9A-736DA9E12A88@capraconsulting.no> In-Reply-To: BB4315E2-D506-4D66-A4D7-8AB512352C94@capraconsulting.no --===============6708065593343718459== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The =E2=80=93x trick gave me enough info to find this=E2=80=A6 = https://issues.jboss.org/browse/KEYCLOAK-1268 = And even if the workarounds work it looks like keycloak was not designed an= d is not tested for the sort of multi-tenant setup I was trying to do. = The jdbc driver version was a red herring =E2=80=93 everything is the lates= t version = Using the CLI with =E2=80=93x I got the following = HTTP error - 400 Bad Request org.keycloak.client.admin.cli.util.HttpResponseException: HTTP error - 400 = Bad Request =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.keycloak.client.admin.cli.util.HeadersBodyStatus.che= ckSuccess(HeadersBodyStatus.java:61) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.keycloak.client.admin.cli.util.HttpUtil.checkSuccess= (HttpUtil.java:329) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.keycloak.client.admin.cli.commands.AbstractRequestCm= d.process(AbstractRequestCmd.java:363) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.keycloak.client.admin.cli.commands.AbstractRequestCm= d.execute(AbstractRequestCmd.java:126) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.jboss.aesh.console.command.container.DefaultCommandC= ontainer.executeCommand(DefaultCommandContainer.java:63) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.jboss.aesh.console.command.container.DefaultCommandC= ontainer.executeCommand(DefaultCommandContainer.java:48) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.keycloak.client.admin.cli.aesh.AeshConsoleCallbackIm= pl.execute(AeshConsoleCallbackImpl.java:54) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:= 53) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPoolExecutor.runWorker(Thread= PoolExecutor.java:1142) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Threa= dPoolExecutor.java:617) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: 400 Request Header Or Cookie Too Large

400 Bad Request

Request Header Or Cookie Too Large

awselb/2.0
= Colin = = From: Colin Coleman Date: Wednesday, 15 February 2017 at 10:05 To: Marko Strukelj Cc: keycloak-user Subject: Re: [keycloak-user] HTTP error - 400 Bad Request - create realm CLI = There is no stacktrace on the logs =E2=80=93 I turned the lev= el up to debug and could find nothing then either. The only difference between a success when there were less than 20 realms a= nd a failure when there were more than 20 realms was a lack of debug lines= from org.hibernate which seems to show that the database never gets querie= d when a 400 is produced. = My Stack is: Ubuntu 16.04 openjdk version "1.8.0_121" PostgreSQL 9.6.1 (running on different machine) keycloak-2.5.1.Final =E2=80=93 running uning standalone-ha.xml DB driver: postgresql-9.4.1212.jre6.jar = Writing this I notice that the db driver and db are not on the same level = =E2=80=93 I will update this and test again. = ------------------------------------------------ Colin = = From: Marko Strukelj Date: Tuesday, 14 February 2017 at 18:16 To: Colin Coleman Cc: keycloak-user Subject: Re: [keycloak-user] HTTP error - 400 Bad Request - create realm CLI = There is no such restriction, and I can't reproduce your issue. = Is there any stacktrace on the server? = Do you get any more information on the client if you add -x option? = = = On Tue, Feb 14, 2017 at 1:01 PM, Colin Coleman w= rote: Hello, Is there a setting limiting the number of realms that can be created with t= he CLI? When creating realms via the CLI I start getting HTTP error - 400 Bad Reque= st after about 20 realms kcadm.sh create realms -s realm=3Dtest3 -s enabled=3Dtrue kcadm.sh create realms -s realm=3Dtest4 -s enabled=3Dtrue kcadm.sh create realms -s realm=3Dtest5 -s enabled=3Dtrue . . . I get . . Created new realm with id 'test13' Created new realm with id 'test14' HTTP error - 400 Bad Request HTTP error - 400 Bad Request . . . Colin _______________________________________________ keycloak-user mailing list keycloak-user(a)lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user = --===============6708065593343718459==--