Skip to content

Writing to sincedb fails on arm64 nodes #281

@robbavey

Description

@robbavey

Running a simple logstash file input pipeline:

input {                                                                         
  stdin {}                                                                      
  file {                                                                        
    path => "/home/ec2-user/logstash-7.10.2/logs/*.log"                                           
  }                                                                             
}   

on a newly provisioned t4g.micro AWS graviton2 equipped EC2 instance results in the following error:

[2021-01-27T15:05:43,986][ERROR][logstash.javapipeline    ][main][5f530e7945bfbf4772f27679f28f3827e86eeefe3a458ef34b4456b91fb2e21f] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::File path=>["/home/ec2-user/logstash-7.10.2/logs/*.log"], id=>"5f530e7945bfbf4772f27679f28f3827e86eeefe3a458ef34b4456b91fb2e21f", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_9b5027d7-e749-4d12-af5c-f357f2fc3519", enable_metric=>true, charset=>"UTF-8">, stat_interval=>1.0, discover_interval=>15, sincedb_write_interval=>15.0, start_position=>"end", delimiter=>"\n", close_older=>3600.0, mode=>"tail", file_completed_action=>"delete", sincedb_clean_after=>1209600.0, file_chunk_size=>32768, file_chunk_count=>140737488355327, file_sort_by=>"last_modified", file_sort_direction=>"asc", exit_after_read=>false, check_archive_validity=>false>
  Error: Operation not permitted - No message available
  Exception: Errno::EPERM
  Stack: org/jruby/RubyFile.java:675:in `chown'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/helper.rb:41:in `write_atomically'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/sincedb_collection.rb:228:in `atomic_write'
org/jruby/RubyMethod.java:119:in `call'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/sincedb_collection.rb:212:in `sincedb_write'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/sincedb_collection.rb:185:in `flush_at_interval'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/sincedb_collection.rb:32:in `request_disk_flush'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/handlers/base.rb:78:in `controlled_read'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/handlers/grow.rb:10:in `block in handle_specifically'
org/jruby/RubyKernel.java:1442:in `loop'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/handlers/grow.rb:7:in `handle_specifically'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/handlers/base.rb:25:in `handle'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/processor.rb:43:in `grow'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/processor.rb:234:in `block in process_active'
org/jruby/RubyArray.java:1809:in `each'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/processor.rb:228:in `process_active'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/tail_mode/processor.rb:75:in `process_all_states'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/watch.rb:70:in `iterate_on_state'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/watch.rb:44:in `subscribe'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/filewatch/observing_tail.rb:12:in `subscribe'
/home/ec2-user/logstash-7.10.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.3/lib/logstash/inputs/file.rb:364:in `run'
/home/ec2-user/logstash-7.10.2/logstash-core/lib/logstash/java_pipeline.rb:405:in `inputworker'
/home/ec2-user/logstash-7.10.2/logstash-core/lib/logstash/java_pipeline.rb:396:in `block in start_input'

This same pipeline works correctly on a similarly newly provisioned t2.micro instance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions