cswindle / caesium

MIT License
23 stars 4 forks source link

Did not listen any port after start #1

Closed boskiv closed 6 years ago

boskiv commented 6 years ago
[registry]
index = "git@gitlab.xxxxxxxxxx:cargo/registry.git"

[storage.artifactory]
base_url = "https://artifactory.xxxxxxx/artifactory/cargo-registry"
api_key = "xxxxxxxx"

[server]
port = 3000

Then run ./caesium

root@93d08e9f8658:/code/target/release# RUST_LOG=TRACE ./caesium

It just. show me empty output.

I dont see

 println!("Listening on http://{} with 1 thread.", server.local_addr().unwrap());

But ss command shows that no 3000 port listen.

root@93d08e9f8658:/# ss -an
Netid State      Recv-Q Send-Q                   Local Address:Port                                  Peer Address:Port
nl    UNCONN     0      0                                    0:0                                                 *
nl    UNCONN     0      0                                    0:3209                                              *
nl    UNCONN     4352   0                                    4:4769                                              *
nl    UNCONN     768    0                                    4:0                                                 *
nl    UNCONN     0      0                                    6:0                                                 *
nl    UNCONN     0      0                                   10:0                                                 *
nl    UNCONN     0      0                                   12:0                                                 *
nl    UNCONN     0      0                                   15:0                                                 *
nl    UNCONN     0      0                                   16:0                                                 *
u_str LISTEN     0      128    /tmp/ssh-j0gxU0KewVmf/agent.4625 1167656                                          * 0
boskiv commented 6 years ago

After I create an ssh key and add to agent i've got an error

root@93d08e9f8658:/code/target/release# RUST_LOG=TRACE ./caesium
thread 'main' panicked at 'failed to clone: failed to mmap. Could not write data: Invalid argument; class=Os (2)', src/registry.rs:133:23
note: Run with `RUST_BACKTRACE=1` for a backtrace.
root@93d08e9f8658:/code/target/release# ls -al
boskiv commented 6 years ago

Git repo clones manually:

root@93d08e9f8658:/code/target/release# git clone git@gitlab.xxxxxx:cargo/registry.git
Cloning into 'registry'...
The authenticity of host 'gitlab.xxxxx (10.128.2.224)' can't be established.
ECDSA key fingerprint is SHA256:bMwAtPwCo2r+4xXuOsTM0HRkzVV8OxkTDvJdbWdFfT4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxxxx,10.128.2.224' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
boskiv commented 6 years ago

Ok, when I compiled and run it locally, not from docker with volume mounted, it run.