Cas 5 - Management Webapp - Couchbase service registry

143 views
Skip to first unread message

Elendrys Yagami

unread,
Nov 20, 2016, 7:20:04 AM11/20/16
to CAS Community
Hello,

I'm trying to store my services into a couchbase bucket. So far it seems ok with cas itself. It loads the default services into the bucket, and whenever i manually add one, it claims it is loaded.

The problem is with the management webapp. It creates a default entry with the callback url in the bucket and also sees whenever i manually add a service, but, when I log into the web interface, it bugs with the message :

                   
                           
{{ serviceTableCtrl.alert.data.name }}
                           
{0} a été supprimé.
                       

                       

                           
Le service ne peut pas être supprimé.
                       

                       

                           
Unable to retrieve service listing.
                       

                       

                           
L'ordre des services n'a pas pu être mis à jour.

I added the dependency to my pom.xml :

        <dependency>
           
<groupId>org.apereo.cas</groupId>
           
<artifactId>cas-server-support-couchbase-service-registry</artifactId>
           
<version>${cas.version}</version>
       
</dependency>

And my config is

cas.server.name: https://ldap.elendrys.fr:443
cas.server.prefix: https://ldap.elendrys.fr:443/cas

cas.mgmt.adminRoles=ROLE_ADMIN
cas.mgmt.userPropertiesFile=file:/etc/cas/config/users.properties
cas.mgmt.serverName=https://ldap.elendrys.fr:443
server.context-path=/cas-management
server.port=443

spring.thymeleaf.mode=HTML
logging.config=file:/etc/cas/config/log4j2.xml

#########################
# Json Service Registry #
#########################
#cas.serviceRegistry.config.location=file:///etc/cas/services/

##############################
# Couchbase service registry #
##############################
cas.serviceRegistry.couchbase.nodeSet=cas2.elendrys.fr
cas.serviceRegistry.couchbase.password=cassecret
cas.serviceRegistry.couchbase.queryEnabled=true
cas.serviceRegistry.couchbase.bucket=service
cas.serviceRegistry.couchbase.timeout=30


Is there anything I forgot or mitstake ?

And Is the v5 ready for production ?

Thanks

Elendrys Yagami

unread,
Nov 25, 2016, 5:35:10 AM11/25/16
to CAS Community
I reply to myself as I couldn't get any answer.

The couchbase registry is working fine and the casted error is not related to it.

The answer is that the scripts location defined for ng-tables is broken, so you have to override the location in the default template :
- copy the "target/cas-management/WEB-INF/classes/templates/fragments/head.html" to  "src/main/resources/templates/fragments" in the git local repository of the project
- edit the file and change the references to the ng-tables js and css from rawgit to cloudflare (go to https://cdnjs.com and pickup link for the v1.0.0 of ng-tables library)
- rebuild your war with the new links

The interface becomes functionnal again.

dkopy...@unicon.net

unread,
Nov 25, 2016, 6:38:31 AM11/25/16
to CAS Community
Sounds like this needs to be fixed in the CAS core repo... Would you like to contribute the fix in the form of a pull request?

D.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/6b2cdac0-7500-44f0-b0c6-75f46aea6fea%40apereo.org.

Elendrys Yagami

unread,
Nov 25, 2016, 3:56:35 PM11/25/16
to CAS Community, dkopy...@unicon.net
I'd like to, but to be honest I'm not a Java developer and I am discovering the wondefull world of wars and maven templates.

I guess I may want to unpack the cas-management-5.0.0.war in my .m2 dir got from sonatype, change the links et repack it, then push it somewhere to sonatype

It is just a guess with my current knowledge of java stuff (close to zero) and I really don't know how to do it

Lackern Xu

unread,
Jun 13, 2017, 12:59:14 AM6/13/17
to CAS Community
Hi, do you have a copy of the changes for reference?

Elendrys Yagami

unread,
Jun 13, 2017, 2:23:52 AM6/13/17
to CAS Community
Hi.

This bug has been fixed in the 5.0.1 update.

Lackern Xu

unread,
Jun 13, 2017, 2:32:58 AM6/13/17
to CAS Community
Hi, 

I am still facing the issue on latest 5.1.0. Still trying to troubleshoot it untill i came across your old posts.

This is the exact error i am getting:

{{ serviceTableCtrl.alert.data.name }} has been successfully deleted.  A problem has occurred while trying to delete the service. Be aware that the default service can not be deleted.  Unable to retrieve service listing.  The service evaluation order can not be updated.

Elendrys Yagami

unread,
Jun 13, 2017, 7:05:07 PM6/13/17
to CAS Community

The page couldn't load the JavaScript because an online library had moved. I tried to browse the lib manually and fixed the link by overloading the file. Check that your browser is not configured to block js as well.


--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/4I2FAjnQQyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1b5e0ad4-e0a8-4d62-831c-51957636d433%40apereo.org.
Reply all
Reply to author
Forward
0 new messages