server simulator transaction log

525 views
Skip to first unread message

HamidReza Zandieh

unread,
May 13, 2013, 6:16:44 AM5/13/13
to jpos-...@googlegroups.com
Hi guys,

I am using jposee server-simulator
and I have got two questions :

1. is there any way to enable the channel transaction log or I should develop it myself
2. how can I see the server socket log? I want to log every thing I get on QServer socket for debug.

Best Regards
Hamid

Alejandro Revilla

unread,
May 13, 2013, 3:48:46 PM5/13/13
to jpos-...@googlegroups.com

The server simulator is configured to log to the 'Q2' logger (defined in deploy/00_logger.xml) providing a high level log. For low level debugging, you can use tcpdump, wiresharkor the like.

--
@apr



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
 
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

HamidReza Zandieh

unread,
May 14, 2013, 2:32:38 AM5/14/13
to jpos-...@googlegroups.com
Hi Alejandro,

Thank you for reply.

my serverSimulator xml file is as following :

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="simulator_10000">
 <property name="debug" value="true" />
 <attr name="port" type="java.lang.Integer">33000</attr>
 <channel class="org.jpos.iso.channel.NCCChannel" packager="org.jpos.iso.packager.GenericPackager"
  header="6000050000">
  <property name="packager-config"  value="cfg/iso87ascii.xml" />
  <property name="debug"            value="true" />
  <property name="packager-realm"   value="debug" />
<!--  <property name="host"             value="127.0.0.1" />
  <property name="port"             value="10000" />
--> </channel>
 <request-listener class="org.jpos.bsh.BSHRequestListener" logger="Q2">
  <property name="source" value="cfg/serversimulator.bsh" />
  <property name="debug"  value="true" />
 </request-listener>
</server>


I have got a client simulator that sends message to server.
every thing goes fine and I get response in my client,
but I don't see my transaction log in Q2 logger.
how can I enable my Q2 logger for transactions?

Best Regards
Hamid

chhil

unread,
May 14, 2013, 2:35:53 AM5/14/13
to jpos-...@googlegroups.com
Have you deployed the 00_logger.xml?

e.g.
<?xml version="1.0" encoding="UTF-8"?>

<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
  <log-listener class="org.jpos.util.DailyLogListener">
    <property name="prefix" value="log/ols.incomm.switch" />
    <property name="suffix" value=".log" />
    <property name="window" value="86400" />
    <property name="copies" value="90" />
    <property name="maxsize" value="100000000" />
    <property name="compression-format" value="none"/>
  </log-listener>
</logger>

This is where logger name logger="Q2" is referenced from.

-chhil

HamidReza Zandieh

unread,
May 14, 2013, 3:00:30 AM5/14/13
to jpos-...@googlegroups.com
Hi chhil,

yes I have deployed the 00_logger.xml file.
following is my file :

<?xml version="1.0" encoding="UTF-8"?>

<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
  <log-listener class="org.jpos.util.SimpleLogListener" />
  <log-listener class="org.jpos.util.BufferedLogListener">
    <property name="max-size" value="100" />
    <property name="name" value="logger.Q2.buffered" />
  </log-listener>

  <log-listener class="org.jpos.util.DailyLogListener">
    <property name="window" value="86400" /> <!-- optional, default one day -->
    <!--needed-->
    <property name="prefix" value="log/q2" />
    <property name="suffix" value=".log"/> <!-- optional -->

    <!--optional the default is "-yyyy-MM-dd" -->
    <property name="date-format" value="-yyyy-MM-dd-HH"/>

    <!--optional the default is gzip-->
    <property name="compression-format" value="gzip"/>
  </log-listener>
</logger>





chhil

unread,
May 14, 2013, 3:04:48 AM5/14/13
to jpos-...@googlegroups.com
For now replace yours with mine and it will work, then we can look into why it doesnt work with your configuration.

sumeet....@gmail.com

unread,
May 14, 2013, 3:12:45 AM5/14/13
to jpos-...@googlegroups.com
Keep the buffered log listener at the end, after daily log listener.

Also, check the standard output, it should have all the log events thanks to SimpleLogListener.

Regards,
Sumeet

From: HamidReza Zandieh <ray.z...@gmail.com>
Date: Tue, 14 May 2013 11:30:30 +0430
Subject: Re: [jpos-users] server simulator transaction log

HamidReza Zandieh

unread,
May 14, 2013, 7:23:00 AM5/14/13
to jpos-...@googlegroups.com
thank you chhil
I replaced your logger but I still have the problem.
it just saves the log in log/ols.incomm.switch file but I cannot see my transactions yet.

actually, I can see the Q2 logs but I cannot see the transactions are sent from client simulator.

my Q2 log is as following :

<log realm="Q2.system" at="Tue May 14 15:37:41 IRDT 2013.192" lifespan="3ms">
  <info>
    Q2 started, deployDir=/home/zandieh/ICI/packages/jpos-server/build/install/jpos-server/deploy
   
    jPOS 1.9.0 master/c12732c (2013-03-03 20:39:59 UYST)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jPOS Community Edition, licensed under GNU AGPL v3.0.
This software is probably not suitable for commercial use.
Please see http://jpos.org/license for details.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQEcBAEBAgAGBQJMolHDAAoJEOQyeO71nYtFv74H/3OgehDGEy1VXp2U3/GcAobg
HH2eZjPUz53r38ARPiU3pzm9LwDa3WZgJJaa/b9VrJwKvbPwe9+0kY3gScDE1skT
ladHt+KHHmGQArEutkzHlpZa73RbroFEIa1qmN6MaDEHGoxZqDh0Sv2cpvOaVYGO
St8ZaddLBPC17bSjAPWo9sWbvL7FgPFOHhnPmbeux8SLtnfWxXWsgo5hLBanKmO1
1z+I/w/6DL6ZYZU6bAJUk+eyVVImJqw0x3IEElI07Nh9MC6BA4iJ77ejobj8HI2r
q9ulRPEqH9NR79619lNKVUkE206dVlXo7xHmJS1QZy5v/GT66xBxyDVfTduPFXk=
=oP+v
-----END PGP SIGNATURE-----

  </info>
</log>
<log realm="Q2.system" at="Tue May 14 15:37:41 IRDT 2013.197">
  <info>
    deploy:/home/zandieh/ICI/packages/jpos-server/build/install/jpos-server/deploy/05_serversimulator.xml
  </info>
</log>
<log realm="Q2.system" at="Tue May 14 15:37:41 IRDT 2013.205">
  <info>
    deploy:/home/zandieh/ICI/packages/jpos-server/build/install/jpos-server/deploy/99_sysmon.xml
  </info>
</log>
<log realm="org.jpos.q2.qbean.SystemMonitor" at="Tue May 14 15:37:41 IRDT 2013.257">
  <info>
    Starting SystemMonitor
  </info>
</log>
<log realm="simulator_10000.server" at="Tue May 14 15:37:41 IRDT 2013.258" lifespan="1ms">
  <iso-server>
    listening on port 33000
  </iso-server>
</log>
<log realm="org.jpos.q2.qbean.SystemMonitor" at="Tue May 14 15:37:41 IRDT 2013.258">
  <info>
    <revision>c12732c</revision>
    <instance>113ab778-ad2b-4c37-bb49-31c2d7f2d2c3</instance>
    <uptime>00:00:00.135</uptime>
    <processors>8</processors>
    <memory>
       freeMemory=83406760
      totalMemory=91619328
      inUseMemory=8212568
    </memory>
    <threads>
            delay=0 ms
          threads=6
            Thread[Reference Handler,10,system]
            Thread[Finalizer,8,system]
            Thread[Signal Dispatcher,9,system]
            Thread[RMI TCP Accept-0,5,system]
            Thread[Q2-113ab778-ad2b-4c37-bb49-31c2d7f2d2c3,5,main]
            Thread[DestroyJavaVM,5,main]
            Thread[Timer-0,5,main]
            Thread[Thread-3,5,main]
            Thread[SystemMonitor,5,main]
            Thread[PooledThread-0,5,ThreadPool-0-1]
    </threads>
    --- name-registrar ---
      tspace:default: org.jpos.space.TSpace
        <keycount>-1</keycount>
        <gcinfo>0,0</gcinfo>

      logger.: org.jpos.util.Logger
      logger.Q2.buffered: org.jpos.util.BufferedLogListener
      simulator_10000: org.jpos.q2.iso.QServer
      server.simulator_10000: org.jpos.iso.ISOServer
        connected=0, rx=0, tx=0, last=0
      logger.Q2: org.jpos.util.Logger
  </info>
</log>
<log realm="simulator_10000.server.session/127.0.0.1:50118" at="Tue May 14 15:37:43 IRDT 2013.896">
  <session-start/>
</log>


my problem is that I can just see connection from my client simulator
but I cannot see my transactions.


thank you Sumeet I did what you siad and the same problem exists.



chhil

unread,
May 14, 2013, 7:29:48 AM5/14/13
to jpos-...@googlegroups.com
In your server sim deploy file , can you add  logger="Q2" for the channel?

-chhil

HamidReza Zandieh

unread,
May 14, 2013, 12:01:52 PM5/14/13
to jpos-...@googlegroups.com
thank you very much chhil
I did what you said and the problem solved.

by the way, do have any idea about Q2 logging the trasactions before parsing ISO message ?
it is really helpfull in debug mode.

chhil

unread,
May 14, 2013, 12:08:45 PM5/14/13
to jpos-...@googlegroups.com
The basechannel (base class of most channels) dumps a hexdump when there is an error while parsing the message, for most this seems sufficient (though can dump data making your solution PCI non compliant as pan/track2/etc will be in the clear).

You can extend the the basechannel and add anything that you specifically require.

-chhil

HamidReza Zandieh

unread,
May 14, 2013, 12:38:35 PM5/14/13
to jpos-...@googlegroups.com
thank you for fast reply and informing me about PCI compliance.
I will try it...
Reply all
Reply to author
Forward
0 new messages