Filebeat on laptop with Win 10

Hello to all out there,

Today I was trying to install filebeat on my laptop with Windows 10.
Earlier I was able to install Elasticsearch, Kibana and Logstash.

My account has administrator rights and I tried:

PS C:\Program Files\Filebeat> PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-filebeat.ps1

And got message:

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Program Files\Filebeat\install-service-filebeat.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):

I entered: R

New-Service : Service 'filebeat (filebeat)' cannot be created due to the following error: Toegang geweigerd ("toegang geweigerd" means access denied)
At C:\Program Files\Filebeat\install-service-filebeat.ps1:12 char:1

  • New-Service -name filebeat `
  •   + CategoryInfo          : PermissionDenied: (filebeat:String) [New-Service], ServiceCommandException
      + FullyQualifiedErrorId : CouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand
    
    
    

I also tried:
PS C:\Program Files\Filebeat> ./filebeat -configtest -e

And I got message:

filebeat2017/11/04 08:46:21.827890 beat.go:339: CRIT Exiting: error setting default paths: Failed to create data path C:\Program Files\Filebeat\data: mkdir C:\Program Files\Filebeat\data: Toegang geweigerd.
Exiting: error setting default paths: Failed to create data path C:\Program Files\Filebeat\data: mkdir C:\Program Files\Filebeat\data: Toegang geweigerd.

So again "toegang geweigerd" "access denied".
I manually added a subdirectory "data" and tried again:

PS C:\Program Files\Filebeat> ./filebeat -configtest -e

2017/11/04 08:46:54.047506 beat.go:285: INFO Home path: [C:\Program Files\Filebeat] Config path: [C:\Program Files\Filebeat] Data path: [C:\Program Files\Filebeat\data] Logs path: [C:\Program Files\Filebeat\logs]
2017/11/04 08:46:54.047506 metrics.go:23: INFO Metrics logging every 30s
2017/11/04 08:46:54.047506 beat.go:186: INFO Setup Beat: filebeat; Version: 5.4.3
2017/11/04 08:46:54.054506 output.go:258: INFO Loading template enabled. Reading template file: C:\Program Files\Filebeat\filebeat.template.json
2017/11/04 08:46:54.058510 output.go:269: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: C:\Program Files\Filebeat\filebeat.template-es2x.json
2017/11/04 08:46:54.061509 output.go:281: INFO Loading template enabled for Elasticsearch 6.x. Reading template file: C:\Program Files\Filebeat\filebeat.template-es6x.json
2017/11/04 08:46:54.066509 client.go:123: INFO Elasticsearch url: http://localhost:9200
2017/11/04 08:46:54.067509 outputs.go:108: INFO Activated elasticsearch as output plugin.
2017/11/04 08:46:54.070510 publish.go:295: INFO Publisher name: DESKTOP-4NODCVV
2017/11/04 08:46:54.081520 async.go:63: INFO Flush Interval set to: 1s
2017/11/04 08:46:54.082518 async.go:64: INFO Max Bulk Size set to: 50
Config OK

Now I seems to work okay?

Then I tried again:
PS C:\Data\Elastic\Elastic2 (X-pack)\Filebeat> PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-filebeat.ps1

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Data\Elastic\Elastic2 (X-pack)\Filebeat\install-service-filebeat.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):

R

New-Service : Service 'filebeat (filebeat)' cannot be created due to the following error: Toegang geweigerd
At C:\Data\Elastic\Elastic2 (X-pack)\Filebeat\install-service-filebeat.ps1:12 char:1

  • New-Service -name filebeat `
  •   + CategoryInfo          : PermissionDenied: (filebeat:String) [New-Service], ServiceCommandException
      + FullyQualifiedErrorId : CouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand
    
    
    

And again "access denied".

Don't know what to do next to solve this issue. Any thoughts?

Thanks in advance for your help.

KJ Wijne

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