# Make: \*\*\* No rule to make target \`setup'. Stop.- Custom beat

**URL:** https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231
**Category:** Beats
**Tags:** beats-development
**Created:** [April 22, 2020, 10:34am UTC](https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231 "2020-04-22T10:34:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![visasimbu](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@visasimbu](https://discuss.elastic.co/u/visasimbu)
#### Post date: [April 22, 2020, 10:34am UTC](https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231/1 "2020-04-22T10:34:45Z")

</div>

I am able to create custom beat and build (mage build) as per the documentation. But I am getting below error while executing `make setup`. Documentation is [here](https://www.elastic.co/guide/en/beats/devguide/current/setting-up-beat.html).

```auto
[user@machineName test3]$ make setup
make: *** No rule to make target `setup'. Stop.
[user@machineName test3]$ pwd
/home/user/elk/src/github.com/elastic/test3

```

Since this step is not successful, yml file is not created and resulted in execution error on beat. Am I missing something here ?

```auto
[user@machineName test3]$ ./test3 -e -d "*"
Exiting: error loading config file: stat test1.yml: no such file or directory

```

My input while creating beat

```auto
Enter the beat name [examplebeat]: test1
Enter your github name [your-github-name]: test2
Enter the beat path [github.com/test2/test1]: github.com/elastic/test3
Enter your full name [Firstname Lastname]: test4
Enter the beat type [beat]: beat
Enter the github.com/elastic/beats revision [master]: master

```

I have Makefile in `/home/user/elk/src/github.com/elastic/test3`.

Content of the make file is below

```auto
BEAT_NAME=test1
BEAT_PATH=github.com/elastic/test3
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS_IMPORT_PATH=github.com/elastic/beats/v7
ES_BEATS?=vendor/${ES_BEATS_IMPORT_PATH}
LIBBEAT_MAKEFILE=$(ES_BEATS)/libbeat/scripts/Makefile
GOPACKAGES=$(shell go list ${BEAT_PATH}/... | grep -v /tools)
GOBUILD_FLAGS=-i -ldflags "-X ${ES_BEATS_IMPORT_PATH}/libbeat/version.buildTime=$(NOW) -X ${ES_BEATS_IMPORT_PATH}/libbeat/version.commit=$(COMMIT_ID)"
MAGE_IMPORT_PATH=github.com/magefile/mage
NO_COLLECT=true
CHECK_HEADERS_DISABLED=true

# Path to the libbeat Makefile
-include $(LIBBEAT_MAKEFILE)

.PHONY: copy-vendor
copy-vendor:
 mage vendorUpdate

```

I have tried below make commands. Because i have seen same in MakeFile ($(GOPATH)/src/github.com/elastic/test3/vendor/github.com/elastic/beats/v7/libbeat/scripts)

```auto
make release
make snapshot

```

Error

```auto
Doing `require 'backports'` is deprecated and will not load any backport in the next major release.
Require just the needed backports instead, or 'backports/latest'.
>> Testing package contents
--- FAIL: TestRPM (0.00s)
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-aarch64.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-aarch64.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-i686.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-i686.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-x86_64.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-SNAPSHOT-x86_64.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-aarch64.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-aarch64.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-i686.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-i686.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-x86_64.rpm_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestRPM/test3-8.0.0-x86_64.rpm_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
--- FAIL: TestDeb (2.41s)
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-amd64.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-amd64.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-arm64.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-arm64.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-i386.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-SNAPSHOT-i386.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-amd64.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-amd64.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-arm64.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-arm64.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-i386.deb_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestDeb/test3-8.0.0-i386.deb_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
--- FAIL: TestTar (3.04s)
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-darwin-x86_64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-darwin-x86_64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-arm64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-arm64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-x86.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-x86.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-x86_64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-SNAPSHOT-linux-x86_64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-darwin-x86_64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-darwin-x86_64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-arm64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-arm64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-x86.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-x86.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-x86_64.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: TestTar/test3-8.0.0-linux-x86_64.tar.gz_config_file_owner (0.00s)
        package_test.go:237: no config file found matching .*beat\.yml$|apm-server\.yml$
--- FAIL: Testuser (6.36s)
    --- FAIL: Testuser/test3-8.0.0-SNAPSHOT-linux-amd64.user.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
    --- FAIL: Testuser/test3-8.0.0-linux-amd64.user.tar.gz_config_file_permissions (0.00s)
        package_test.go:212: no config file found matching .*beat\.yml$|apm-server\.yml$
FAIL
FAIL command-line-arguments 11.822s
FAIL
package ran for 2m53.153574155s
Error: running "go test /home/user/elk/src/github.com/elastic/test3/vendor/github.com/elastic/beats/v7/dev-tools/packaging/package_test.go -root-owner -files /home/user/elk/src/github.com/elastic/test3/build/distributions/*" failed with exit code 1
make: *** [release] Error 1
[user@mymachine test3]$

```

These also throws me an error from test folder. Still not sure what i am missing here ? Can anyone give some help on this ?

Note : I have python3 (Python 3.6.8) installed in my machine. I am using linux(RHEL 7) machine

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [April 27, 2020, 10:50pm UTC](https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231/2 "2020-04-27T22:50:25Z")

</div>

Try `make update`. That should generate the config and fields files.

---

<div class="post-metadata">

### Author: ![visasimbu](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@visasimbu](https://discuss.elastic.co/u/visasimbu)
#### Post date: [May 5, 2020, 8:51pm UTC](https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231/3 "2020-05-05T20:51:29Z")

</div>

Thanks for your reply. The given reply helped me to resolve my issue. Thank you.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 6, 2020, 11:24am UTC](https://discuss.elastic.co/t/make-no-rule-to-make-target-setup-stop-custom-beat/229231/6 "2020-06-06T11:24:30Z")

</div>

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