Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
panda87
@panda87
Hi morning
Raffaele Sgarro
@RaffaeleSgarro
Hi there
Roland Huß
@rhuss
hi :_
Roy Ludan
@trickstyler
Hey @rhuss , when will you roll out the notifications support for java clients?
Roland Huß
@rhuss
@trickstyler Good question ;-) Last year I gave an ETA of this year, but demand was not so much that it bubbled up in the priority list (sorry, super loaded these days). But question like this helps in making it happen (in fact everything is in place, the 'soft' things like docs, relocation to a new github org etc. are missing still). its all demand driven these days :)
David J. M. Karlsen
@davidkarlsen
are there any client implementations which can implement MBeanServerConnection
e.g. they talk to jolokia agent over http - but look as MBeanServerConnection when coding towards it?
Jacob D'Onofrio
@jdonofrio728

Hmm, does anyone know why this yields a value of null?

curl 'http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/Usage/used'
{
  "request": {
    "path": "used",
    "mbean": "java.lang:name=*Eden Space,type=MemoryPool",
    "attribute": "Usage",
    "type": "read"
  },
  "value": null,
  "timestamp": 1529173755,
  "status": 200
}

When this shows the path exists:

curl 'http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/Usage' 
{
  "request": {
    "mbean": "java.lang:name=*Eden Space,type=MemoryPool",
    "attribute": "Usage",
    "type": "read"
  },
  "value": {
    "java.lang:name=Par Eden Space,type=MemoryPool": {
      "Usage": {
        "init": 167772160,
        "committed": 167772160,
        "max": 167772160,
        "used": 136887216
      }
    }
  },
  "timestamp": 1529173768,
  "status": 200
}
Roland Huß
@rhuss
The problem is that the 'path' is applied on the whole structure of the return value. But for a wildcard read, the first level is the MBean name, so would have to use "java.lang:name=Par%20Eden%20Space,type=MemoryPool/used" as path. Not very useful, I know, so reading with path on a wildcard read doesnt not make much sense currently.
Ah, just rediscovered that you can use a wildcard in the path, too.
@jdonofrio728 could you try curl 'http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/%2a/Usage ?

From the reference documentation:

Paths support wildcards * in a simple form. If given as a path part exclusively, it matches any entry and path matching continues on the next level. This feature is especially useful when using pattern read request together with paths. See Section 6.2.1, “Reading attributes (read)” for details. A * mixed with other characters in a path part has no special meaning and is used literally.

Jacob D'Onofrio
@jdonofrio728
Hey @rhuss, thanks for the repy. The URL you gave me yields an UnsupportedOperationException
[root@ip-10-45-74-218 ~]# curl 'http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/%2a/Usage'

{
  "request": {
    "path": "Usage",
    "mbean": "java.lang:name=*Eden Space,type=MemoryPool",
    "type": "read"
  },
  "stacktrace": "java.lang.UnsupportedOperationException: 
....
  "error_type": "java.lang.UnsupportedOperationException",
  "error": "java.lang.UnsupportedOperationException : Usage threshold is not supported",
  "status": 500
}
Roland Huß
@rhuss
I would expect to see a path */Usage here, not sure why this is not the case here. would to investigat this further, but on the road this week. Could you open please a GitHub issue ?
Jacob D'Onofrio
@jdonofrio728
It does not, also yields a null value:
[vagrant@default-centos-7 ~]$ curl 'http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/Usage/%2a/used' | jq .
{
  "request": {
    "path": "*/used",
    "mbean": "java.lang:name=*Eden Space,type=MemoryPool",
    "attribute": "Usage",
    "type": "read"
  },
  "value": null,
  "timestamp": 1529326769,
  "status": 200
}
Roland Huß
@rhuss
Sorry, finally try: http://localhost:8778/jolokia/read/java.lang:type=MemoryPool,name=%2aEden%20Space/Usage/%2a/Usage/used (the path actually should be */Usage/used if you look at the original structure returned.)
Jacob D'Onofrio
@jdonofrio728
Totally fogot to respond. Yes that last one worked. Thanks for help!
David J. M. Karlsen
@davidkarlsen

I have a spring boot + spring batch application, which used to work fine, but now it won’t exit after having completed the job. Log says:

onApplicationEvent: org.springframework.boot.autoconfigure.batch.JobExecutionEvent[source=JobExecution: id=2579, version=2, startTime=Tue Jul 03 20:41:46 CEST 2018, endTime=Tue Jul 03 20:41:49 CEST 2018, lastUpdated=Tue Jul 03 20:41:49 CEST 2018, status=COMPLETED, exitStatus=exitCode=COMPLETED;exitDescription=, job=[JobInstance: id=2959, version=0, Job=[dhubExportJob]], jobParameters=[{subtractNumDays=1, orgId=7001, metaFile=classpath:tacjfrsrv/dhub/JFR_T_ACCOUNT.mf01_01.xml, run.id=10}]]
2018-07-03 20:41:49,917 [main][][][][][][][] TRACE org.springframework.context.annotation.AnnotationConfigApplicationContext - Publishing event in org.springframework.context.annotation.AnnotationConfigApplicationContext@7f3b84b8: org.springframework.boot.autoconfigure.batch.JobExecutionEvent[source=JobExecution: id=2579, version=2, startTime=Tue Jul 03 20:41:46 CEST 2018, endTime=Tue Jul 03 20:41:49 CEST 2018, lastUpdated=Tue Jul 03 20:41:49 CEST 2018, status=COMPLETED, exitStatus=exitCode=COMPLETED;exitDescription=, job=[JobInstance: id=2959, version=0, Job=[dhubExportJob]], jobParameters=[{subtractNumDays=1, orgId=7001, metaFile=classpath:tacjfrsrv/dhub/JFR_T_ACCOUNT.mf01_01.xml, run.id=10}]]
2018-07-03 20:41:49,917 [main][][][][][][][] TRACE org.springframework.context.annotation.AnnotationConfigApplicationContext - Publishing event in org.springframework.context.annotation.AnnotationConfigApplicationContext@4fcee388: org.springframework.boot.context.event.ApplicationReadyEvent[source=org.springframework.boot.SpringApplication@3b75fdd0]

and then just sits there. Nothing apparent when looking at thread-dumps

Praveen Kumar Singh
@praveenksingh
can anyone helpme with Jolokia access
I want to allow write from a specific IP but restrict it to only read from all different IP's