h: hopen `::5000; connection to a port

Dear All,

I stored some data in port 5000.

When I try to read it from another command window i do:

(1) h: hopen `::5000;

(2) h" select from table where date= , time>="

(3) close the connection using hclose h

However, I have made a mistake at point 3)  instead of using “hclose h” I used  “h(close,0)”;

Then when I try to reconnect to p 5000 (or any other ports -say p 5010) i get an error like “hop: No connection could be made because the target machine actively refused it.”

How can I re-establish a connection with a port? Why am I getting this error?

Thanks a lot for your help

S

I couldn’t reproduce the error. Following is my attempt

Yogeshs-MacBook-Pro:Resume yogeshgarg$ q -p 20301
q)
q).yo.a : 1
q)

Yogeshs-MacBook-Pro:Resume yogeshgarg$ q
q)
q)::20301(get;.yo.a )     // I’d rather use this for one-time queries
1
q)
q)h: hopen ::20301 q)h(get;.yo.a)
1
q)h(close,0)                // Throws an error that says close is not a valid symbol
'close
q)h(get;.yo.a) 1 q)h(close;0)                 // Again, as expected 'close q)h(get;.yo.a)
1

I suspect the problem is unrelated. Have you tried turning it off and on again? :P

Yogesh Garg

Can’t reproduce it either.<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von yogesh garg
Gesendet: Dienstag, 2. Februar 2016 18:29
An: personal-kdbplus@googlegroups.com
Betreff: Re: [personal kdb+] h: hopen `::5000; connection to a port<o:p></o:p>

<o:p> </o:p>

I couldn’t reproduce the error. Following is my attempt

Yogeshs-MacBook-Pro:Resume yogeshgarg$ q -p 20301
q)
q).yo.a : 1
q)

Yogeshs-MacBook-Pro:Resume yogeshgarg$ q
q)
q)::20301(get;.yo.a )     // I’d rather use this for one-time queries
1
q)
q)h: hopen ::20301 q)h(get;.yo.a)
1
q)h(close,0)                // Throws an error that says close is not a valid symbol
'close
q)h(get;.yo.a) 1 q)h(close;0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Again, as expected 'close q)h(get;.yo.a)
1

<o:p></o:p>

I suspect the problem is unrelated. Have you tried turning it off and on again? :P<o:p></o:p>

<o:p></o:p>

Yogesh Garg <o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

On 2 February 2016 at 21:36, Saad Badaoui <badaouisaad@gmail.com> wrote:<o:p></o:p>

Dear All,<o:p></o:p>

<o:p> </o:p>

I stored some data in port 5000.<o:p></o:p>

<o:p> </o:p>

When I try to read it from another command window i do:<o:p></o:p>

<o:p> </o:p>

(1) h: hopen `::5000;<o:p></o:p>

<o:p> </o:p>

(2) h" select from table where date= , time>="<o:p></o:p>

<o:p> </o:p>

(3) close the connection using hclose h<o:p></o:p>

<o:p> </o:p>

However, I have made a mistake at point 3)  instead of using “hclose h” I used  “h(close,0)”;<o:p></o:p>

<o:p> </o:p>

Then when I try to reconnect to p 5000 (or any other ports -say p 5010) i get an error like “hop: No connection could be made because the target machine actively refused it.”<o:p></o:p>

<o:p> </o:p>

How can I re-establish a connection with a port? Why am I getting this error?<o:p></o:p>

<o:p> </o:p>

Thanks a lot for your help<o:p></o:p>

<o:p> </o:p>

S<o:p></o:p>


Submitted via Google Groups

Thanks Yogesh. I think i closed the port instead of just closing the connection to the port.  So when I reconnect to the port it is does not recognize it. I think thats what happened

Many Thanks