[keycloak-dev] Disappearing Keycloak deployment

Stan Silvert ssilvert at redhat.com
Mon Jun 6 17:08:29 EDT 2016


On 6/6/2016 4:55 PM, Brooks Isoldi wrote:
> We will give it a shot and try to reproduce with just the 
> keycloak-server.war file alone.
>
> Meanwhile, can you give some instruction on how to tie my application 
> into the Keycloak authentication?  The manual says to drop the 
> following into the web.xml file:
>
>     <login-config>
>         <auth-method>KEYCLOAK</auth-method>
>         <realm-name>app-name</realm-name>
>     </login-config>
You will still need the auth-method.
>
> I assume that will not work if keycloak resides on a totally separate 
> server...Or will that be taken care of by the "auth-server-url" in the 
> keycloak.json file?
See the section on how to use the WildFly adapter for your 
application/client. 
http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#jboss-adapter
>
> Thanks.
>
>
>
>
> On 06/06/2016 04:34 PM, Stan Silvert wrote:
>> We strongly, strongly, strongly discourage application deployment on 
>> the Keycloak server.  In fact, we might soon be taking steps keep 
>> people from doing that.
>>
>> Can you re-create the problem with the Keycloak server alone?
>>
>> On 6/6/2016 4:00 PM, Brooks Isoldi wrote:
>>> Stian,
>>>
>>> I apologize, by "non-JEE" application, I meant only that it does not 
>>> rely on standalone-full.xml.  We're using only standalone.xml for 
>>> the application deployed to the keycloak wildfly server.
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> On 06/06/2016 02:19 PM, Brooks Isoldi wrote:
>>>> Bill,
>>>>
>>>> We do not see the war being redeployed upon startup.
>>>>
>>>>
>>>> Stian,
>>>>
>>>> We are deploying a non-JEE application to the Keycloak Wildfly 
>>>> instance and our initial setup process includes the following commands:
>>>>
>>>>
>>>> sudo ./jboss-cli.sh -c <<EOF
>>>> module add --name=org.postgres 
>>>> --resources=${KEYCLOAK_INSTALL_DIR}/${JDBC_FILENAME} 
>>>> --dependencies=javax.api,javax.transaction.api
>>>> /subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
>>>> data-source add --jndi-name=java:/PostgresDS --name=PostgrePool 
>>>> --connection-url=jdbc:postgresql://${POSTGRES_SERVER_URL} 
>>>> --driver-name=postgres --user-name=<<USERNAME>> --password=<<PASSWORD>>
>>>> /core-service=management/security-realm=ApplicationRealm/server-identity=ssl/:add(keystore-path=keystore.jks, 
>>>> keystore-relative-to=jboss.server.config.dir, 
>>>> keystore-password=<<PASSWORD>>, alias=keystore, 
>>>> key-password=<<PASSWORD>>)
>>>> EOF
>>>>
>>>> sleep 10
>>>>
>>>> sudo service wildfly restart
>>>>
>>>> sleep 10
>>>>
>>>> sudo ./jboss-cli.sh -c <<EOF
>>>> /subsystem=undertow/server=default-server/https-listener=https/:add(socket-binding=https, 
>>>> security-realm=ApplicationRealm)
>>>> EOF
>>>>
>>>> sleep 10
>>>>
>>>> sudo service wildfly restart
>>>>
>>>> sleep 10
>>>>
>>>> cd ${KEYCLOAK_INSTALL_DIR}/bin
>>>> sudo ./jboss-cli.sh -c --file=adapter-install.cli
>>>>
>>>>
>>>>
>>>>
>>>> On 06/06/2016 01:18 PM, Stian Thorgersen wrote:
>>>>> Do you modify the standalone distribution in any way? Do you 
>>>>> deploy applications to it? Anything else that you do to it that 
>>>>> could affect this?
>>>>>
>>>>> On 6 June 2016 at 16:52, Brooks Isoldi 
>>>>> <brooks.isoldi at traversed.com <mailto:brooks.isoldi at traversed.com>> 
>>>>> wrote:
>>>>>
>>>>>     I'm using the standalone distribution of 1.9.4.Final.
>>>>>
>>>>>     We have had this issue after executing "sudo service wildfly
>>>>>     restart" on command line.  We've also had it happen after
>>>>>     starting Keycloak by simply running
>>>>>     ./$JBOSS_HOME/bin/standalone.sh and after it starts up,
>>>>>     hitting cntrl-c. Additionally, we think it happened once while
>>>>>     running shutdown --restart=true within the JBOSS CLI.
>>>>>
>>>>>     This has happened numerous times now, however we have not been
>>>>>     able to create a reliable reproduction procedure.  I don't
>>>>>     have logs to share right now, however I have seen in the
>>>>>     server.log references to keycloak-server.war being undeployed.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>     On 06/06/2016 02:00 AM, Stian Thorgersen wrote:
>>>>>>     What version of Keycloak and what distribution (standalone,
>>>>>>     overlay or demo) do you use?
>>>>>>
>>>>>>     On 3 June 2016 at 21:56, Brooks Isoldi
>>>>>>     <brooks.isoldi at traversed.com> wrote:
>>>>>>
>>>>>>         I've configured Keycloak as a service on Ubuntu 14.04 and
>>>>>>         I'm finding
>>>>>>         that terminating and restarting the Wildfly service (sudo
>>>>>>         service
>>>>>>         wildfly restart) sometimes results in the
>>>>>>         keycloak-server.war being
>>>>>>         undeployed and removed.
>>>>>>
>>>>>>         Other times it happens by restarting from within the CLI.
>>>>>>
>>>>>>         How do I restart Wildfly without terminating Keycloak?
>>>>>>
>>>>>>         Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>>         -Brooks
>>>>>>         _______________________________________________
>>>>>>         keycloak-dev mailing list
>>>>>>         keycloak-dev at lists.jboss.org
>>>>>>         <mailto:keycloak-dev at lists.jboss.org>
>>>>>>         https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>     _______________________________________________
>>>>>     keycloak-dev mailing list
>>>>>     keycloak-dev at lists.jboss.org <mailto:keycloak-dev at lists.jboss.org>
>>>>>     https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> keycloak-dev mailing list
>>> keycloak-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>
>>
>>
>> _______________________________________________
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160606/0ed26873/attachment-0001.html 


More information about the keycloak-dev mailing list