Giter VIP home page Giter VIP logo

proxmox-qdevice's People

Contributors

bcleonard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

proxmox-qdevice's Issues

not working on ARM

Hi, thanks for your Docker. Am I right that it does not work on ARM? I'm currently trying to get the Docker to run on my QNAP.

failed to deploy a stack: Network proxmox-q_default Creating Network proxmox-q_default Created Container proxmox-q Creating qnetd The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested Container proxmox-q Created Container proxmox-q Starting Error response from daemon: driver failed programming external connectivity on endpoint proxmox-q (2eb63c01ddffa45564ce874ea819afc6c0c08c3db28beaaeab7794cd3adb8f3c): listen tcp4 0.0.0.0:22: bind: address already in use

best wishes Patrick

add wiki

Add a basic wiki to answer questions and repopulate some answers.

Does this container have to lock up port 22?

Specifically, is there a way to bind the 22 inside the container to something else outside the container? The reason is that I don't want to lock away port 22 as that's (obviously) used for SSH, so if this service binds to it I imagine OpenSSH will stop working. 5403 is fine as I'm not really using that.

And for the network setup, does it have to be a macvlan? I ask because the device I'm going to run this on flips to wifi sometimes if the ethernet is disrupted, so I'd want to continue the service when that happens.

corosync-qnetd entered FATAL state / sshd terminated by SIGABRT (core dumped)

I'm trying to run the container on a (x86) Synology NAS, but neither the corosync-qnetd does come up, nor the ssh server seems to run properly:

When booting the container, supervisord tries to run corosync-qnetd a couple of times and is eventually giving up. This is the container's log after starting the container:

2024-04-03 16:31:34,650 INFO Set uid to user 0 succeeded
2024-04-03 16:31:34,658 INFO supervisord started with pid 1
2024-04-03 16:31:35,662 INFO spawned: 'set_root_password' with pid 8
2024-04-03 16:31:35,667 INFO spawned: 'corosync-qnetd' with pid 9
2024-04-03 16:31:35,671 INFO spawned: 'sshd' with pid 10
2024-04-03 16:31:35,702 INFO success: set_root_password entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-04-03 16:31:36,638 INFO exited: set_root_password (exit status 0; expected)
2024-04-03 16:31:36,638 WARN exited: corosync-qnetd (exit status 1; not expected)
2024-04-03 16:31:37,643 INFO spawned: 'corosync-qnetd' with pid 15
2024-04-03 16:31:37,644 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-03 16:31:37,657 WARN exited: corosync-qnetd (exit status 1; not expected)
2024-04-03 16:31:39,662 INFO spawned: 'corosync-qnetd' with pid 16
2024-04-03 16:31:39,676 WARN exited: corosync-qnetd (exit status 1; not expected)
2024-04-03 16:31:42,683 INFO spawned: 'corosync-qnetd' with pid 17
2024-04-03 16:31:42,697 WARN exited: corosync-qnetd (exit status 1; not expected)
2024-04-03 16:31:42,698 INFO gave up: corosync-qnetd entered FATAL state, too many start retries too quickly

Also, sshd seems to crash on every connection attempt and get's restarted by supervisord. This is the connection attempt with a ssh client in verbose mode:

# ssh -v [email protected]
OpenSSH_9.2p1 Debian-2+deb12u2, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.4.12 [192.168.4.12] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.4.12:22 as 'root'
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.4.12 port 22

And this is the output from the container's supervisord:

2024-04-03 16:33:59,843 INFO reaped unknown pid 27 (terminated by SIGABRT (core dumped))

When trying to start corosync-qnetd inside the container, I get an error message:

# docker exec -it proxmox-qdevice bash
root@proxmox-qdevice:/# /usr/bin/corosync-qnetd -f
Apr 03 16:35:14 error   Can't open NSS DB directory (2): No such file or directory

This is the docker-compose.yaml I'm using:

services:
  qnetd:
    container_name: proxmox-qdevice
    image: bcleonard/proxmox-qdevice
    build: .
    ports:
      - "22:22"
      - "5403:5403"
    environment:
      - "NEW_ROOT_PASSWORD=xxx"
    volumes:
      - /run/sshd
      - /volume1/docker/proxmox-qdevice/etc-corosync:/etc/corosync
    restart: unless-stopped
    hostname: proxmox-qdevice
    networks:
      vlan:
        ipv4_address: 192.168.4.12

networks:
 vlan:
    driver: macvlan
    driver_opts:
      parent: eth0
      macvlan_mode: bridge
    ipam:
      config:
        - subnet: "192.168.4.0/24"
          ip_range: "192.168.4.12/32"
          gateway: "192.168.4.254"

Maybe I'm just missing something obvious, f.e. missing file/folder permissions, but the Readme doesn't mention anything in this direction.

[BUG] Connection Reset

Describe the bug
I eventually got the networking setup so the container connects to my network directly. but now I can't ssh to it, and this adding it to the cluster doesn't work.

I just get "Connection reset by 192.168.1.110 port 22"

Running in verbose mode I get this:

PS C:\Users\chris> ssh -v [email protected]
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 192.168.1.110 [192.168.1.110] port 22.
debug1: Connection established.
debug1: identity file C:\Users\chris/.ssh/id_rsa type 0
debug1: identity file C:\Users\chris/.ssh/id_rsa-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_dsa type -1
debug1: identity file C:\Users\chris/.ssh/id_dsa-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_ecdsa type -1
debug1: identity file C:\Users\chris/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\Users\chris/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_ed25519 type -1
debug1: identity file C:\Users\chris/.ssh/id_ed25519-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_ed25519_sk type -1
debug1: identity file C:\Users\chris/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\Users\chris/.ssh/id_xmss type -1
debug1: identity file C:\Users\chris/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.110:22 as 'root'
debug1: load_hostkeys: fopen C:\Users\chris/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.1.110 port 22

I use SSH on my PC every day so not sure why this is failing.

To Reproduce
my compose yaml

services:
qnetd:
container_name: proxmox-qdevice
image: bcleonard/proxmox-qdevice
build: .
ports:
- "22:22"
- "5403:5403"
environment:
- "NEW_ROOT_PASSWORD=password"
volumes:
- /run/sshd
- /volume1/docker/corosync:/etc/corosync
restart: unless-stopped
hostname: pve-qdevice
networks:
vlan:
ipv4_address: 192.168.1.110

networks:
vlan:
driver: macvlan
driver_opts:
parent: ovs_bond0
ipam:
driver: default
config:
- subnet: "192.168.1.0/24"
ip_range: "192.168.1.110/32"
gateway: "192.168.1.254"

Expected behavior
ssh to connect. Corosync to join cluster

host server (please complete the following information):

  • OS: Synology NAS
  • architecture x86
  • Version DSM 7.1.1-42962 Update 6

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.