Comments (10)
With this approach I can implement in a way that if the file is being used (lock files for example) don't try to delete it. What do you think?
No, that's a very very bad idea.
There is an inordinate amount of literature on the CAS docs asking you to stop writing code. What you're describing sounds like an issue with the project; not something you need to fix for you on your own. There is no such thing as the people from CAS. YOU are the people from CAS. YOU are part of the project as you soon as you start deploying the software. The responsibility is shared; not passed off to a bunch of other folks to fix issues for you. Work on the issue, provide a pull request/patch and solve the problem where it belongs once. Or, you'd be setting yourself up for a lot of surprises and disappointments.
from cas-overlay-demo.
Thanks @mmoayyed for your feedback, I would like to contribute with the CAS project, I thought Aspereo was a company and owner of the product. Maybe because I don't have much experience working on open source projects. I don't have much intimacy with the CAS internals, so I'm going to report this problem in the forum and contribute as much as I can to solve this problem. Done!
from cas-overlay-demo.
I have the same problem running on Windows 7
from cas-overlay-demo.
I'm on MacOS X now so I don't have Windows issues anymore ;-) I guess you already tried to clean the Temp
directory before starting the webapp?
from cas-overlay-demo.
I have cleaned manually, restart the windows and the problem still persist. For while I have decided move back to the 4.1.8 CAS version (working on windows 7) because the version 5 seems not fully mature. Hopefully I can integrate with pac4j and spring-boot (next steps).
from cas-overlay-demo.
I have successfully used the version 5 a couple of times (on MacOS X though). Did you report this problem on the CAS mailing list?
@mmoayyed Have you ever heard about this problem on Windows?
from cas-overlay-demo.
I tested with Mac and Linux is working fine, the problem is specific with windows when the Management starts try to delete the service files (json) and the files is still being used. I believe those files is still opened by the cas webapp. The same problem happen even with the 5.0.4 version (supposedly stable)
from cas-overlay-demo.
Reading: https://github.com/apereo/cas/blob/5.0.x/core/cas-server-core-services/src/main/java/org/apereo/cas/services/AbstractResourceBasedServiceRegistryDao.java, I don't see anything which could explain your specific issue. I guess it's only because of Windows.
from cas-overlay-demo.
I found what is going on already, but I believe the people from CAS should change the approach to register the services.
Differently of *nix systems, the Windows lock a file when it is opened (even just for read). It seems there is one or more scheduled tasks reloading the directory "${java.io.tmpdir}/cas/services". I believe is a good idea to use a explicit lock file (opened for loading) in the temp directory and if the lock file exists do not try to delete because it's being used.
To verify that it was happening, first I executed the server and management using different temp directory
java -jar -Djava.io.tmpdir=c:\temp\cas cas-overlay-server-demo\target\cas.war
java -jar -Djava.io.tmpdir=c:\temp\mgr cas-overlay-management-demo\target\cas-management.war
And the errors was became less frequent (loading almost always with success the cas server).
To prove that has an process scheduled I made a couple changes: Created new classes under cas-overlay-server-demo using System.out.println to show when the file is being loaded.
cas-overlay-server-demo.zip
After to see this, I believe the version 5.0.4 is still not tested on Windows systems.
I guess the best way to solve this problem is to create my own class implementing the ServiceRegistryDao
interface. With this approach I can implement in a way that if the file is being used (lock files for example) don't try to delete it. What do you think?
from cas-overlay-demo.
Thanks very much! and excellent work. I would be more than glad to guide you along the internals as much as possible. Lets carry on the conversation on the list and aim towards your first contribution and patch, which is absolutely more than welcome any day and time :)
from cas-overlay-demo.
Related Issues (20)
- Spring Framework - Context Initialization failed HOT 2
- cas-management 503 HOT 2
- https://oss.sonatype.org/content/repositories/snapshots/org/jasig/cas/cas-server-webapp/ No 4.2.1 version
- Not able to run this demo HOT 9
- Which version should I use HOT 2
- Could not resolve dependencies for project org.leleuj :cas-overlay-server-demo:war:4.2.0-SNAPSHOT: Failure to find org.jasig.cas:cas-server-integration-restlet:jar:4.2.0-RC2 HOT 1
- I compiled the master branch but the login page is not available once deployed in Tomcat HOT 1
- Demo not working: Application Not Authorized to Use CAS HOT 5
- Application Not Authorized to Use CAS HOT 1
- Error reading configuration file back-1.json HOT 1
- i imported the project,but run" mvn install" error like this come out,can you help me 无效的标记: --release HOT 1
- Doesn't seem to be working in Tomcat HOT 1
- Manifest not found HOT 1
- Unable to access http://localhost:8080/management HOT 2
- Stacktrace while accessing /cas-management HOT 3
- Exception occurs while trying to run the application HOT 3
- The class 'org.jasig.cas.services.RegexRegisteredService' does not have the property 'anonymousAccess' HOT 3
- The CAS management webapp is Unavailable HOT 11
- Problem accessing /cas/login. Reason: Service Unavailable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cas-overlay-demo.