Inquiry about “Can't create KTPd session” error on klish 3.1.0

51 views
Skip to first unread message

tran tan

unread,
Mar 15, 2025, 2:56:49 AMMar 15
to klish
Hello,
First of all, thank you for developing and maintaining the klish project. I recently installed version 3.1.0 of klish (downloaded from src.libcode.org/pkun/klish) on my Ubuntu system. After building and installing it (./configure, make, make install), I encountered the following error when running klishd and klish:
"""
klishd-listen: Service process for client was forked: <PID>
klishd[<PID>]: Can't create KTPd session
klishd[<PID>]: Close connection 6
klishd-listen: Service process <PID> was terminated: 255
"""

Here are some specifics:

  1. Operating System: Ubuntu 20.04 (64-bit).
  2. klishd and klish were both installed at version 3.1.0, placed under /usr/bin/.
  3. The configuration files /etc/klish/klishd.conf and /etc/klish/klish.conf both point to the same Unix socket /tmp/klish-unix-socket.
  4. I have tried removing the old socket file, restarting the daemon, but I still receive the “Can't create KTPd session” error. I have also verified the socket permissions, and I run both klish and klishd as root.

I suspect there may be a version conflict, but after removing the old klish package and confirming that which klish and which klishd both return /usr/bin/klish and /usr/bin/klishd for version 3.1.0, the issue remains.

I’m wondering if you have any additional suggestions or specific integration steps to fix this issue, or if there’s something that needs to be configured differently during the build process. I’d greatly appreciate any insights or assistance so that I can proceed with my klish setup.

Thank you very much, and I look forward to your response.

Best regards,


Serj Kalichev

unread,
Mar 17, 2025, 4:57:31 AMMar 17
to kl...@googlegroups.com
Hello

Probably you have not any XML config files and so daemon has no appropriate configuration to start.

Try to start it by "klishd -d -v". It means to don't daemonize and be verbose. May be it will report the problem.

15.03.2025 09:56, tran tan пишет:
--
You received this message because you are subscribed to the Google Groups "klish" group.
To unsubscribe from this group and stop receiving emails from it, send an email to klish+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/klish/f6a61856-7c91-49b7-9733-afa48a8a1831n%40googlegroups.com.


Message has been deleted
Message has been deleted

tran tan

unread,
Mar 18, 2025, 5:26:26 AMMar 18
to klish

Hello,

I appreciate your response. I have a few concerns:
   1. I already have XML configuration files, but I am not sure if they are placed in the correct location. Additionally, I do not know how klishd locates the XML configuration files. Could you clarify this?
   2. I tried starting klishd with "klishd -d -v". However, when I run "klish" in another terminal, I get the following messages in the terminal running klishd:

        """
        klishd-listen: Service process for client was forked: <PID>
        klishd[<PID>]: Can't create KTPd session
        klishd[<PID>]: Close connection 6
        klishd-listen: Service process <PID> was terminated: 255
        """
        Could you provide guidance on what might be causing this issue and how to resolve it?

Thanks in advance for your help!

Best regards,

Vào lúc 15:57:31 UTC+7 ngày Thứ Hai, 17 tháng 3, 2025, Serj Kalichev đã viết:

tran tan

unread,
Mar 18, 2025, 5:26:26 AMMar 18
to klish

Hello

Thank you for your response.

I have already written the XML configuration files, but I am not sure whether I have placed them in the correct location. Could you please advise on how klishd finds and loads these configuration files?

Additionally, is there a specific directory where I should put them, or any configuration option I need to check to ensure klishd recognizes them?

Best regards


Vào lúc 15:57:31 UTC+7 ngày Thứ Hai, 17 tháng 3, 2025, Serj Kalichev đã viết:
Hello

Serj Kalichev

unread,
Mar 18, 2025, 6:20:29 AMMar 18
to kl...@googlegroups.com
Hello

By default klish will search for the XML configs within "/etc/klish" and then "~/.klish". But you can specify the XML configuration location within klishd.conf config file by:

DBs=libxml2
DB.libxml2.XMLPath=/your/path/klish/examples/simple

This suppose that you use libxml2 engine to parse XMLs. The klish supports libxml2, expat, roxml engines. But you need to build klish with engine support.

Use "klishd -f /path/to/klishd.conf" to specify custom config file.

Serj Kalichev

unread,
Mar 18, 2025, 6:25:46 AMMar 18
to kl...@googlegroups.com

Hello

Probably it can't find non-empty XML configs. See the answer about XML paths in previous email.

tran tan

unread,
Mar 19, 2025, 3:28:06 AMMar 19
to klish

Hello,

I followed your instructions, and I was able to resolve the issue successfully.

Thank you for your support and for taking the time to help me.

Best regards,


Vào lúc 17:20:29 UTC+7 ngày Thứ Ba, 18 tháng 3, 2025, Serj Kalichev đã viết:
Reply all
Reply to author
Forward
0 new messages