Failed to load class "org.slf4j.impl.StaticLoggerBinder" [QUESTION]


(Colton Robach) #1

Bear with me this is my first post in the ReadonlyREST forums.

I ran into the error when trying to start Elasticsearch after a successful Readonlyrest download. It displays this:

Failed to load class “org.slf4j.impl.StaticLoggerBinder”

I visited the info page that it told me to and added the logback-classic.jar into the lib folder under the Elasticsearch directory. When I tried again to start Elasticsearch this message appeared:

Failed to instantiate SLF4J LoggerFactory

I am at a loss for what to do. Is there a way to fix these issues?

Thanks!


(Simone Scarduzio) #2

can you download the 1.16.15 version? It should be fixed.


(Colton Robach) #3

Thank you for your response. It appears to have worked. Is there a configuration file example somewhere? I am having a hard time understanding how to create a basic readonlyrest.yml file. I currently have this:

readonlyrest:

response_if_req_forbidden: Fordbidden by ReadonlyREST ES Plugin

access_control_rules:
    - name: "::intern::"
       auth_key: intern:intern
       type: allow
       actions: ["indices:admin/types/exists","indices:data/read/*","indices:data/write/*","indices:admin/template/*","indices:admin/create"]
       indices: ["_all"]

But keep getting this error:

tech.beshu.ror.commons.settings.SettingsMalformedException: Could not find required attribute ‘readonlyrest’

Not really sure why my file is an issue.

Thanks!


(Simone Scarduzio) #4

Cool thanks for the feedback!

For the settings, watch your indentation. Copy paste something from the examples like this: https://github.com/beshu-tech/readonlyrest-docs/blob/master/elasticsearch.md#local-users-and-groups


(Colton Robach) #5

Great examples for a beginner to test out the plugin! I was working with the “USE CASE: Multi-user Kibana + Authenticated Logstash” example and was switching between the RW user and the RO to test out different features and all of a sudden I received this error message at the URL where Kibana should be:

{“message”:“Cannot extract user name from base auth header: [illegal_argument_exception] Cannot extract user name from base auth header”,“statusCode”:400,“error”:“Bad Request”}

I restarted Elasticsearch and Kibana and I still get this error.


(Simone Scarduzio) #6

The error says that the request has been rejected because it does not contain any form of authentication, in particular ROR expected to find credentials in the form of HTTP Basic Auth (the “Authorization” header).


(Colton Robach) #7

Sorry for all these questions. I am quite new to the HTTP protocol. I figured out how to add it to the header. However whenever I try to enter the console mode it keeps prompting me for credentials (I am using Chrome as a browser). Is this a setting I need to add into the YML file?


(Simone Scarduzio) #8

If you are trying to use HTTP Basic Auth (“auth_key” rule in ROR) with Kibana, and are having issues, you are probably hitting this bug which I reported ages ago and they didn’t fix yet: