Uploaded image for project: 'Nuxeo Documentation'
  1. Nuxeo Documentation
  2. NXDOC-2430

Replace usage of stream2es by native ES command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021
    • Fix Version/s: None
    • Component/s: Upgrade documentation
    • Backlog priority:
      800
    • Sprint:
      nxplatform #56
    • Story Points:
      1

      Description

      https://doc.nuxeo.com/nxdoc/elasticsearch-setup/#updating-the-audit-logs-index-configuration describes how to update the Audit index configuration by using the very old "stream2es" tool.

      The current command fails with this stack trace because of an incorrect header for "content-type"

      [thierry@PASUP-TMARTINS2 src (master)]$ ../target/stream2es- es --source http://localhost:9200/nuxeo-audit --target http://localhost:9200/nuxeo-audit2
      clojure.lang.ExceptionInfo: clj-http: status 406 {:request-time 4, :repeatable? false, :streaming? true, :chunked? false, :headers {"content-type" "application/json; charset=UTF-8"}, :orig-content-encoding nil, :status 406, :length -1, :body "{\"error\":\"Content-Type header [text/plain; charset=UTF-8] is not supported\",\"status\":406}", :trace-redirects ["http://localhost:9200/nuxeo-audit/_search"]}
      	at slingshot.support$stack_trace.invoke(support.clj:201)
      	at clj_http.client$wrap_exceptions$fn__2502.invoke(client.clj:196)
      	at clj_http.client$wrap_accept$fn__2662.invoke(client.clj:565)
      	at clj_http.client$wrap_accept_encoding$fn__2668.invoke(client.clj:579)
      	at clj_http.client$wrap_content_type$fn__2657.invoke(client.clj:555)
      	at clj_http.client$wrap_form_params$fn__2739.invoke(client.clj:726)
      	at clj_http.client$wrap_nested_params$fn__2753.invoke(client.clj:756)
      	at clj_http.client$wrap_method$fn__2709.invoke(client.clj:670)
      	at clj_http.cookies$wrap_cookies$fn__207.invoke(cookies.clj:124)
      	at clj_http.links$wrap_links$fn__1129.invoke(links.clj:51)
      	at clj_http.client$wrap_unknown_host$fn__2762.invoke(client.clj:776)
      	at clj_http.client$get.invokeStatic(client.clj:879)
      	at clj_http.client$get.doInvoke(client.clj:875)
      	at clojure.lang.RestFn.invoke(RestFn.java:423)
      	at stream2es.http$get.invokeStatic(http.clj:29)
      	at stream2es.http$get.invoke(http.clj:28)
      	at stream2es.es$scan1.invokeStatic(es.clj:107)
      	at stream2es.es$scan1.invoke(es.clj:104)
      	at stream2es.es$scan.invokeStatic(es.clj:121)
      	at stream2es.es$scan.invoke(es.clj:118)
      	at stream2es.stream.es$make_callback$fn__6687.invoke(es.clj:84)
      	at stream2es.main$stream_BANG_.invokeStatic(main.clj:245)
      	at stream2es.main$stream_BANG_.invoke(main.clj:241)
      	at stream2es.main$main.invokeStatic(main.clj:333)
      	at stream2es.main$main.invoke(main.clj:317)
      	at stream2es.main$_main.invokeStatic(main.clj:339)
      	at stream2es.main$_main.doInvoke(main.clj:337)
      	at clojure.lang.RestFn.applyTo(RestFn.java:137)
      	at stream2es.main.main(Unknown Source)
      2022-02-17T15:41:23.565+0000 ERROR unexpected exception: see above
      2022-02-17T15:41:23.777+0000 INFO  00:00,267 0,0d/s 0,0K/s (0,0mb) indexed 0 streamed 0 errors 0
      

      and it makes stream2es incompatible with ES 6

      It should be replaced by

      curl -X POST http://localhost:9200/_reindex -H 'Content-Type: application/json' -d '{
       "source": {
       "index": "nuxeo-audit"
       },
       "dest": {
       "index": "nuxeo-audit2"
       }
      }'
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: