Wednesday, February 01, 2012

Java Exceptions and syslog, anyone?

Anyone out there having problems receiving Java exceptions via syslog? If so, please let me know. We have begun to look into log4j and potential formatting problems. However, we need someone who is really bugged by this in order to see real-world cases so that we can think about real-world cures. So if you have issues, please let me know.

4 comments:

PkiEnthusiast said...

Hi Rainer,

we have seen this behaviour, as well.

Expections by the standard log4j are thrown in syslog without the server template from log4j - which would add a ip/info text in our case.

Those exceptions are seen as noise in the log.

We supposed a connection to JBOSS 5 - the current JBOSS has switched from log4j to its own logger. There is no syslog support available according to my colleagues.

From my point of view, its annoying but not a prio 1 topic.

Thilo

bartavelle said...

We have multiple problems with jboss 5 :
* only UDP syslog is supported
* it is a pain to sort if you do not emulate the standard log line with log4j format (for example by adding a static "jboss: " string)
* exceptions can be very long and truncated
* multi line exceptions only apply the format once, so that you have only the first line with "jboss :"

The solution was to alter the log4j class so that it behaves in an acceptable way.

Rainer Gerhards said...

did you make this altered implementation somewhere available? After all, a main reason for my posting was to aid in improving the situation. If there exist something to build on, that's even better...

Ali said...

Hi;

Here is an example of our SAML 2.0 java log output, we are having BIG problems not being able to see the whole entire output:
server.log: https://fkjgsgfkhdgjkf:443/saml/metadata/alias/defaultAlias
server.log:
server.log:
server.log:
server.log:
server.log:
server.log:
server.log:
server.log:
server.log:
server.log:
server.log: GdsfdsdfdQBGVz31MSK/tgpZDkVpeyg=
server.log:
server.log:
server.log: hM7wjcFD4yjzdfdsdsfdsfsdfdsfrewrejykuyjukAAKrCbLMhIKg==
server.log:
server.log:
server.log: MIIDCzCCAsmgAwIBAgIETwWVCTALBgcqhkjOOAQDBQAwaTELM
server.log: BkxvbmRvbjEPMA0GA1UEBxMGTG9uZG9uMREwDwYDVQQKEwhCdXJiZXJyeTELMAkGA1UECxMCSVQx
server.log: GDAWBgNVBAMTD01hcmNvIFerewewZlcm1ldWxlbjAeFw0xMjAxMDUsdsxMjE4MTdaFw0yMjAxMDI
server.log: MGkxCzAJBgNVBAYTAkdCMQ8wDQYDfgdfVQQIEwZMb25kb24xDzereANBgNVBAcTBkxvbmRvbjERM
server.log: ChMIQnVyYmVycnkxCzAJBgNVBAsTAklUMRgwFgYDVQQDErew9NYXJjbyBWZXJtZXVsZW4wggG3MI
server.log: LAYHKoZIzjgEATCCAR8CgYEA/X9TgR11Eiffdfdddfdff/YRt1I870QAwx4/gLZRJmlFXUAiUftZ
server.log: PY1Y+r/F9bow9subVWzXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7
server.log: g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFIAccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKB
server.log: gQD34aCF1ps93su8q1w2uFe5eZSvu/o66oL5V0wLPQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgW
server.log: E7fPCTKMyKbhPBZ6i1R8jSjgo64eK7OmdZFuo38L+iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8G
server.log: kotmXoB7VSVkAUw7/s9JKgOBhAACgYBGARHYQ4LvO/5PA5WhSEytIJBUjKsK7Mw0IDgaKQUI3kWC
server.log: 8O7Dq+kbwJwBxartaFTc6+SnMUXdINHTfgdvxYKASyy1/avpl9rLveTWqvYMhX/A6NiyhAUrlvq9
server.log: jah/uHx7wFp85dl6BQYBYgRRaxCbLpErd/8OAfHpdLhdaD2cZzALBgcqhkjOOAQDBQADLwAwLAIU
server.log: M9pZPv1QvtO+8ppYblgQRqc8SwICFAj+CK2lor8jkewR60/j4wIZbhOl
server.log:
server.log:
server.log:
server.log:

How do we get logAnalyzer to display the whole string pls?