Plugin installation issue, probably related to YAML

Good day. The installation of the Elasticsearch's plugin for Zammad should be straightforward. After apt install elasticsearch using Set up Elasticsearch guide, its just

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment

And yet, I got this long error instead.

Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: MarkedYAMLException[while scanning a simple key
 in 'reader', line 118, column 1:
    $ zammad run rails r "Setting.se ... 
    ^
could not find expected ':'
 in 'reader', line 120, column 1:
    # Build the search index
    ^

 at [Source: (sun.nio.ch.ChannelInputStream); line: 115, column: 42]]; nested: ScannerException[while scanning a simple key
 in 'reader', line 118, column 1:
    $ zammad run rails r "Setting.se ... 
    ^
could not find expected ':'
 in 'reader', line 120, column 1:
    # Build the search index
    ^
];
	at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1189)
	at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1160)
	at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:75)
	at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:91)
	at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:82)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
	at org.elasticsearch.cli.Command.main(Command.java:77)
	at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)
Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: while scanning a simple key
 in 'reader', line 118, column 1:
    $ zammad run rails r "Setting.se ... 
    ^
could not find expected ':'
 in 'reader', line 120, column 1:
    # Build the search index
    ^

 at [Source: (sun.nio.ch.ChannelInputStream); line: 115, column: 42]
	at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from(MarkedYAMLException.java:28)
	at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:422)
	at org.elasticsearch.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:73)
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:706)
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:675)
	at org.elasticsearch.common.settings.Settings.access$400(Settings.java:75)
	at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1185)
	... 10 more
Caused by: while scanning a simple key
 in 'reader', line 118, column 1:
    $ zammad run rails r "Setting.se ... 
    ^
could not find expected ':'
 in 'reader', line 120, column 1:
    # Build the search index
    ^

	at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:527)
	at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:332)
	at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:262)
	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:662)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:185)
	at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:195)
	at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:418)
	... 15 more

I read that since version 8.2.0, errors with YAML parser become an issue. However, there is no error number/label for me to check, and I had yet to find the solution related to my case.

Was I suppose to bring this issue to the GitHub's Elasticsearch, here, or Zammad? Was there a node-YAML apt I'm suppose to install?

Thank in advance for anyone who help.

Welcome!

What is your elastic version? Asking because in the recent versions, the ingest attachment plugin is a module (available with the distribution) and not a plugin anymore (which needs to be installed).

I believe it is this one by using this command curl -XGET 'http://localhost:9200'

  "version" : {
    "number" : "7.17.15",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "0b8ecfb4378335f4689c4223d1f1115f16bef3ba",
    "build_date" : "2023-11-10T22:03:46.987399016Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },

What is your elasticsearch.yml file?

And what is Zammad?

Zammad is simply a web based open source helpdesk system.

I got the plugin resolved by rereading the Zammad's setup Elasticsearch. Look like my 2 mistakes were

  1. Since its version 7 and not 8, I was using HTTPS instead of HTTP.
  2. There were added texts that should not be in the yml file, because they are commands. Its the long error code I had initially posted $ zammad..., etc. (I should had realized earlier with the $.)

Thank for trying to help out dadoonet. The problem is solved.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.