• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't enable mod_webobjects logging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't enable mod_webobjects logging


  • Subject: Re: Can't enable mod_webobjects logging
  • From: Henrique Prange via Webobjects-dev <email@hidden>
  • Date: Tue, 12 Jul 2022 20:53:35 -0300

Hey guys,

André nailed it! The PrivateTmp option was active on Apache's systemd
configuration. For this reason, the /tmp folder was relocated to
/tmp/systemd-private-*-httpd.service-*/tmp. Everything worked as expected after
configuring the logWebObjects file in the correct folder.

Thanks for your help!

Cheers,

HP

> On 11 Jul 2022, at 09:10, Henrique Prange <email@hidden> wrote:
>
> Thanks for the pointers André and Markus. I’ll further investigate the issue
> today.
>
> Cheers,
>
> HP
>
>> On 11 Jul 2022, at 06:40, Andre Rothe via Webobjects-dev
>> <email@hidden> wrote:
>>
>> Hi,
>>
>> Do you look for the right file? Some Linux distributions move the tmp
>> directory of the Apache from the global /tmp into a generic subfolder
>> (i.e.
>> /tmp/systemd-private-9e162c536c6a47e092c258fa0469fdf8-httpd.service-sy17Sk/tmp).
>> This tmp-subfolder has per default 777 (root:root,
>> system_u:object_r:tmp_t:s0) Maybe you are looking on the wrong place, it
>> could be a chroot environment, which resides on a complete different
>> path within filesystem. If there is a SELinux problem you can look into
>> /var/log/audit/audit.log to see, which file the httpd process will
>> access. We have chmod 644, chown apache:apache and SELinux
>> unconfined_u:object_r:httpd_log_t:s0 for the file. You can set SELinux by
>>
>> semanage fcontext -a -t httpd_log_t "/var/log/WebObjects.log"
>> restorecon -v /var/log/WebObjects.log
>> systemctl restart httpd.service
>>
>> There is also an empty file /tmp/logWebObjects (also within the
>> subfolder above) which you have to create (touch /tmp/logWebObjects) to
>> activate log output. Here you can set chmod 644, chown root:root,
>> system_u:object_r:tmp_t:s0. This file is gone every time you restart the
>> Apache. So you have to recreate it after every restart.
>>
>> André
>>
>>
>> Am 11.07.22 um 10:19 schrieb Markus Stoll, junidas GmbH via Webobjects-dev:
>>> Hi Henrique
>>>
>>> I have no idea what Oracle Linux Server 8.6 is doing there, but this
>>> sounds as the apache child processes are running in some kind of sandbox.
>>> Maybe you have to declare some sandbox exception here?
>>>
>>> Markus
>>>
>>>> Am 10.07.2022 um 22:05 schrieb Henrique Prange via Webobjects-dev
>>>> <email@hidden>:
>>>>
>>>> Hey guys,
>>>>
>>>> I'm struggling to enable the WebObjects Apache adaptor log on Oracle
>>>> Linux Server 8.6. I've configured it to write to /tmp/WebObjects.log,
>>>> but it prints the following message to Apache's error log:
>>>>
>>>> Failed to append to log file '/tmp/WebObjects.log': Permission
>>>> denied. This can occur when the file is not writable by the child
>>>> httpd process. A workaround is to change the ownership of the file to
>>>> match the child httpd process.
>>>>
>>>> I changed the log path to /var/log/httpd/mod_webobjects.log, and I
>>>> could see log messages for the adaptor initialization (see at the end
>>>> of the email). Then, the following error message appears on Apache's
>>>> error log every time I send a request to my WO app.
>>>>
>>>> Failed to append to log file '/var/log/httpd/mod_webobjects.log':
>>>> Permission denied. This can occur when the file is not writable by
>>>> the child httpd process. A workaround is to change the ownership of
>>>> the file to match the child httpd process.
>>>>
>>>> I've tried changing the file owner to apache, permissions to 777,
>>>> changing the log file context to system_u:object_r:httpd_log_t:s0,
>>>> and even disabled SELinux completely. Same error. It looks like
>>>> Apache can't write to the log file from child httpd processes.
>>>>
>>>> Any ideas on what could be causing this error and how to solve it?
>>>>
>>>> Cheers,
>>>>
>>>> HP
>>>>
>>>> Here's a list of messages logged to /var/log/httpd/mod_webobjects.log
>>>> during Apache's initialization.
>>>>
>>>> Debug: init_adaptor(): beginning initialization. Adaptor version 4.6.6.
>>>> Info: init_adaptor(): config options are: String table:
>>>> config = file:///opt/webobjects/config/WOConfig.xml
>>>> confinterval = 10
>>>> logPath = /var/log/httpd/mod_webobjects.log
>>>> logLevel = Debug
>>>> Info: Adaptor shared state file: /tmp/WOAdaptorState
>>>> Info: Adaptor info user: <no user set>, password: <no password set>
>>>> Debug: init_adaptor(): someone installed a SIGPIPE handler
>>>> Debug: init_adaptor(): WOShmem_init succeeded
>>>> Debug: init_adaptor(): tr_init succeeded
>>>> Debug: init_adaptor(): hl_init succeeded
>>>> Debug: init_adaptor(): lb_init succeeded
>>>> Info: WOShmem_alloc(): allocated region "application list" (872 x 256)
>>>> Info: WOShmem_alloc(): allocated region "instance list" (168 x 32768)
>>>> Info: WOShmem_alloc(): allocated region "configTimes" (40 x 1)
>>>> Info: WOShmem_alloc(): allocated region "configServers" (6208 x 1)
>>>> Info: ac_init(): reading configuration from:
>>>> file:///opt/webobjects/config/WOConfig.xml
>>>> Debug: init_adaptor(): ac_init succeeded
>>>> Debug: init_adaptor(): transaction_init() succeeded
>>>> Debug: Checking config file /opt/webobjects/config/WOConfig.xml
>>>> Debug: Checking config /opt/webobjects/config/WOConfig.xml
>>>> Debug: Checking config /opt/webobjects/config/WOConfig.xml mod time
>>>> Info: Reading configuration from /opt/webobjects/config/WOConfig.xml
>>>> Info: ac_newInstance(): added my-app:1 (2000)
>>>> Info: WebObjects_post_config(): WebObjects adaptor initialization
>>>> succeeded.
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>> --
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Can't enable mod_webobjects logging (From: Henrique Prange via Webobjects-dev <email@hidden>)
 >Re: Can't enable mod_webobjects logging (From: "Markus Stoll, junidas GmbH via Webobjects-dev" <email@hidden>)
 >Re: Re: Can't enable mod_webobjects logging (From: Andre Rothe via Webobjects-dev <email@hidden>)
 >Re: Can't enable mod_webobjects logging (From: Henrique Prange via Webobjects-dev <email@hidden>)

  • Prev by Date: Re: Can't enable mod_webobjects logging
  • Next by Date: Problem with maven build
  • Previous by thread: Re: Can't enable mod_webobjects logging
  • Next by thread: Problem with maven build
  • Index(es):
    • Date
    • Thread