Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing path for Audit logs (audit_events_uri) results in Teleport initialization failure #3771

Closed
stmuraka opened this issue May 27, 2020 · 2 comments · Fixed by #4064
Closed
Assignees
Labels
bug c-ib Internal Customer Reference

Comments

@stmuraka
Copy link

Description

Changing the local file path to another directory (e.g. /var/lib/teleport/audit) requires audit_sessions_uri to also be set otherwise Teleport does not initialize/start.

What happened:
added the following configuration to teleport.yaml

teleport:
  storage:
    type: dir
    audit_events_uri: ['file:///var/lib/teleport/audit']

What you expected to happen:
Teleport to start and Audit events get placed in new root directory

How to reproduce it (as minimally and precisely as possible):
add configuration above

Environment

  • Teleport version (use teleport version): 4.2.6
  • Tsh version (use tsh version): 4.2.6
  • OS (e.g. from /etc/os-release):
    Teleport container image:
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
  • Where are you running Teleport? (e.g. AWS, GCP, Dedicated Hardware):
    Kubernetes

Browser environment

  • Browser Version (for UI-related issues): N/A
  • Install tools:
  • Others:

Relevant Debug Logs If Applicable

ERROR REPORT:
Original Error: *trace.BadParameterError please specify audit_sessions_uri when using external audit backends
Stack Trace:
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:823 github.com/gravitational/teleport/lib/service.initExternalLog
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:942 github.com/gravitational/teleport/lib/service.(*TeleportProcess).initAuthService
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:648 github.com/gravitational/teleport/lib/service.NewTeleport
	/gopath/src/github.com/gravitational/teleport/e/lib/pro/process.go:41 github.com/gravitational/teleport/e/lib/pro.NewTeleport
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:35 main.run.func1
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:401 github.com/gravitational/teleport/lib/service.Run
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:43 main.run
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:27 main.main
	/opt/go/src/runtime/proc.go:212 runtime.main
	/opt/go/src/runtime/asm_amd64.s:1358 runtime.goexit
User Message: please specify audit_sessions_uri when using external audit backends, initialization failed
  • tsh --debug
  • teleport --debug
@benarent benarent added the c-ib Internal Customer Reference label May 27, 2020
@stmuraka
Copy link
Author

ran with audit_sessions_uri configured. looks as if file:// or stdout:// is only supported with dynamodb:// configured

ERROR REPORT:
Original Error: *trace.BadParameterError file:// or stdout:// log can not be used on it's own, can be only used in combination with external session logs, e.g. dynamodb://
Stack Trace:
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:884 github.com/gravitational/teleport/lib/service.initExternalLog
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:942 github.com/gravitational/teleport/lib/service.(*TeleportProcess).initAuthService
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:648 github.com/gravitational/teleport/lib/service.NewTeleport
	/gopath/src/github.com/gravitational/teleport/e/lib/pro/process.go:41 github.com/gravitational/teleport/e/lib/pro.NewTeleport
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:35 main.run.func1
	/gopath/src/github.com/gravitational/teleport/lib/service/service.go:401 github.com/gravitational/teleport/lib/service.Run
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:43 main.run
	/gopath/src/github.com/gravitational/teleport/e/tool/teleport/main.go:27 main.main
	/opt/go/src/runtime/proc.go:212 runtime.main
	/opt/go/src/runtime/asm_amd64.s:1358 runtime.goexit
User Message: file:// or stdout:// log can not be used on it's own, can be only used in combination with external session logs, e.g. dynamodb://, initialization failed

@russjones
Copy link
Contributor

Best: 1
Realistic: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c-ib Internal Customer Reference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants