Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java HotSpot(TM) 64-Bit Server VM warning Cannot open file logs/gc.log due to No such file or directory

Tags:

java

I'm getting this error when I try to run

RACK_ENV=test be rails test test/system/service_provider_map_test.rb —seed 48088

Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory

The tests are then timing out with this error

Timeout while waiting for cluster status [green] and [1] nodes /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:551:in sleep': execution expired (Timeout::Error) from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:551:inblock (2 levels) in __wait_for_status' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:542:in loop' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:542:inblock in __wait_for_status' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/2.4.0/timeout.rb:108:in timeout' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:541:in__wait_for_status' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:364:in wait_for_green' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:280:instart' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:52:in start' from /Users/patrickward/Desktop/esh/SDR/test/support/elasticsearch_helpers.rb:38:in start_elasticsearch' from /Users/patrickward/Desktop/esh/SDR/test/application_system_test_case.rb:12:in <class:ApplicationSystemTestCase>' from /Users/patrickward/Desktop/esh/SDR/test/application_system_test_case.rb:6:in ' from /Users/patrickward/Desktop/esh/SDR/test/system/service_provider_map_test.rb:2:in require' from /Users/patrickward/Desktop/esh/SDR/test/system/service_provider_map_test.rb:2:in ' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:14:in require' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:14:in block in require_files' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:13:in each' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:13:in require_files' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/minitest_plugin.rb:96:in plugin_rails_init' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:81:in block in init_plugins' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:79:in each' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:79:in init_plugins' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:130:in run' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/minitest_plugin.rb:77:inrun' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'

For context: I'm running on a Mac OS, any help would be greatly appreciated

like image 852
Patrick Ward Avatar asked Feb 08 '18 22:02

Patrick Ward


1 Answers

Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory

is not an error it is a warning and misleading. The real error message is

Timeout while waiting for cluster status [green] and [1] nodes

elasticsearch-ruby library has a test code which is starting a cluster itself. and it comes from this test. https://github.com/elastic/elasticsearch-ruby/blob/6.x/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb Line : 579

message = "\nTimeout while waiting for cluster status [#{status}]"
message += " and [#{arguments[:number_of_nodes]}] nodes" if arguments[:number_of_nodes]
    __log message.ansi(:red, :bold)

However there was a bug which is pointing your problem. https://github.com/elastic/elasticsearch-ruby/issues/371 You may need to upgrade your elasticsearch-ruby version to newer one

like image 105
Mehmet Sunkur Avatar answered Nov 15 '22 00:11

Mehmet Sunkur