croc icon indicating copy to clipboard operation
croc copied to clipboard

[Bug] error when self hosting a relay server using docker

Open TTTPOB opened this issue 2 years ago • 3 comments

Describe the bug

cannot receive file when using self hosted server using docker

To Reproduce

Steps to reproduce the behavior:

  1. I ran a relay server by
#!/bin/bash
docker run -d \
    -p 9009-9013:9009-9013 \
    --restart unless-stopped \
    --name croc_relay \
    -e CROC_PASS='PASS' \
    schollz/croc

I've checked the router port forwarding, it has been set correctly 2. send a file by croc --relay ${the_host} send ${thefile} 3. on another machine run CROC_PASS=PASS croc --debug --relay ${the_host} ${the_code}

Expected behaviour

<-- A clear and concise description of what you expected to happen. -->

Version

<-- Check "croc -v" and report it --> croc version v9.4.2-49f50a5

Additional context

<-- Add any other context about the problem here. -->

log

[debug] 19:24:55 cli.go:163: debug mode on
[debug] 19:24:55 croc.go:169: options: {IsSender:false SharedSecret:7448-guest-tactic-caramel Debug:true RelayAddress:${the_host} RelayAddress6: RelayPorts:[] RelayPassword:thu_conda_kernel_ Stdout:false NoPrompt:false NoMultiplexing:false DisableLocal:false OnlyLocal:false IgnoreStdin:false Ask:false SendingText:false NoCompress:false IP: Overwrite:false Curve:siec HashAlgorithm:}
connecting...[debug]    19:24:55 croc.go:528: attempt to discover peers
[debug] 19:24:56 croc.go:593: discoveries: []
[debug] 19:24:56 croc.go:594: establishing connection
[debug] 19:24:56 croc.go:610: got host '${the_host}' and port '9009'
[debug] 19:24:56 croc.go:612: trying connection to ${the_host}:9009
[debug] 19:24:56 comm.go:55: dialing to ${the_host}:9009 with timelimit 5s
[debug] 19:24:56 comm.go:64: connected to '${the_host}:9009'
[debug] 19:24:56 tcp.go:476: strong key: b0c88691bf69ba573450fd7bee0fa37be0eb37b5e36bd59c5865e930514adf87
[debug] 19:24:56 tcp.go:490: sending password
[debug] 19:24:56 tcp.go:501: waiting for first ok
[debug] 19:24:56 tcp.go:519: sending room
[debug] 19:24:56 tcp.go:530: waiting for room confirmation
[debug] 19:24:56 tcp.go:546: all set
[debug] 19:24:56 croc.go:625: receiver connection established: &{connection:0xc000244018}
[debug] 19:24:56 croc.go:626: banner: 9010,9011,9012,9013
[debug] 19:24:56 croc.go:631: sending ips?
[debug] 19:24:56 croc.go:640: ips data:
[debug] 19:24:56 croc.go:643: ips unmarshal error: invalid character '\x01' looking for beginning of value
[debug] 19:24:56 croc.go:694: exchanged header message
securing channel...[debug]      19:24:56 croc.go:712: ready
[debug] 19:24:56 message.go:61: writing pake message (unencrypted)
[debug] 19:24:57 compress.go:50: error copying data: unexpected EOF
[debug] 19:24:57 croc.go:972: problem with decoding: unexpected end of JSON input
[debug] 19:24:57 croc.go:738: got error processing: problem with decoding: unexpected end of JSON input
[debug] 19:24:57 croc.go:774: error: problem with decoding: unexpected end of JSON input
2021/10/05 19:24:57 room not ready

TTTPOB avatar Oct 05 '21 11:10 TTTPOB

fyi, there is no problem when i use public server

TTTPOB avatar Oct 05 '21 11:10 TTTPOB

Not sure if this is helpful. on machine 1: i start the relay with: croc -relay again on machine1: I use another croc process to send e.g: croc send -c passphrase contents/ on mauchine2: croc -yes passphrase

hth

stepht avatar Oct 05 '21 18:10 stepht

Not sure if this is helpful. on machine 1: i start the relay with: croc -relay again on machine1: I use another croc process to send e.g: croc send -c passphrase contents/ on mauchine2: croc -yes passphrase

hth

update: running relay server without docker and passphrase worked, but I will keep this issue

TTTPOB avatar Oct 06 '21 08:10 TTTPOB

Stale issue message

github-actions[bot] avatar Mar 03 '24 12:03 github-actions[bot]