juju scp does not work

Bug #2076908 reported by Ebrar Leblebici

This bug report will be marked for expiration in 49 days if no further activity occurs. (find out why)

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Incomplete
Undecided
Unassigned

Bug Description

Hi,

I am using the juju client version 3.5.3:

$ juju version
3.5.3-genericlinux-amd64

I am not able to get the files from the unit by using "juju scp":

$ juju ssh kafka/0 -- sudo ls -l /home/ubuntu/creds
total 16
-rw-r----- 1 ubuntu ubuntu 399 Aug 13 11:48 zk-client.properties
-rw-r----- 1 ubuntu ubuntu 3966 Aug 13 11:48 zk-ks.jks
-rw-r----- 1 ubuntu ubuntu 4246 Aug 13 11:48 zk-ts.jks
Connection to 10.149.16.120 closed.

Below is not working:

juju scp -- -r kafka/0:/home/ubuntu/creds .

It is also not working when I try to copy one of the files:

juju scp kafka/0:/home/ubuntu/creds/zk-client.properties .

When I run with "--debug" I have the following output:

$ juju --debug scp kafka/0:/home/ubuntu/creds/zk-client.properties .
12:10:09 INFO juju.cmd supercommand.go:56 running juju [3.5.3 63d460f9ee6c7c710131961390687e7a0ab90470 gc go1.21.12]
12:10:09 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/28060/bin/juju", "--debug", "scp", "kafka/0:/home/ubuntu/creds/zk-client.properties", "."}
12:10:09 INFO juju.juju api.go:86 connecting to API addresses: [10.149.16.38:17070 252.76.0.1:17070]
12:10:09 DEBUG juju.api apiclient.go:1094 successfully dialed "wss://10.149.16.38:17070/model/e6ee400d-fe81-43bd-85c1-85d2e04e74b0/api"
12:10:09 INFO juju.api apiclient.go:629 connection established to "wss://10.149.16.38:17070/model/e6ee400d-fe81-43bd-85c1-85d2e04e74b0/api"
12:10:09 DEBUG juju.cmd.juju.ssh ssh_machine.go:345 proxy-ssh is false
12:10:09 DEBUG juju.network.ssh reachable.go:156 dialing 252.240.0.1:22 to check host keys
12:10:09 DEBUG juju.network.ssh reachable.go:156 dialing 10.149.16.120:22 to check host keys
12:10:09 DEBUG juju.network.ssh reachable.go:169 connected to 10.149.16.120:22, initiating ssh handshake
12:10:09 DEBUG juju.network.ssh reachable.go:98 accepted host key for: 10.149.16.120:22
12:10:09 INFO juju.network.ssh reachable.go:223 found 10.149.16.120:22 has an acceptable ssh key
12:10:09 DEBUG juju.cmd.juju.ssh ssh_machine.go:495 using target "kafka/0" address "10.149.16.120"
12:10:09 DEBUG juju.utils.ssh ssh.go:311 using OpenSSH ssh client
12:10:09 DEBUG juju.api monitor.go:35 RPC connection died
12:10:09 INFO cmd supercommand.go:556 command finished

Regards,
Ebrar

Revision history for this message
Joseph Phillips (manadart) wrote :

What is the directory that you are copying the files into? Does it work if you are in your own home directory?

Snap confinement might deny access to where you are running the command from.

Changed in juju:
status: New → Incomplete
Revision history for this message
Ebrar Leblebici (birru2) wrote :

No, I tried that in my home directory and it did not work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.