aws-vault icon indicating copy to clipboard operation
aws-vault copied to clipboard

aws-vault in Windows WSL/Ubuntu 20.04 takes minutes to respond

Open djmills64 opened this issue 3 years ago • 5 comments

Hi,

If I run "aws-vault list" (or any other aws-vault command) on "Command Prompt I get an instant response. But via bash WSL it takes over a minute to respond.

I found a post that suggested that dbus might be the cause. I removed it but no improvement.

Any suggestions.

--debug didn't show anything useful.

I'm running Windows 11.

djmills64 avatar Feb 03 '22 04:02 djmills64

I have the exact same problem. I don't know what the problem is. WSL, Windows 11 and no output in debug

thomaskvnze avatar Feb 07 '22 00:02 thomaskvnze

I got some debug output. When I started the wsl ubuntu and call aws-vault list the first time, I get this:

aws-vault list --debug
2022/02/07 19:21:58 aws-vault 6.5.0-Homebrew
2022/02/07 19:21:58 [keyring] Considering backends: [secret-service]
2022/02/07 19:21:58 Loading config file /home/usrname/.aws/config
2022/02/07 19:21:58 Parsing config file /home/usrname/.aws/config
2022/02/07 19:22:12 Unrecognised ini file section: DEFAULT
Profile                  Credentials              Sessions
=======                  ===========              ========
default                  -                        -
hidden                   -                        -

When I try to run the command again, I get this after a delay.

aws-vault list --debug
2022/02/07 19:24:27 aws-vault 6.5.0-Homebrew
2022/02/07 19:24:27 [keyring] Considering backends: [secret-service]
2022/02/07 19:26:27 [keyring] Failed backend secret-service: Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
aws-vault: error: Specified keyring backend not available, try --help

thomaskvnze avatar Feb 07 '22 18:02 thomaskvnze

I don't have the same issue regarding aws-vault list (that's always fast for me) however I do have something similar if I issue multiple aws-vault exec commands. For me, I have to aws-vault clear otherwise I can't connect again.

One thing that did seem to help me just now (and I'm not 💯 why) but doing this got me past my issue and now it's very quick:

gpgconf --kill gpg-agent

Before it wasn't prompting me in the terminal to enter my pass password like it did before, but killing that agent did.

leviwilson avatar Apr 05 '22 19:04 leviwilson

I use it in WSL2 On my environment aws-vault will wait for dbus-launch to start dbus, but if dbus-launch never finishes starting dbus then aws-vault will keep waiting. So I traced the dbus-launch process using strace and found that he was stuck at this step

connect(3, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X0"}, 110

After deleting the X0 file in /tmp/.X11-unix, run aws-vault again very process, the problem is solved

z2665 avatar Apr 08 '22 06:04 z2665

Same issue, but none of the above solutions worked for me. Is anyone working on this? Has anyone workarounded it in another way?

tairosonloa avatar Aug 09 '22 10:08 tairosonloa

@tairosonloa did you ever find a workaround for this?

TM-23 avatar Sep 28 '22 14:09 TM-23

@tairosonloa did you ever find a workaround for this?

Sadly no. Ended using another tool for that, awsume

tairosonloa avatar Sep 28 '22 17:09 tairosonloa

@tairosonloa did you ever find a workaround for this?

Sadly no. Ended using another tool for that, awsume

Thanks, I'll use that too.

TM-23 avatar Oct 09 '22 12:10 TM-23

Related: https://github.com/microsoft/wslg/issues/904

OscarBarrett avatar Jan 23 '23 17:01 OscarBarrett

Hi,

If I run "aws-vault list" (or any other aws-vault command) on "Command Prompt I get an instant response. But via bash WSL it takes over a minute to respond.

I found a post that suggested that dbus might be the cause. I removed it but no improvement.

Any suggestions.

--debug didn't show anything useful.

I'm running Windows 11.

I had the exact same issue and I believe it's a permissions issue. If you run it as admin with "sudo" , it should work

joshuajipp avatar Mar 20 '23 01:03 joshuajipp

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Sep 16 '23 10:09 github-actions[bot]