# Azure App Service Web Job won't start after update: Exiting: The system cannot find the file specified

**URL:** <https://discuss.elastic.co/t/azure-app-service-web-job-wont-start-after-update-exiting-the-system-cannot-find-the-file-specified/309449>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 12, 2022, 5:56pm UTC](https://discuss.elastic.co/t/azure-app-service-web-job-wont-start-after-update-exiting-the-system-cannot-find-the-file-specified/309449 "2022-07-12T17:56:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daymansiege](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daymansiege/32/103766_2.png) [@daymansiege](https://discuss.elastic.co/u/daymansiege)\
**Post date:** [July 12, 2022, 5:56pm UTC](https://discuss.elastic.co/t/azure-app-service-web-job-wont-start-after-update-exiting-the-system-cannot-find-the-file-specified/309449/1 "2022-07-12T17:56:51Z")

</div>

Hi!

I was using 7.9.2 filebeat successfully as Azure Web Job with IIS module enabled.  
Was running it as this:  
`run.cmd`:

```auto
set JOB_DIR=%~dp0
%JOB_DIR%filebeat.exe --environment=windows_service -c %JOB_DIR%filebeat.yml --path.home %JOB_DIR% --path.data "%HOME%\filebeat" --path.logs "%HOME%\filebeat\logs" -E logging.files.redirect_stderr=true

```

`iis.yaml`:

```auto
- module: iis
  access:
    enabled: true
    var.paths: ["D:/home/LogFiles/http/RawLogs/*.log"]
  error:
    enabled: false

```

However, after update to 7.17.5 filebeat won't start, returning generic error `"Exiting: The system cannot find the file specified."`

I've enabled debug output and it logged this:

```auto
2022-07-12T17:18:36.364Z	INFO	instance/beat.go:685	Home path: [D:\local\Temp\jobs\continuous\filebeat\kc0z1gcp.mza\] Config path: [D:\local\Temp\jobs\continuous\filebeat\kc0z1gcp.mza\] Data path: [D:\home\filebeat] Logs path: [D:\home\filebeat\logs] Hostfs Path: [/]
2022-07-12T17:18:36.583Z	DEBUG	[beat]	instance/beat.go:743	Beat metadata path: D:\home\filebeat\meta.json
2022-07-12T17:18:36.583Z	INFO	instance/beat.go:693	Beat ID: eb3f61ff-c22c-4da2-aa0f-ee8ae83f1793
2022-07-12T17:18:36.599Z	ERROR	instance/beat.go:1014	Exiting: The system cannot find the file specified.

```

I've disabled host/cloud metadata and IIS module as well as suggested [here](https://discuss.elastic.co/t/filebeat-as-webjob-in-an-azure-app-service/165056/2). But it didn't change anything.

Tried to delete existing data folder, this caused new meta.json with new ID created, but error was the same.  
Tried to use `-e` option w/o `-environment` and got the same in stdout:

```auto
[07/12/2022 17:50:06 > d1e6ab: INFO] D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl>D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl\filebeat.exe -e -c D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl\filebeat.yml --path.home D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl\ --path.data "D:\home\filebeat" --path.logs "D:\home\filebeat\logs" -E logging.files.redirect_stderr=true -d "*" 
[07/12/2022 17:50:07 > d1e6ab: ERR] 2022-07-12T17:50:07.596Z	INFO	instance/beat.go:685	Home path: [D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl\] Config path: [D:\local\Temp\jobs\continuous\filebeat\j5tqhn11.ncl\] Data path: [D:\home\filebeat] Logs path: [D:\home\filebeat\logs] Hostfs Path: [/]
[07/12/2022 17:50:07 > d1e6ab: ERR] 2022-07-12T17:50:07.611Z	DEBUG	[beat]	instance/beat.go:743	Beat metadata path: D:\home\filebeat\meta.json
[07/12/2022 17:50:07 > d1e6ab: ERR] 2022-07-12T17:50:07.611Z	INFO	instance/beat.go:693	Beat ID: aa6deb5a-3041-4b99-a0dd-ad2fcf643fba
[07/12/2022 17:50:07 > d1e6ab: ERR] 2022-07-12T17:50:07.611Z	ERROR	instance/beat.go:1014	Exiting: The system cannot find the file specified.
[07/12/2022 17:50:07 > d1e6ab: ERR] Exiting: The system cannot find the file specified.

```

Tried to run `test config`, returns ok.

```auto
[07/13/2022 09:26:01 > d1e6ab: INFO] D:\local\Temp\jobs\continuous\filebeat\ryopp0aj.lbr>D:\local\Temp\jobs\continuous\filebeat\ryopp0aj.lbr\filebeat.exe test config -c D:\local\Temp\jobs\continuous\filebeat\ryopp0aj.lbr\filebeat.yml --path.home D:\local\Temp\jobs\continuous\filebeat\ryopp0aj.lbr\ --path.data "D:\home\filebeat" --path.logs "D:\home\filebeat\logs" -E logging.files.redirect_stderr=true -d "*" 
[07/13/2022 09:26:10 > d1e6ab: INFO] Config OK

```

The error is quite vague as I'm not sure what file can't it find. Is it some folder or else?  
What else can I do to diagnose the issue?

---

<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:** [August 9, 2022, 7:57pm UTC](https://discuss.elastic.co/t/azure-app-service-web-job-wont-start-after-update-exiting-the-system-cannot-find-the-file-specified/309449/2 "2022-08-09T19:57:30Z")

</div>

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