# Functionbeat GCP pub/sub requiring storage entry point when only pub/sub is enabled

**URL:** <https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254>\
**Category:** Beats\
**Tags:** beats-module, functionbeat\
**Created:** [January 24, 2022, 4:33pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254 "2022-01-24T16:33:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Borys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_borys/32/100799_2.png) [@Sebastian\_Borys](https://discuss.elastic.co/u/Sebastian_Borys)\
**Post date:** [January 24, 2022, 4:33pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/1 "2022-01-24T16:33:10Z")

</div>

Deploying functionbeat on GCP with entry point `RunPubSub` returns an error complaining about storage entry point, which I am not using.

I get the following error upon deploy

```auto
Deployment failure:
Build failed: # functions.local/app/main
src/functions.local/app/main/main.go:43:21: undefined: storage.RunPubSub; Error ID: 2f5e35a0

```

The problem is ,as I noticed it, Functionbeat is requiring storage entry point. I am NOT using the gcp storage functionality, I am using pub/sub functionality with `RunPubSub`. Why is it requiring the storage entry point? I am not able to provide multiple entry points to my knowledge.

- Version: 7.13.4 ( noticed on others as well)
- Operating System: LINUX X86\_64
- Github Issue URL: [Functionbeat GCP pub/sub requiring storage entry point when only pub/sub is enabled · Issue #29967 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/29967)
- Steps to Reproduce:

1. Package functionbeat using LINUX X86\_64 7.13.4 up using the following command

```auto
./functionbeat export function pubsub -c functionbeat-file.yml

```

1. Go into GCP function and go through creating a cloud function steps, upload the packaed zip,
2. **add entry point "RunPubSub"**
3. Select Golang version 1.16 in order to avoid another bug ([functionbeat 7.12 can't deploy -- unknown field 'VerifyConnection' in struct literal of type tls.Config · Issue #24925 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/24925)). \<\<\< Selecting 1.13 will yield this error. Keep in mind the runtime of the function is GoLang 1.13 (could this be the problem?)

```auto
 ./functionbeat export function pubsub |grep runtime
    runtime: go113

```

My config file

```auto
functionbeat.provider.gcp.location_id: "us-central1"

functionbeat.provider.gcp.project_id: "some-project"

functionbeat.provider.gcp.storage_name: "some-bucket"

functionbeat.provider.gcp.functions:
  - name: pubsub
    enabled: true
    type: pubsub

    description: "Google Cloud Function for Pub/Sub"
    memory_size: 512MB
    timeout: 60s
    service_account_email: some-email

    trigger:
      resource: "some-topic"
processors:
- add_cloud_metadata:
    providers: ["gcp"]
- add_fields:
    target: field
    fields:
      sourcetype: test
      service: logging
- drop_event:
    when:
      not:
       regexp:
         field.sourcetype: ".*"
logging.level: info
logging.json: true
output.logstash:
  hosts: ["some-host"]
  pipelining: 0
  max_retries: 0
  ttl: 30s
setup.ilm.enabled: false
setup.template.enabled: false
path:
  config: ./
  home: ./

```

Relating: [Functionbeat missing package io/fs - #10 by Edoardo\_Tenani](https://discuss.elastic.co/t/functionbeat-missing-package-io-fs/284975/10)

---

<div class="post-metadata">

**Author:** ![Sebastian\_Borys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_borys/32/100799_2.png) [@Sebastian\_Borys](https://discuss.elastic.co/u/Sebastian_Borys)\
**Post date:** [January 24, 2022, 5:10pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/2 "2022-01-24T17:10:39Z")

</div>

I wonder even if I manage to get this to run if I will run into this

> [@Functionbeat missing package io/fs](https://discuss.elastic.co/t/functionbeat-missing-package-io-fs/284975/9):
>
> Hello @Edoardo_Tenani, Thanks a lot for your advice, it worked for the deployment part. functionbeat is properly deployed on GCP cloud function with Go 1.16. Unfortunately, after sending some traffic through the cloud function I still get the panic crash error. Same behaviour as before, the first message is properly delivered to my Elastic cloud cluster. I can see it in kibana. The second message always makes functionbeat to crash FATAL [functionbeat] instance/beat.go:171 Failed due to panic.…

[GCP/FunctionBeat Errors [cannot find matching process for pid=1, name version already used] · Issue #25596 · elastic/beats · GitHub 1](https://github.com/elastic/beats/issues/25596)

---

<div class="post-metadata">

**Author:** ![Sebastian\_Borys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_borys/32/100799_2.png) [@Sebastian\_Borys](https://discuss.elastic.co/u/Sebastian_Borys)\
**Post date:** [January 24, 2022, 8:34pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/3 "2022-01-24T20:34:34Z")

</div>

`Keep in mind the runtime of the function is GoLang 1.13 (could this be the problem?)`  
recompiled the functionbeat binary as goLang 1.16 and repackaged, same error.

---

<div class="post-metadata">

**Author:** ![Yero\_Me](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yero_me/32/94980_2.png) [@Yero\_Me](https://discuss.elastic.co/u/Yero_Me)\
**Post date:** [January 24, 2022, 9:02pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/4 "2022-01-24T21:02:33Z")

</div>

You should avoid getting functionbeat to run on cloud function. It doesn't work and it will never reach a proper release. Edoardo told me about using a GCP dataflow template and it's working fine so far. The downside is the cost tho.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Borys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_borys/32/100799_2.png) [@Sebastian\_Borys](https://discuss.elastic.co/u/Sebastian_Borys)\
**Post date:** [January 24, 2022, 9:24pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/5 "2022-01-24T21:24:44Z")

</div>

Thanks, - just surprised that they included gcp support for so long until 7.15

---

<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:** [February 21, 2022, 11:25pm UTC](https://discuss.elastic.co/t/functionbeat-gcp-pub-sub-requiring-storage-entry-point-when-only-pub-sub-is-enabled/295254/6 "2022-02-21T23:25:42Z")

</div>

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