Hi, I am setting up self-hosted signoz and have tr...
# support
f
Hi, I am setting up self-hosted signoz and have troubles with SMTP authentication. I managed to configure it through the helm chart like
Copy code
queryService:
  additionalEnvs:
    SMTP_ENABLED: 'true'
    SMTP_FROM: <email>
    SMTP_HOST: <http://email-smtp.eu-central-1.amazonaws.com|email-smtp.eu-central-1.amazonaws.com>
    SMTP_PORT: '587'
    SMTP_AUTH_USERNAME: <AWS SES user>
    SMTP_AUTH_PASSWORD: <AWS SES password>
But when I invite a new user I get the following error message:
Copy code
{
    "level": "ERROR",
    "timestamp": "2024-07-31T12:19:39.033Z",
    "caller": "auth/auth.go:134",
    "msg": "failed to send email",
    "error": "530 Authentication required",
}
with stacktrace:
Copy code
<http://go.signoz.io/signoz/pkg/query-service/auth.inviteEmail|go.signoz.io/signoz/pkg/query-service/auth.inviteEmail>
	/home/runner/work/signoz/signoz/pkg/query-service/auth/auth.go:134
<http://go.signoz.io/signoz/pkg/query-service/auth.Invite|go.signoz.io/signoz/pkg/query-service/auth.Invite>
	/home/runner/work/signoz/signoz/pkg/query-service/auth/auth.go:101
<http://go.signoz.io/signoz/pkg/query-service/app.(*APIHandler).inviteUser|go.signoz.io/signoz/pkg/query-service/app.(*APIHandler).inviteUser>
	/home/runner/work/signoz/signoz/pkg/query-service/app/http_handler.go:1680
<http://go.signoz.io/signoz/pkg/query-service/app.(*APIHandler).RegisterRoutes.(*AuthMiddleware).AdminAccess.func66|go.signoz.io/signoz/pkg/query-service/app.(*APIHandler).RegisterRoutes.(*AuthMiddleware).AdminAccess.func66>
	/home/runner/work/signoz/signoz/pkg/query-service/app/auth.go:120
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://go.signoz.io/signoz/ee/query-service/app.loggingMiddleware.func1|go.signoz.io/signoz/ee/query-service/app.loggingMiddleware.func1>
	/home/runner/work/signoz/signoz/ee/query-service/app/server.go:379
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://go.signoz.io/signoz/ee/query-service/app.(*Server).analyticsMiddleware-fm.(*Server).analyticsMiddleware.func1|go.signoz.io/signoz/ee/query-service/app.(*Server).analyticsMiddleware-fm.(*Server).analyticsMiddleware.func1>
	/home/runner/work/signoz/signoz/ee/query-service/app/server.go:534
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://go.signoz.io/signoz/ee/query-service/app.setTimeoutMiddleware.func1|go.signoz.io/signoz/ee/query-service/app.setTimeoutMiddleware.func1>
	/home/runner/work/signoz/signoz/ee/query-service/app/server.go:565
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://go.signoz.io/signoz/pkg/query-service/app.LogCommentEnricher.func1|go.signoz.io/signoz/pkg/query-service/app.LogCommentEnricher.func1>
	/home/runner/work/signoz/signoz/pkg/query-service/app/server.go:360
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://github.com/gorilla/mux.(*Router).ServeHTTP|github.com/gorilla/mux.(*Router).ServeHTTP>
	/home/runner/go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212
<http://go.signoz.io/signoz/ee/query-service/app.(*Server).createPublicServer.(*Cors).Handler.func2|go.signoz.io/signoz/ee/query-service/app.(*Server).createPublicServer.(*Cors).Handler.func2>
	/home/runner/go/pkg/mod/github.com/rs/cors@v1.11.0/cors.go:289
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
<http://go.signoz.io/signoz/ee/query-service/app.(*Server).createPublicServer.CompressHandler.CompressHandlerLevel.func3|go.signoz.io/signoz/ee/query-service/app.(*Server).createPublicServer.CompressHandler.CompressHandlerLevel.func3>
	/home/runner/go/pkg/mod/github.com/gorilla/handlers@v1.5.1/compress.go:141
net/http.HandlerFunc.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2141
net/http.serverHandler.ServeHTTP
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2943
net/http.(*conn).serve
	/opt/hostedtoolcache/go/1.21.12/x64/src/net/http/server.go:2014
Can someone help here? From what it looks like to me, the
smtp.PlainAuth
is missing.
s
@Florian Schröder, plain auth is not missing. The env should be
SMTP_USERNAME
and
SMTP_PASSWORD
for query-service . Where did you find the ref of
SMTP_AUTH_USERNAME/PASSWORD
f
it is working now, thanks!