Hi Naama,

I think SELinux might be rearing itself here. In your `ls` output, a
period follows the permissions, which indicates a file with an SELinux
context (see `info ls`):

drwxr-xr-x. 2 root root 4096 Oct 14 22:15 log

..you will likely have some sort of SELinux related message indicating
that a context problem exists in /var/log/messages (or similar).

Please see this guide for disabling SELinux:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Enabling_and_Disabling_SELinux-Disabling_SELinux.html

Try that and please let us know if it resolves your issue.
--
Thanks,
Jeff


On Wed, Jan 25, 2017 at 1:59 AM, Naama Shoresh <naa...@qwilt.com> wrote:
> Indeed weird.
> tomcat is run as a service, by root, which, of course, can write to
> /opt/traffic_router/var/log/.
>
> [root@tc3-router ~]# service tomcat status
> tomcat (pid  1122) is running...
> [root@tc3-router ~]# ps aux | grep 1122
> root      1122  0.1  8.5 2550912 163896 ?      Sl   Jan22   5:09
> /usr/bin/java
> -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/opt/tomcat/endorsed
> -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat
> -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp
> org.apache.catalina.startup.Bootstrap start
> [root@tc3-router ~]# ll /opt/traffic_router/var/
> total 8
> drwxr-xr-x  2 root root 4096 Jan 24 14:40 auto-zones
> drwxr-xr-x. 2 root root 4096 Oct 14 22:15 log
>
>
>
> As far as I can tell, the log4j.properties is configured to log at least
> some data:
> #
> # Copyright 2015 Comcast Cable Communications Management, LLC
> #
> # Licensed under the Apache License, Version 2.0 (the "License");
> # you may not use this file except in compliance with the License.
> # You may obtain a copy of the License at
> #
> # http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing, software
> # distributed under the License is distributed on an "AS IS" BASIS,
> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> # See the License for the specific language governing permissions and
> # limitations under the License.
> #
>
> # ACCESS is set to be a Syslog Appender
> log4j.appender.ACCESS=org.apache.log4j.RollingFileAppender
> log4j.appender.ACCESS.File=/opt/traffic_router/var/log/access.log
> log4j.appender.ACCESS.MaxFileSize=200MB
> log4j.appender.ACCESS.MaxBackupIndex=10
>
> # ACCESS uses PatternLayout.
> log4j.appender.ACCESS.layout=org.apache.log4j.PatternLayout
> log4j.appender.ACCESS.layout.ConversionPattern=%m%n
> log4j.appender.ACCESS.threshold=INFO
>
> # A1 is set to be a RollingFileAppender.
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> log4j.appender.A1=org.apache.log4j.RollingFileAppender
> log4j.appender.A1.file=/opt/traffic_router/var/log/traffic_router.log
> log4j.appender.A1.maxFileSize=100MB
>
> # A1 uses PatternLayout.
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%-5p
> %d{yyyy-MM-dd'T'HH:mm:ss.SSS} [%t] %c - %m%n
> log4j.appender.A1.threshold=ALL
>
> # Set root logger level to DEBUG and its only appender to A1.
> # Valid levels are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, NONE
> log4j.rootLogger=WARN, A1
>
> # Set application logger levels
> log4j.logger.com.comcast.cdn.traffic_control.traffic_router=INFO
>
> log4j.logger.com.comcast.cdn.traffic_control.traffic_router.core.access=INFO,
> ACCESS
> log4j.additivity.com.comcast.cdn.traffic_control.traffic_router.core.access=false
>
> Thanks again,
> Naama
>
> On Tue, Jan 24, 2017 at 5:19 PM, Dave Neuman <neu...@apache.org> wrote:
>>
>> That’s weird. If it is running it should be logging. Is it somehow
>> possible that the user running tomcat does not have access to
>> /opt/traffic_router/var/log or is it possible that
>> /opt/traffic_router/conf/log4j.properties was changed to not log anything?
>>
>>
>> On Tue, Jan 24, 2017 at 12:46 AM, Naama Shoresh <naa...@qwilt.com> wrote:
>>>
>>> Hi Dave,
>>>
>>> Thanks for your help.
>>>
>>> tomcat is running:
>>> # service tomcat status
>>> tomcat (pid  1104) is running...
>>>
>>> The traffic router seem to be running also.
>>> It answers dig and routes traffic as expected. It also sends a stats
>>> file.
>>> But still, no logs under /opt/traffic_router/var/log/
>>>
>>> In the tomcat log, I only see some warnings:
>>> Jan 24, 2017 2:03:24 AM
>>> com.comcast.cdn.traffic_control.traffic_router.secure.KeyManager
>>> chooseServerAlias
>>> WARNING: Client /128.52.128.105:51822 did not send any Server Name
>>> Indicators
>>> Jan 24, 2017 2:03:24 AM
>>> com.comcast.cdn.traffic_control.traffic_router.secure.KeyManager
>>> chooseServerAlias
>>> WARNING: Client /128.52.128.105:51822 did not send any Server Name
>>> Indicators
>>> Jan 24, 2017 2:03:24 AM
>>> com.comcast.cdn.traffic_control.traffic_router.secure.KeyManager
>>> chooseServerAlias
>>> WARNING: Client /128.52.128.105:51822 did not send any Server Name
>>> Indicators
>>> Jan 24, 2017 2:03:24 AM
>>> com.comcast.cdn.traffic_control.traffic_router.secure.KeyManager
>>> chooseServerAlias
>>> WARNING: Client /128.52.128.105:51822 did not send any Server Name
>>> Indicators
>>> Jan 24, 2017 2:03:24 AM
>>> com.comcast.cdn.traffic_control.traffic_router.secure.KeyManager
>>> chooseServerAlias
>>> WARNING: Client /128.52.128.105:51822 did not send any Server Name
>>> Indicators
>>>
>>> Thanks,
>>> Naama
>>>
>>> On Mon, Jan 23, 2017 at 5:00 PM, Dave Neuman <neu...@apache.org> wrote:
>>>>
>>>> Logs for Traffic Router should be under /opt/traffic_router/var/log/ if
>>>> you are not seeing any there I would make sure tomcat is started and 
>>>> traffic
>>>> router is running. You can do a quick check by using dig, using curl, or by
>>>> hitting the API at http://<traffic_router_url>:3333/crs/stats. If you
>>>> Traffic Router is failing to start, you will want to check the tomcat logs
>>>> at /opt/tomcat/logs and see if there are any errors there.
>>>>
>>>> Thanks,
>>>> Dave
>>>>
>>>>
>>>> On Mon, Jan 23, 2017 at 6:12 AM, Naama Shoresh <naa...@qwilt.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've been looking for the traffic router log files, access log and
>>>>> application log.
>>>>> I've looked under /opt/traffic_router/var/log/ and it's empty. Also, I
>>>>> don't see anything related under /var/log/
>>>>>
>>>>> Is there any relevant configuration I should take care of?
>>>>>
>>>>> Thanks,
>>>>> Naama
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Naama Shoresh
>>> Qwilt | Work: +972-72-2221706 | Mobile: +972-52-3401999 |
>>> naam...@qwilt.com
>>
>>
>
>
>
> --
> Naama Shoresh
> Qwilt | Work: +972-72-2221706 | Mobile: +972-52-3401999 | naam...@qwilt.com

Reply via email to