KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ hopen 5001 => ‘hop. OS reports:

  • hopen 5001 => ‘hop. OS reports:

    Posted by rosebroger on October 4, 2023 at 12:00 am

    Any clue about:

    q)hopen 5001
    ‘hop. OS reports: No connection could be made because the target machine actively refused it.
    [0] hopen 5001
    ^

     

     

    rosebroger replied 3 months, 1 week ago 3 Members · 4 Replies
  • 4 Replies
  • gyorokpeter-kx

    Member
    October 4, 2023 at 12:00 am

    It doesn’t necessarily mean that the port is not available, but that there is currently no process listening on it.

    If you are expecting a server to be running on that port, you might want to check what’s up with it – it might be crashing or hanging in an error trap, not reaching the point where it opens the port.

    If you are just experimenting, you first need to start a second q process with the command line parameters -p 5001 which will make it listen on that port.

  • rocuinneagain

    Member
    October 4, 2023 at 12:00 am

    https://code.kx.com/q/basics/errors/#:~:text=formed%20select%20query-,hop,-Request%20to%20hopen

    hop

    Request to hopen a handle fails; includes message from OS

    Your code is trying to open a handle to a process listening on port 5001 but one is not available.

     

     

  • rosebroger

    Member
    October 4, 2023 at 12:00 am

    Thank you for reply.

    Does that mean the port is not available to be listened to?

    How can I find out which ports can be chosen in this case?

  • rosebroger

    Member
    October 4, 2023 at 12:00 am

    Right, you’re right

    Before using the hopen command, it is necessary to open the port listening with the p command:

    p 5001       /system[“p 5001”]       /q.exe -p 5001

    hopen 5001

    Now work

    Thank you to all for answer

Log in to reply.