GithubHelp home page GithubHelp logo

SSH is not working about dhyve HOT 22 CLOSED

nlf avatar nlf commented on August 25, 2024
SSH is not working

from dhyve.

Comments (22)

nlf avatar nlf commented on August 25, 2024

@stongo has been experiencing a similar problem, we're still trying to figure out why

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

me also

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

It looks like /etc/resolv.conf isn't getting generated correctly:

# cat /etc/resolv.conf 
nameserver 192.168.64.1 # eth0
# ifconfig 
docker0   Link encap:Ethernet  HWaddr 02:42:20:53:D7:58  
          inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr DE:F4:CF:47:CF:32  
          inet addr:192.168.64.3  Bcast:192.168.64.255  Mask:255.255.255.0
          inet6 addr: fe80::dcf4:cfff:fe47:cf32/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9043 (8.8 KiB)  TX bytes:4168 (4.0 KiB)

However, editing it and saving it (either to 192.168.64.3 or something like 8.8.8.8, which seems to work better from the prompt) doesn't seem to save the image.

When the image is being run directly with xhyve and the resolv.conf ip is 8.8.8.8 I can docker pull stuff, but i still can't ssh in. docker commands that require external access don't work with either 192.169.64.1 or .3.

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

Additionally, the dropbear config(?) is a dead link (to /var/run/dropbear), with no config apparent elsewhere on the file system. If you make that directory, you get to the password prompt, but you can't log in, because /home/docker/.ssh/ is also not present, and I don't know the password. If you change the password, it works. Maybe something is busted in the build script for the dhyveos image?

from dhyve.

nlf avatar nlf commented on August 25, 2024

wait.. so your /etc/dropbear directory is a link to /var/run/dropbear? that's very definitely wrong. password for the docker user is docker. it's very strange that the .ssh directory isn't present.. i'll check it out further and see if i can figure out what's going on.

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024
# ls -l /etc/dropbear 
lrwxrwxrwx    1 root     root            19 Aug 24 21:45 /etc/dropbear -> ../var/run/dropbear
# ls /var/run/
acpid.pid        docker.pid       klogd.pid        syslogd.pid
acpid.socket     docker.sock      network          udhcpc.eth0.pid
crond.pid        dropbear.pid     rpcbind.lock     utmp
docker           ifstate          rpcbind.sock
# ls -la /home/docker/
total 0
drwxr-xr-x    2 docker   docker          40 Aug 24 22:00 .
drwxr-xr-x    4 root     root            80 Aug 24 22:00 ..
#

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

fwiw:

md5 bzImage rootfs.cpio.xz
MD5 (bzImage) = eadc6ad46d54d1f335a18c96a39d32b2
MD5 (rootfs.cpio.xz) = 97ccb2bf02eafa405fe851de84fe414c

version is 1.3.0. I meant to try out v1.2.0, but I haven't had the time yet.

from dhyve.

marcbachmann avatar marcbachmann commented on August 25, 2024

I just checked that. ssh is working in v1.2.0

from dhyve.

nlf avatar nlf commented on August 25, 2024

Interesting. I'll check it out and see if I can figure out what happened between the versions

from dhyve.

tt avatar tt commented on August 25, 2024

I have the same problem. I fixed it by running mkdir /var/run/dropbear.

In the image, /etc/init.d/S50dropbear contains the condition "$(readlink -f /etc/dropbear)" = "/var/run/dropbear". However, /etc/dropbear points to ../var/run/dropbear.

The upstream bug was introduced in buildroot@e7d04dd and fixed in buildroot@29a0f05

It seems the bug was never part of an official release so basing the build on those rather than on snapshots would probably help.

from dhyve.

fab-soundcloud avatar fab-soundcloud commented on August 25, 2024

I am not so experienced with this. Is there a workaround with the current version of dhyve? If yes, how can I apply it? What are the steps. Thanks!

from dhyve.

nlf avatar nlf commented on August 25, 2024

I'll upload an experimental build right now that you can test to make sure I fixed it correctly

from dhyve.

nlf avatar nlf commented on August 25, 2024

Ok, just uploaded dhyve-os version 1.3.1. If you build a new dhyve vm it should pull that latest version. Please report back your results.

from dhyve.

marcbachmann avatar marcbachmann commented on August 25, 2024

Thanks. It's working now. Great work.

from dhyve.

nlf avatar nlf commented on August 25, 2024

@evanmcc does this new build of dhyve-os resolve your issue too?

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

Kinda. If I manually launch the VM I can ssh in and use docker stuff, but dhyve up hangs forever after booting the VM. I don't have the time to look into it just now, but I'm satisfied that my other issues aren't related to this one.

from dhyve.

evanmcc avatar evanmcc commented on August 25, 2024

the backticks in this line https://github.com/nlf/dhyve/blob/master/dhyve#L313 cause dhyve up and dhyve down to be executed. This is what's causing the hang I mentioned earlier. Also restarting the VM as instructed does nothing to fix the issue. I'll dig into why set_exports is failing sometime next week.

from dhyve.

fkoehler avatar fkoehler commented on August 25, 2024

I did a

dhyve down
dhyve destroy

Then I did a dhyve init followed by a dhyve up

The dhyve up shows:

[dhyve] starting....done

but it never exists. It is sort of hanging there.

When I do dhyve status in another terminal window the vm switches between "stopped" and "runnging" state. I can ssh into it, but only if it is in running state. After a short while the connection to the vm is broken (maybe because it is stopped) and it is broken.

I am confused

from dhyve.

fkoehler avatar fkoehler commented on August 25, 2024

Also when I ssh into it (after it has pulled the 1.3.1 image on init) it still says:

DhyveOS version 1.3.0, build master : a7197ee

from dhyve.

fkoehler avatar fkoehler commented on August 25, 2024

Oh, I see. When I CTRL+C out of the "[dhyve] starting....done" it keeps running and it seems to stay up normally, meaning I can use it regularly and I can ssh into it.

from dhyve.

marcbachmann avatar marcbachmann commented on August 25, 2024

Works with the newest dhyve-os version.

from dhyve.

marcbachmann avatar marcbachmann commented on August 25, 2024

Please create an issue for the other things, if you still have a problem.

from dhyve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.