Setting up dev environment : yarn es source command fails

Hello,

I want to create my own custom plugin so I followed the steps to setup the development environment given by https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md.

Unfortunately, I have been having a hard time trying to set it up...
I have been able to follow the steps up to the yarn es source command where I get the following
error :

$ node scripts/es source
info Installing from source
│ info source path: /home/exploit/elasticsearch
│ info install path: /home/exploit/kibana/.es/source
│ info license: basic
│ info on master at 65cbe51c394c4e23908eecd84ac1cc6e762f8e9e
│ info 0 locally modified file(s)
│ info ./gradlew :distribution:archives:linux-tar:assemble
│ debg Starting a Gradle Daemon (subsequent builds will be faster)
│ debg > Task :buildSrc:compileMinimumRuntimeJava UP-TO-DATE
│ debg > Task :buildSrc:compileMinimumRuntimeGroovy NO-SOURCE
│ debg > Task :buildSrc:processMinimumRuntimeResources NO-SOURCE
│ debg > Task :buildSrc:minimumRuntimeClasses UP-TO-DATE
│ debg > Task :buildSrc:compileJava UP-TO-DATE
│ debg > Task :buildSrc:compileGroovy UP-TO-DATE
│ debg > Task :buildSrc:generateVersionProperties UP-TO-DATE
│ debg > Task :buildSrc:pluginDescriptors UP-TO-DATE
│ debg > Task :buildSrc:processResources UP-TO-DATE
│ debg > Task :buildSrc:classes UP-TO-DATE
│ debg > Task :buildSrc:jar UP-TO-DATE
│ debg > Task :buildSrc:assemble UP-TO-DATE
│ debg > Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
│ debg > Task :buildSrc:compileTestJava UP-TO-DATE
│ debg > Task :buildSrc:compileTestGroovy UP-TO-DATE
│ debg > Task :buildSrc:processTestResources UP-TO-DATE
│ debg > Task :buildSrc:testClasses UP-TO-DATE
│ debg > Task :buildSrc:test SKIPPED
│ debg > Task :buildSrc:validateTaskProperties UP-TO-DATE
│ debg > Task :buildSrc:check UP-TO-DATE
│ debg > Task :buildSrc:build UP-TO-DATE
│ERROR
│ERROR FAILURE: Build completed with 2 failures.
│ERROR
│ERROR 1: Task failed with an exception.
│ERROR -----------
│ERROR * Where:
│ERROR Build file '/home/exploit/elasticsearch/benchmarks/build.gradle' line: 20
│ERROR
│ERROR * What went wrong:
│ERROR A problem occurred evaluating project ':benchmarks'.
│ERROR > Failed to apply plugin [id 'elasticsearch.build']
│ERROR > Cannot set maxParallelForks to a value less than 1.
│ERROR
│ERROR * Try:
│ERROR Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
│ERROR ==============================================================================
│ERROR
│ERROR 2: Task failed with an exception.
│ERROR -----------
│ERROR * What went wrong:
│ERROR A problem occurred configuring project ':benchmarks'.
│ERROR > Failed to notify project evaluation listener.
│ERROR > Must specify license and notice file for project :benchmarks
│ERROR > Must specify license and notice file for project :benchmarks
│ERROR > Must specify license and notice file for project :benchmarks
│ERROR
│ERROR * Try:
│ERROR Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
│ERROR ==============================================================================
│ERROR
│ERROR * Get more help at https://help.gradle.org
│ERROR
│ERROR BUILD FAILED in 39s
│ERROR unable to build ES
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I am working on a debian 9 VM and have forked and clone kibana and elasticsearch from elastic's github recently.

Thanks

Hello,

There might be issues with ES master not being stable. I'd recommend using yarn es snapshot. This way you'll have the latest running ES snapshot.

Sorry for my late response,
I have tried to use snapshot first and it did not work. I tried running yarn es snapshot again yesterday and left it running all night to discover it was stuck at the same place I had left it the day before.
node scripts/es snapshot
info Installing from snapshot
│ info version: 8.0.0
│ info install path: /home/exploit/kibana/.es/8.0.0
│ info license: basic
│ info downloading artifact info from https://artifacts-api.elastic.co/v1/versions/8.0.0-SNAPSHOT/builds/latest/projects/elasticsearch
│ info downloading artifact from https://snapshots.elastic.co/8.0.0-922fcaae/downloads/elasticsearch/elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
│ info downloading artifact checksum from https://snapshots.elastic.co/8.0.0-922fcaae/downloads/elasticsearch/elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz.sha512
│ info checksum verified
│ info extracting /home/exploit/kibana/.es/cache/elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
│ info extracted to /home/exploit/kibana/.es/8.0.0
│ info setting bootstrap password to changeme
info Starting
│ debg bin/elasticsearch
│ERROR OpenJDK 64-Bit Server VM warning:
│ERROR Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
│ERROR

│ info [o.e.e.NodeEnvironment] [debian9] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [5gb], net total_space [24.4gb], types [ext4]
│ info [o.e.e.NodeEnvironment] [debian9] heap size [1015.6mb], compressed ordinary object pointers [true]
│ info [o.e.n.Node] [debian9] node name [debian9], node ID [cQLOA-IyQeeb_mx-UggiXw],

[...some other stuff...]

[basic] - valid
│ info [o.e.x.s.s.SecurityStatusChangeListener] [debian9] Active license is now [BASIC]; Security is enabled
│ info [o.e.c.r.a.AllocationService] [debian9] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-7][0]] ...]).

I will try to be more reactive in the future so this issue can be resolved as soon as possible.

The logs show that ES snapshot is running. Now you can start kibana in another terminal.

It worked! thank you for your help !