Alain,

Your fstab file shows that /var should be mounting correctly, but a file 
system can become read-only for any number of reasons. If it is in fact 
read only, then any user, even root, would not be able to write to it. You 
could try the following command from the directory /var/log/cas-management 
:     touch testfile

If it creates testfile, then the file system is not read only. If it is 
read only, you may need to un/remount /var, or simply reboot. If the file 
system encountered some kind of error, a reboot should hopefully correct it.

That's a good start, just to reduce the problem down to either something 
wrong at the OS level, or otherwise, something wrong in the configuration 
of your application. If the file system is not read only, then, as David 
said, check everything detail by detail. Also to one of David's points, 
start up Tomcat and look at ps or top to see which uid the is running the 
Tomcat process. If it's not tomcat or root (please don't run tomcat as 
root!), then it won't be able to write to /var/log/cas-management

Matt

On Wednesday, July 24, 2019 at 7:13:02 AM UTC-6, alain ubfc wrote:
>
> David,
>
> I have the log of tomcat /var/log/tomcat/catalina.ou. And it works.
>
> Here is my file /etc/fstab
>
> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a
> # device; this may be used with UUID= as a more robust way to name devices
> # that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> /dev/mapper/casermgnt--vg-root /               ext4    errors=remount-ro 0 
>       1
> # /boot was on /dev/sda1 during installation
> UUID=af1e7cbd-4161-4099-9000-a7ebbb14c336 /boot           ext2   
>  defaults        0       2
> /dev/mapper/casermgnt--vg-home /home           ext4    defaults        0 
>       2
> /dev/mapper/casermgnt--vg-tmp /tmp            ext4    defaults        0   
>     2
> /dev/mapper/casermgnt--vg-var /var            ext4    defaults        0   
>     2
> /dev/mapper/casermgnt--vg-swap_1 none            swap    sw              0 
>       0
> /dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
>
> I don't see it.
>
>
> Le mercredi 24 juillet 2019 13:30:30 UTC+2, David Curry a écrit :
>>
>> [2019-07-22 08:57:45] [info] 2019-07-22 08:57:45,023 main ERROR 
>> RollingFileManager (/var/log/cas-management/cas-management.log) 
>> java.io.FileNotFoundException: /var/log/cas-management/cas-management.log 
>> (Read-only 
>> file system)
>>
>> Is your file system mounted read-only? Is the directory writable by the 
>> tomcat user (or whatever user is running the tomcat process)? 
>> RollingFileAppenders need write permission to the directory the log files 
>> are in, not just the log files themselves.
>>
>> --
>>
>> DAVID A. CURRY, CISSP
>> *DIRECTOR • INFORMATION SECURITY & PRIVACY*
>> THE NEW SCHOOL • INFORMATION TECHNOLOGY
>>
>> 71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
>> +1 646 909-4728 • [email protected]
>>
>>
>> On Wed, Jul 24, 2019 at 2:14 AM alain ubfc <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> In fact I noticed that the/var/log/case-management file has nothing in 
>>> it.
>>>
>>> Yet I set the rights for the file cas-management.log with the chown -R 
>>> tomcat:tomcat/var/log/cas-management command.
>>>
>>> [2019-07-22 08:57:43] [info] 2019-07-22 08:57:43,429 main ERROR Could 
>>> not create plugin of type class org.apache.logging.log4j.core.appender.
>>> RollingFileAppender for element RollingFile: java.lang.
>>> IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.
>>> appender.rolling.RollingFileManager$RollingFileManagerFactory@6ea59bb2] 
>>> unable to create manager for [/var/log/cas-management/cas-management.log
>>> ] with data [org.apache.logging.log4j.core.appender.rolling.
>>> RollingFileManager$FactoryData@506344b1[pattern=/var/log/cas-management/
>>> cas-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=
>>> 8192, policy=CompositeTriggeringPolicy(policies=[
>>> OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), 
>>> TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=
>>> false)]), strategy=DefaultRolloverStrategy(min=1, max=5, useMax=true), 
>>> advertiseURI=null, layout=%highlight{%d %p [%c] - <%m>%n}, 
>>> filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: 
>>> ManagerFactory [org.apache.logging.log4j.core.appender.rolling.
>>> RollingFileManager$RollingFileManagerFactory@6ea59bb2] unable to create 
>>> manager for [/var/log/cas-management/cas-management.log] with data [org.
>>> apache.logging.log4j.core.appender.rolling.
>>> RollingFileManager$FactoryData@506344b1[pattern=/var/log/cas-management/
>>> cas-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=
>>> 8192, policy=CompositeTriggeringPolicy(policies=[
>>> OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), 
>>> TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=
>>> false)]), strategy=DefaultRolloverStrategy(min=1, max=5, useMax=true<span 
>>> style="color:rgb(102,102,0
>>>
>>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cb93b92e-e1ef-4b4c-9595-1bcdb1842d9a%40apereo.org.

Reply via email to