sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
785 stars 368 forks source link

Docker - Centos - daemon: command not found #1760

Closed beshoo closed 10 months ago

beshoo commented 10 months ago

Dear all, Am not sure if this is the correct place to ask for this. am inside a docker under centos 7

Am installing a tool called (https://goautodial.org/)

and one of the requirements is : ngcp-rtpengine ngcp-rtpengine-kernel ngcp-rtpengine-dkms and I installed them via YUM

  Installing : ngcp-rtpengine-dkms-6.4.0.0-1.el7.noarch                                                                                               54/145

Creating symlink /var/lib/dkms/ngcp-rtpengine/6.4.0.0-1.el7/source ->
                 /usr/src/ngcp-rtpengine-6.4.0.0-1.el7

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.15.0-15-lowlatency cannot be found at
/lib/modules/4.15.0-15-lowlatency/build or /lib/modules/4.15.0-15-lowlatency/source.

I have starting problem:

systemctl start ngcp-rtpengine.service
Job for ngcp-rtpengine.service failed because the control process exited with error code. See "systemctl status ngcp-rtpengine.service" and "journalctl -xe" for details.

[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]systemctl status ngcp-rtpengine.service
● ngcp-rtpengine.service - LSB: NGCP rtpengine
   Loaded: loaded (/etc/rc.d/init.d/ngcp-rtpengine; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2023-11-23 02:32:07 UTC; 32s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3801 ExecStart=/etc/rc.d/init.d/ngcp-rtpengine start (code=exited, status=127)

Nov 23 02:32:06 4cc2344b217b ngcp-rtpengine[3801]: Loading module for in-kernel packet forwarding
Nov 23 02:32:07 4cc2344b217b ngcp-rtpengine[3801]: iptables: Chain already exists.
Nov 23 02:32:07 4cc2344b217b ngcp-rtpengine[3801]: iptables: No chain/target/match by that name.
Nov 23 02:32:07 4cc2344b217b ngcp-rtpengine[3801]: ip6tables: Chain already exists.
Nov 23 02:32:07 4cc2344b217b ngcp-rtpengine[3801]: ip6tables: No chain/target/match by that name.
Nov 23 02:32:07 4cc2344b217b ngcp-rtpengine[3801]: Starting rtpengine: /etc/rc.d/init.d/ngcp-rtpengine: line 189: daemon: command not found
Nov 23 02:32:07 4cc2344b217b systemd[1]: ngcp-rtpengine.service: control process exited, code=exited status=127
Nov 23 02:32:07 4cc2344b217b systemd[1]: Failed to start LSB: NGCP rtpengine.
Nov 23 02:32:07 4cc2344b217b systemd[1]: Unit ngcp-rtpengine.service entered failed state.
Nov 23 02:32:07 4cc2344b217b systemd[1]: ngcp-rtpengine.service failed.
[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]

I tried to Recompile the kernel module:

cd /usr/src/ngcp-rtpengine-6.4.0.0-1.el7/
make
make install
[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]make
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Needed a single revision
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Needed a single revision
make -C /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build M=/usr/src/ngcp-rtpengine-6.4.0.0-1.el7 O=/lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build modules
make: *** /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build: No such file or directory.  Stop.
make: *** [modules] Error 2
[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]make install
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Needed a single revision
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Needed a single revision
make: Nothing to be done for `install'.
[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]

And if I run

[===Docker===]root:[/usr/src/ngcp-rtpengine-6.4.0.0-1.el7]rtpengine
[1700706956.576694] ERR: FAILED TO CREATE KERNEL TABLE 0 (No such file or directory), KERNEL FORWARDING DISABLED

Please Advice

zenichev commented 10 months ago

It seems you have issues with kmod-lve on that docker instance, isn't it?

make -C /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build M=/usr/src/ngcp-rtpengine-6.4.0.0-1.el7 O=/lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build modules
make: *** /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build: No such file or directory.  Stop.
make: *** [modules] Error 2

Make sure you have the necessary kernel headers installed.

beshoo commented 10 months ago

That's the problem, and am not sure what should I do...

Is it something to install in docker container, or on the main host?

And what is this kernel header, please guide me?

Regard

On Thu, Nov 23, 2023, 1:23 PM Donat Zenichev @.***> wrote:

It seems you have issues with kmod-lve on that docker instance, isn't it?

make -C /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build M=/usr/src/ngcp-rtpengine-6.4.0.0-1.el7 O=/lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build modules make: /lib/modules/3.10.0-962.3.2.lve1.5.66.el7.x86_64/build: No such file or directory. Stop. make: [modules] Error 2

Make sure you have the necessary kernel headers installed.

— Reply to this email directly, view it on GitHub https://github.com/sipwise/rtpengine/issues/1760#issuecomment-1824135865, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT22FRNQL5QEU353F47TYF4PZ7AVCNFSM6AAAAAA7XDN47OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUGEZTKOBWGU . You are receiving this because you authored the thread.Message ID: @.***>

zenichev commented 10 months ago

Sorry, we don't support docker related issues here. I doubt it's related to the rtpengine software itself. So unless we see any sign it has to do with the rtpengine itself, I cannot help here much.

I suggest you to get in touch with the team administrating your docker machines, in order to take care of upgrading/fixing that mentioned kernel issue.

beshoo commented 10 months ago

Hello @zenichev,

Thank you so much for your kind reply. I'm not sure if ngcp-rtpengine-dkms is supported by CentOS7 at first place, and I have a reason for saying that.

I checked https://answers.launchpad.net/ubuntu/bionic/i386/linux-tools-4.15.0-15-lowlatency/4.15.0-15.16, It appears that the ngcp-rtpengine-dkms is supported for Ubuntu OS, but not for CentOS, Am not sure.

but based on the yum installation error, and received the following message:

Error! echo Your kernel headers for kernel 4.15.0-15-lowlatency cannot be found at /lib/modules/4.15.0-15-lowlatency/build or /lib/modules/4.15.0-15-lowlatency/source.

However, my kernel host has no problem and is up-to-date with the latest version which is:

uname -r
3.10.0-962.3.2.lve1.5.82.el7.x86_64

Based on the information above, I would like to know why I keep getting this error when installing ngcp-rtpengine-dkms.

Thank you.