Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install new debian 12 virtual machine minimal install #562

Open
arsenieciprian opened this issue Mar 13, 2024 · 9 comments
Open
Labels
0.75 Release bug This issue is a BUG code committed Code has been Committed for this Issue

Comments

@arsenieciprian
Copy link

root@sbc-b1:/opt/dsiprouter# ./dsiprouter.sh install -all
dsip-init service already exists
dSIPRouter CLI is already installed
SipSak is already installed
cron is already installed
Attempting to install DNSmasq...
Created symlink /etc/systemd/system/dnsmasq.service → /dev/null.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dnsmasq is already the newest version (2.89-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Removed "/etc/systemd/system/dnsmasq.service".
Synchronizing state of dnsmasq.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable dnsmasq
Failed to restart systemd-resolved.service: Unit systemd-resolved.service not found.
failed loading new systemd network configurations..
reverting network changes and aborting dnsmasq install
Failed to restart systemd-resolved.service: Unit systemd-resolved.service not found.
DNSmasq install failed - OS install script failure
root@sbc-b1:/opt/dsiprouter# uname -a
Linux sbc-b1 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
root@sbc-b1:/opt/dsiprouter#

@arsenieciprian arsenieciprian added bug This issue is a BUG needs validation labels Mar 13, 2024
@devopsec
Copy link
Member

this should be fixed in 8bd9611

@devopsec devopsec removed the bug This issue is a BUG label Mar 28, 2024
@arsenieciprian
Copy link
Author

it does not work . same issue installing on clean debian

@Bifur1
Copy link

Bifur1 commented Apr 19, 2024

There are still issues with debian 12 using netinstaller.

Before install: install systemd-resolved and dnsmasq (testing) first.

./dsiprouter install

Goes through checks and gets hung here:

Attempting to install DNSmasq...
Created symlink /etc/systemd/system/dnsmasq.service → /dev/null.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dnsmasq is already the newest version (2.89-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Removed "/etc/systemd/system/dnsmasq.service".
Synchronizing state of dnsmasq.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable dnsmasq

Reboot server and run dsiprouter install. It finishes. Go to https://test.domain:5000 and get a 502 Bad Gateway response.

Look at nginx logs and it can't find the *.sock files. Look at /run/dsiprouter/ and it is empty.

systemctl status dsiprouer:

× dsiprouter.service - dSIPRouter Service
Loaded: loaded (/lib/systemd/system/dsiprouter.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-04-19 15:41:25 EDT; 11s ago
Duration: 608ms
Process: 17532 ExecStartPre=/usr/bin/dsiprouter chown -dsiprouter (code=exited, status=0/SUCCESS)
Process: 17553 ExecStart=/usr/bin/dsiprouter exec (code=exited, status=1/FAILURE)
Main PID: 17553 (code=exited, status=1/FAILURE)
CPU: 628ms

Apr 19 15:41:25 test.domain.com systemd[1]: dsiprouter.service: Scheduled restart job, restart counter is at 5.
Apr 19 15:41:25 test.domain.com systemd[1]: Stopped dsiprouter.service - dSIPRouter Service.
Apr 19 15:41:25 test.domain.com systemd[1]: dsiprouter.service: Start request repeated too quickly.
Apr 19 15:41:25 test.domain.com systemd[1]: dsiprouter.service: Failed with result 'exit-code'.
Apr 19 15:41:25 test.domain.com systemd[1]: Failed to start dsiprouter.service - dSIPRouter Service.

@arsenieciprian
Copy link
Author

arsenieciprian commented Apr 21, 2024

the issue persist but as observation the install stop after changing ip address of machine to dhcp . The machine have static ip but somehow the dnsmasq requests dhcp to router and change ip adress and after that ssh disconects and thats it

make[1]: Leaving directory '/usr/local/src/sipsak'
SipSak was installed
Attempting to install cron
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cron is already the newest version (3.0pl1-162).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
cron was installed
Attempting to install DNSmasq...
Unit dnsmasq.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/dnsmasq.service → /dev/null.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
dns-root-data dnsmasq-base libnetfilter-conntrack3 libnfnetlink0
Suggested packages:
resolvconf
The following NEW packages will be installed:
dns-root-data dnsmasq dnsmasq-base libnetfilter-conntrack3 libnfnetlink0
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 593 kB of archives.
After this operation, 1,455 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian bookworm/main amd64 dns-root-data all 2023010101 [4,124 B]
Get:2 https://deb.debian.org/debian bookworm/main amd64 libnfnetlink0 amd64 1.0.2-2 [15.1 kB]
Get:3 https://deb.debian.org/debian bookworm/main amd64 libnetfilter-conntrack3 amd64 1.0.9-3 [40.7 kB]
Get:4 https://deb.debian.org/debian bookworm/main amd64 dnsmasq-base amd64 2.89-1 [501 kB]
Get:5 https://deb.debian.org/debian bookworm/main amd64 dnsmasq all 2.89-1 [32.4 kB]
Fetched 593 kB in 0s (1,538 kB/s)
Selecting previously unselected package dns-root-data.
(Reading database ... 38155 files and directories currently installed.)
Preparing to unpack .../dns-root-data_2023010101_all.deb ...
Unpacking dns-root-data (2023010101) ...
Selecting previously unselected package libnfnetlink0:amd64.
Preparing to unpack .../libnfnetlink0_1.0.2-2_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.2-2) ...
Selecting previously unselected package libnetfilter-conntrack3:amd64.
Preparing to unpack .../libnetfilter-conntrack3_1.0.9-3_amd64.deb ...
Unpacking libnetfilter-conntrack3:amd64 (1.0.9-3) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../dnsmasq-base_2.89-1_amd64.deb ...
Unpacking dnsmasq-base (2.89-1) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../dnsmasq_2.89-1_all.deb ...
Unpacking dnsmasq (2.89-1) ...
Setting up dns-root-data (2023010101) ...
Setting up libnfnetlink0:amd64 (1.0.2-2) ...
Setting up libnetfilter-conntrack3:amd64 (1.0.9-3) ...
Setting up dnsmasq-base (2.89-1) ...
Setting up dnsmasq (2.89-1) ...
Failed to preset unit, unit /etc/systemd/system/dnsmasq.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on dnsmasq.service: No such file or directory
Processing triggers for libc-bin (2.36-9+deb12u4) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
Removed "/etc/systemd/system/dnsmasq.service".
Synchronizing state of dnsmasq.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable dnsmasq
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
client_loop: send disconnect: Broken pipe
ciprian@Ciprians-MacBook-Pro ~ %

@devopsec
Copy link
Member

Fixed in 9e9daed on v0.75 branch

Just tested this with Debian12 NetIso on virtualbox.

su -
apt install -y git
git clone -b v0.75 https://github.com/dOpensource/dsiprouter.git /opt/dsiprouter
/opt/dsiprouter/dsiprouter.sh install -all

@devopsec devopsec added bug This issue is a BUG code committed Code has been Committed for this Issue 0.75 Release and removed needs validation labels Apr 22, 2024
@devopsec devopsec moved this to Done in v0.75 Release Apr 22, 2024
@arsenieciprian
Copy link
Author

arsenieciprian commented Apr 23, 2024 via email

@devopsec
Copy link
Member

@arsenieciprian That looks like a separate issue. Looks like your network connection caused git to fail cloning a dependency repo.

Since we do have extensive git dependencies in the install scripts that may be something to look into (try / timeouts for git commands in the install scripts).
Something like this:

tryGit() {
    local TIMEOUT=5

    timeout "TIMEOUT" bash <<EOF 2>/dev/null
while true; do
    git "$@" && break
    sleep 1
done
EOF
    return $?
}

tryGit https://github.com/benmcollins/libjwt.git /usr/local/src/libjwt

Not sure if any other users are running into issues with install scripts due to network stability issues though..
If others are experiencing this as well then we can look further into it..

@NNYGitHub
Copy link

the issue persist but as observation the install stop after changing ip address of machine to dhcp . The machine have static ip but somehow the dnsmasq requests dhcp to router and change ip adress and after that ssh disconects and thats it

You have to define the static ip using systemd-networkd in /etc/systemd/network starting with a number below 99 (for instance: 11-wan.network ) - then the installation works.

@devopsec
Copy link
Member

@NNYGitHub has a good point here, we can not support every legacy network configuration on the newer network stack, otherwise we would have too many use cases and the complexity would be too high..
We are sticking with the upstream's network stack (debian) as defined in their flagship ISO (full dvd install).
So when you are installing on a different ISO (such as net installer) expect the same network stack as the DVD ISO to be installed, i.e. for Debian 12 that would be systemd-resolved/libnss-resolve.
If the ISO you are deploying on is a fork of the upstream ISO (such as a cloud provider's VM image) it may contain a different default stack, which will be replaced by the standard network stack from the upstream OS maintainers.

I hope that explanation helps.

Do note that when GNOME is installed in the calamares installer or via package manager network-manager is also installed.
This integration in particular is handled by giving priority to the network resolver instead of network-manager.
If you find a better way to integrate with network-manager I am all ears, but we are trying to reduce complexity, not increase it.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.75 Release bug This issue is a BUG code committed Code has been Committed for this Issue
Projects
Status: Done
Development

No branches or pull requests

4 participants