title: Jolokia - Origin null is not allowed to call this agent
body: <blockquote>
    <p>{"stacktrace":"java.lang.Exception: Origin null is not allowed to call
    this agent\n\tat
    org.jolokia.http.HttpRequestHandler.handleThrowable(HttpRequestHandler.java:242)\n\tat
    org.jolokia.jvmagent.handler.JolokiaHttpHandler.doHandle(JolokiaHttpHandler.java:243)\n\tat
    org.jolokia.jvmagent.handler.JolokiaHttpHandler.handle(JolokiaHttpHandler.java:178)\n\tat
    com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)\n\tat
    sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)\n\tat
    com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)\n\tat
    sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)\n\tat
    com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)\n\tat
    sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)\n\tat
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat
    java.lang.Thread.run(Thread.java:748)\n","error_type":"java.lang.Exception","error":"java.lang.Exception
    : Origin null is not allowed to call this agent","status":403}</p>
  </blockquote>
  
  <p>I get this error when I try to query my "jolokia" agent.</p>
  
  <pre><code>curl  http://localhost:8778/jolokia/list
  </code></pre>
  
  <p>I've launched my java application (kibana) with the jolokia agent, as explained in the Manual <a href="https://jolokia.org/reference/html/agents.html#agents-jvm" rel="noreferrer">https://jolokia.org/reference/html/agents.html#agents-jvm</a>.</p>
  
  <pre><code>java -javaagent:agent.jar=port=8778,host=localhost
  </code></pre>
  
  <p>I can see (ps -aux) that the process launched with the jolokia agent in between the Java Arguments.</p>
  
  <p>I have also tried to deploy the jolokia war in my Tomcat /webapps. I've edited the user.xml file to add the User Jolokia, but I get the same result</p>
  
  <p>The only result I get by googling the error seems to be the Jolokia code, at line 287, which seems to imply the host or address are wrong, but i'm doing everything from localhost, which should be allowed.
  <a href="https://github.com/rhuss/jolokia/blob/master/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java" rel="noreferrer">https://github.com/rhuss/jolokia/blob/master/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java</a></p>
  
  <p>Am I missing some settings? which is the best way to test it? I have zero experience with Java applications and Jolokia.</p>