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

Unable to store secret: memcache: no servers configured or available #2686

Open
eitch opened this issue Feb 7, 2025 · 0 comments
Open

Unable to store secret: memcache: no servers configured or available #2686

eitch opened this issue Feb 7, 2025 · 0 comments

Comments

@eitch
Copy link

eitch commented Feb 7, 2025

I am trying to run yopass in a docker compose environment. This is my compose file:

services:
  memcached:
    image: memcached
    restart: unless-stopped
    expose:
      - "11211"
  yopass:
    image: jhaals/yopass
    restart: unless-stopped
    expose:
      - 80
    environment:
      - TZ=Europe/Zurich
      - DISABLE_IPV6=true
    command: "--database memcached --memcached=memcached:11211 --port 80"
    networks:
      proxy-network:
        ipv4_address: 10.x.x.x
networks:
  proxy-network:
    external: true

The containers start but i don't see anything about the memcached being configured:

$ sudo docker compose up 
[+] Running 3/3
 ✔ Network yopass_default        Created                                                                                                                                                                                                                                                                                                          0.1s 
 ✔ Container yopass-yopass-1     Created                                                                                                                                                                                                                                                                                                          0.0s 
 ✔ Container yopass-memcached-1  Created                                                                                                                                                                                                                                                                                                          0.0s 
Attaching to memcached-1, yopass-1
yopass-1     | {"level":"info","ts":1738927250.3718011,"caller":"yopass-server/main.go:69","msg":"Starting yopass server","address":":80"}

I can bring up the UI, but storing gives me an error:

yopass-1     | {"level":"error","ts":1738927035.5842435,"caller":"server/server.go:81","msg":"Unable to store secret","error":"memcache: no servers configured or available","stacktrace":"github.com/jhaals/yopass/pkg/server.(*Server).createSecret\n\t/yopass/pkg/server/server.go:81\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2220\ngithub.com/jhaals/yopass/pkg/server.newMetricsMiddleware.func1.1\n\t/yopass/pkg/server/server.go:237\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2220\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:212\ngithub.com/jhaals/yopass/pkg/server.(*Server).HTTPHandler.SecurityHeadersHandler.func1\n\t/yopass/pkg/server/server.go:207\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2220\ngithub.com/gorilla/handlers.loggingHandler.ServeHTTP\n\t/go/pkg/mod/github.com/gorilla/[email protected]/logging.go:47\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:3210\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:2092"}

This is with the latest container as of today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant