connect qstudio to localhost 5000 connection

Hi All,

Please any help to connect qstudio to localhost 5000 will be appreciated.

I am running q on linux on virtual machine and qstudio is installed on windows desktop.

Getting no connection possible localhost:5000 error.

tried using java -jar qstudio.jar at command terminal,still the issue.

Thanks

Neetha

Neetha, 
If your q is inside a virtual machine, you need to specify the IP address of the VM, not localhost. So you’ll need to connect to <VM-IP>:5000. Go into the VM and inside a terminal, type /sbin/ifconfig -a. Your virtualized network interface should be eth0, I’m guessing. Add the corresponding IP address to the connect string inside the qStudio, that should do the trick. 

Another option is to make the setup simple, why not run the q inside Windows too, just start q with “q -p 5000”. That way you can use localhist:5000, inside qStudio. 

Kumar

Hi Kumar,

Thanks for reply, i got the below output

  1. inside a terminal, i executed command “/sbin/ifconfig -a” and got below output:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:15:BE:CE  

          inet addr:192.168.202.130  Bcast:192.168.202.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe15:bece/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:19 errors:0 dropped:0 overruns:0 frame:0

          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:1000 

          RX bytes:1998 (1.9 KiB)  TX bytes:8208 (8.0 KiB)

          Interrupt:67 Base address:0x2024 

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:15:BE:CE  

          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          Interrupt:67 Base address:0x2024 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:1792 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1792 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:3724676 (3.5 MiB)  TX bytes:3724676 (3.5 MiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

please i need little bit clarification which one is IP address, i tried 192.168.202.130 with no success.

2 ."Another option is to make the setup simple, why not run the q inside Windows too, just start q with “q -p 5000”. That way you can use localhist:5000, inside qStudio. "

should i install q for windows as well to try this option? - does this clash with q on linux.

Thanks

Neetha

Option 1 - Windows host, linux VM. 
I’m guessing , then that both your Windows host and the VM are on the 10.0 network. Do run ipconfig /all inside a Windows cmd window, and check what output you get. If your Windows host also shows a 10.0 address, then using :10.0.0.1 should work, inside qStudio. Please do post the ipconfig output here.  
P.S:  try ping 192.168.202.130 from inside the cmd window, should tell you something about whether the VM IP is reachable or not. 

Option 2. Windows host, no VM. - yes, do install q for windows, it is super-simple to install. That is guaranteed to work. No, it will not clash with the linux q install, the VM is a totally independent host altogether. 

Kumar

Just a question - Did you run a q -p 5000 inside linux, before trying to connect from qStudio?
Kumar

Hi Kumar,

Sorry, tryin  make qstudio work, i got problem with my VM - it says configuration file can not be found, it might be missing from virtual machine directory, or the path specified to access this virtual machine is incorrect.

 

Please do you have anyidea?

Thanks 

Neetha

Here are your most viable options, Neetha - 
a. Put the qstudio jar onto the VM, and run it using localhost:5000(provided you have started q using q -p 5000)

b. Run both qstudio and q in Windows. 

c. Run qstudio in Windows and q inside linux(again, do q -p 5000 inside linux before running qstudio. 

The error you are getting means that the .vmdk file(I’m assuming you’re using VMWare) is missing, for the virtual machine in question. 

Follow this sequence - 

  1. Get q and qstudio working on Windows, so you have a fallback. 

  2. Get the VM running, you’ll need to look for the .vmdk for your VM. If all else fails, just create a new VM with the linux ISO that you have, that’s a whole lot simpler than the hairy config issues. 

  3. Once the VM is up, put the qstudio jar onto it and run as (a) above.

  4. Last, but not the least, do the qstudio on Windows and q on linux option. 

Make sure you can ping the VM IP from your Windows host, that is absolutely imperative. 

Kumar

Hi Kumar,

No worries! VM working fiine now.

As for your suggestions - tried q -p 5000 and made connection in qstudio -  connection works.

when i tried to ping 192.168.202.130 from inside the cmd window, its reachable after applying  q -p 5000.

Thanks for all help:)

i have one more question, tried installing rlwrap in linux with no success, tried all solutions online.

installed rlwrap i386 for 32bit linux.

Thanks 

Neetha

 

Hi Kumar,

No worries! VM working fiine now.

As for your suggestions - tried q -p 5000 and made connection in qstudio -  connection works.

when i tried to ping 192.168.202.130 from inside the cmd window, its reachable after applying  q -p 5000.

Thanks for all help:)

