ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportIIB on Zos not able to read log4j2.xml

Post new topicReply to topic
IIB on Zos not able to read log4j2.xml View previous topic :: View next topic
Author Message
girishkuks
PostPosted: Sun Aug 28, 2016 5:57 pm Post subject: IIB on Zos not able to read log4j2.xml Reply with quote

Newbie

Joined: 28 Aug 2016
Posts: 6

I am working on logging in IIB v10 using javacompute node and log4j2.

I have used maven as build tool for IIB project and I kept my log4j2.xml file in folder "C:\ProgramData\IBM\MQSI\common\wsrr". IIB flows are working and logging without any issues in windows and linux environment.

When I push same flows to zOS enviornment and kept my same log4j2.xml file in "/var/wmb/brokers/MQJIMBRK/common/wsrr" and my flow is not logging and throwing errors in broker sys logs as below

2016-08-26 16:25:50.802 216 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
2016-08-26 17:03:24.588 238 log4j:WARN No appenders could be found for logger (net.sf.ehcache.config.ConfigurationFactory).
2016-08-26 17:03:24.589 238 log4j:WARN Please initialize the log4j system properly.


The path "/var/wmb/brokers/MQJIMBRK" is the work path in Zos( mainframe) environment.

Please suggest what could have went wrong in ZOs environment or am I missing any specific configurations for ZOS.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Aug 28, 2016 10:34 pm Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

There are a good number of posts here about problems with Log4J and IIB.

With IIB, Java is (IMHO and that of many here) not the answer to any question especially if you have come from a J2EE background.
That said, there are logging classes available from Java in IIB that don't have these issues. Why not use them?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 29, 2016 1:25 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

smdavies99 wrote:
There are a good number of posts here about problems with Log4J and IIB.

With IIB, Java is (IMHO and that of many here) not the answer to any question especially if you have come from a J2EE background.
That said, there are logging classes available from Java in IIB that don't have these issues. Why not use them?

What is usually being done in this case, is to create a configurable service that holds the path + filename (absolute) to the log4j config file.

The Java compute it its initialization part reads the config service value and initializes log4j from there.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
girishkuks
PostPosted: Mon Aug 29, 2016 7:32 pm Post subject: Reply with quote

Newbie

Joined: 28 Aug 2016
Posts: 6

Thanks for your reply.

But, If we keep log4j2.xml in /common/wsrr folder, it is working in windows and linux environment. The issue is only for zOS( Mainframe). So, you guys are telling is if we keep our log4j2.xml in wsrr folder in mainframe then IIB will not initialise ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 30, 2016 7:15 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

girishkuks wrote:
The issue is only for zOS( Mainframe). So, you guys are telling is if we keep our log4j2.xml in wsrr folder in mainframe then IIB will not initialise ?


Well, let's be clear here. If you're doing this:

girishkuks wrote:
When I push same flows to zOS enviornment and kept my same log4j2.xml file in "/var/wmb/brokers/MQJIMBRK/common/wsrr"


then you're not pushing the file to z/OS. You're pushing to zLinux running on z hardware or you're pushing to the USS subsystem within z/OS/. The z/OS operating system doesn't have the concept of a folder structure any more than it has the concept of a workpath.

So, given this:

girishkuks wrote:
The path "/var/wmb/brokers/MQJIMBRK" is the work path in Zos( mainframe) environment.


you need to ask whoever told you that was the mainframe broker's work path:

- are they sure?
- is this a real z/OS broker and if so, what exactly did they do to point it to a USS file system and why?
- how did they verify the broker is honoring that work path setting and not defaulting to something more traditional?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
girishkuks
PostPosted: Thu Nov 17, 2016 2:19 am Post subject: Reply with quote

Newbie

Joined: 28 Aug 2016
Posts: 6

Thanks for your responses..

We got solution for this , we need to set explicit path of log4j config file in IIB Web User Interface;

Start the respective Web UI
Click on the integration server/execution group
Add the following line in “JVM Manager - JVM System Property” under “Resource Manager Properties”
“-Dlog4j.configurationFile=/var/wmb/brokers/MQB5MBRK/common/wsrr/log4j2.xml”
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 17, 2016 5:19 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

girishkuks wrote:
Dlog4j.configurationFile=/var/wmb/brokers/MQB5MBRK/common/wsrr/log4j2.xml”


So you're looking at a z/OS installation through the Web UI hosted on a distributed platform? Did you mention this at any point previously?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportIIB on Zos not able to read log4j2.xml
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.