Hello Matthew,

I just looked in /etc/cas/config ans i have the file you asked me to check.

I removed the excess line line in /etc/cas/config/management.properties

For the user casermgnt i saw that he has no right to launch tomcat when i 
make the following command :

systemctl restart tomcat9.service

I have do a sudo to throw it.

Do you have any idea ?

Thank you

Le mercredi 24 juillet 2019 18:51:27 UTC+2, Matthew Uribe a écrit :
>
> Thank you for confirming that your /var mount point is rw. Also, since you 
> are running tomcat as root (definitely not recommended for PROD), 
> permissions should not be an issue. It sounds like you need to make sure 
> your configurations are all uniform. Specifically, that 
> your /etc/cas/config/log4j2-management.xml file exists, and contains the 
> correct path to /var/log/cas-management 
>
> Also, I noticed that your cas-management.properties file contains this 
> line twice (I don't know if that causes problems or not):
>
> logging.config=file:/etc/cas/config/log4j2-management.xml
>
>
> On Wednesday, July 24, 2019 at 8:53:07 AM UTC-6, alain ubfc wrote:
>>
>> Matthew,
>>
>> I relanched tomcat each time as root.
>> So i addes the user toto in the casermgnt group.
>> I cheched the mounting of the partitions :
>>
>> casermgnt@casermgnt:~$ cat /proc/mounts
>> sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
>> proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
>> udev /dev devtmpfs rw,nosuid,relatime,size=1005320k,nr_inodes=251330,mode
>> =755 0 0
>> devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=
>> 000 0 0
>> tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=204244k,mode=755 0 0
>> /dev/mapper/casermgnt--vg-root / ext4 rw,relatime,errors=remount-ro 0 0
>> securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 
>> 0 0
>> tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
>> tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
>> tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
>> cgroup2 /sys/fs/cgroup/unified cgroup2 
>> rw,nosuid,nodev,noexec,relatime,nsdelegate 
>> 0 0
>> cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,
>> xattr,name=systemd 0 0
>> pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
>> bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
>> cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,
>> relatime,net_cls,net_prio 0 0
>> cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,
>> cpu,cpuacct 0 0
>> cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 
>> 0 0
>> cgroup /sys/fs/cgroup/perf_event cgroup 
>> rw,nosuid,nodev,noexec,relatime,perf_event 
>> 0 0
>> cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 
>> 0 0
>> cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 
>> 0
>> cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 
>> 0 0
>> cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 
>> 0 0
>> cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 
>> 0
>> cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 
>> 0 0
>> systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=28,pgrp=1,
>> timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10494 0 0
>> hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
>> debugfs /sys/kernel/debug debugfs rw,relatime 0 0
>> mqueue /dev/mqueue mqueue rw,relatime 0 0
>> /dev/sda1 /boot ext2 rw,relatime,block_validity,barrier,user_xattr,acl 0 
>> 0
>> /dev/mapper/casermgnt--vg-home /home ext4 rw,relatime 0 0
>> /dev/mapper/casermgnt--vg-tmp /tmp ext4 rw,relatime 0 0
>> /dev/mapper/casermgnt--vg-var /var ext4 rw,relatime 0 0
>> tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=204240k,mode=700
>> ,uid=1000,gid=1000 0 0
>>
>> We can see that the /var is in rw.
>>
>> Is that why the server doesn't start ?
>>
>> Or it has nothing to do with.
>>
>> Thank you
>>
>> Le mercredi 24 juillet 2019 15:32:44 UTC+2, Matthew Uribe a écrit :
>>>
>>> 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.<span st
>>>>>>
>>>>>

-- 
- 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/f43864b5-9189-4f44-8260-48c636b2e7aa%40apereo.org.

Reply via email to