i have one more question, tried installing rlwrap in linux with no success, tried all solutions online.

installed rlwrap i386 for 32bit linux.

Thanks 

Neetha

http://code.kx.com/wiki/Tutorials/Installation?_ga=1.252918729.1719508870.1482067940 - I follow this page for rlwrap issues, do take a look. 

Cheers, glad I could be of help, 

Kumar

Hi Kumar,

already gone thru this link and its not working, meaning recalling text is not working.

Thanks 

Neetha

continued..

I am getting error - Public key for rlwrap-0.42-1.el5.i386.rpm is not installed

Thanks

Neetha

What linux are you using? Centos or Ubuntu or RHEL? 

http://www.sysadminshare.com/2012/08/public-key-for-rpm-is-not-installed-how.html - this link solves for RPMs and Yum installs. Follow with care, you’re changing stuff as root here. 

I’ve used Ubuntu for q , and the apt-get works straight out of the box. 

Kumar

Hi Kumar,

Thanks i will try below link.

I am using RHEL 5.

Thanks

Neetha

Hi Kumar

I did exactly according to the link information given below. 

from two solutions in the link:

-> first solution – unable to disable the signature for RPMs because of the missing file myrpm.repo in the installed linux

-> second solution – imported the public key files for RPM as suggested in link and tried to install rlwrap with no success.

Please any suggestions!

Thanks

Neetha  

Umm, this goes beyond my skill set, I’m not a system admin, you probably are better off asking one. I hate to say that I can’t help in this matter anymore, the approach I’d take is trial-and-error-based and not something I’d want to put out on a public mailing list, it would be too much unnecessary chatter. 

Good luck, 

Kumar

Hi Kumar,

Thanks for all support.

No worries, i can understand.

I will try to solve it on trial-and-error-based.

Thanks

Neetha

Hi All,

Great! Solution given by kumar worked.

Thanks for your time and help Kumar.

here is solution:

  1. Installed rlwrap using below code :

yum --nogpgcheck install rlwrap-0.42-1.el5.i386.rpm  

// actually when trying to install rlwrap 32 bit version using command yum install rlwrap-0.42-1.el5.i386.rpm ,

 it’s not getting installed and giving error “Public key for rlwrap-0.42-1.el5.i386.rpm is not installed.”

kumar suggested few solutions ,one being change gpgcheck to 0 from 1 in myrpm.repo file which

doesn’t exit in my file system so added --nogpgcheck in command on kumar’s suggestion //

[root@oracle ~]# yum --nogpgcheck install rlwrap-0.42-1.el5.i386.rpm

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : rlwrap                                            [1/1] 

Installed: rlwrap.i386 0:0.42-1.el5

Complete!

  1. checked for rlwrap version with command rlwrap -v

[root@oracle ~]# rlwrap -v

rlwrap 0.42

3.next entered  alias q=‘QHOME=/q rlwrap -r /q/l32/q’    //to set path to q//

[root@oracle ~]# alias q=‘QHOME=/q rlwrap -r /q/l32/q’

[root@oracle ~]# q

KDB+ 3.3 2015.06.09 Copyright (C) 1993-2015 Kx Systems

l32/ 1()core 1010MB root oracle 127.0.0.1 NONEXPIRE  

q)a:1

q)b:0

q)a+b

1

q)b:0

Once logged to q session, able to recall text, using up and down arrows keys.
able to move cursor to modify commands using left and right arrow keys.

it saves lot of time and effort!!

Thanks

Neetha