# ColtrolPort IC Timeout

**URL:** <https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301>\
**Category:** GNU Radio\
**Created:** [May 22, 2014, 5:11pm UTC](https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301 "2014-05-22T17:11:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 22, 2014, 5:11pm UTC](https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301/1 "2014-05-22T17:11:23Z")

</div>

I have a gui-less flowgraph that runs in the background with sudo  
privileges. While I can run ControlPort normally from GRC, it doesn’t  
seem  
to work properly with my backgrounded FG - I get timeout errors. My  
config  
files are setup so that both FGs do actually call ControlPort and Perf  
Mon  
(verified in log files). The FG and the monitoring apps are all running  
on  
the same PC.

Setup is Ubuntu 12.04 x64 with GR 3.7.4, built on the weekend.

Attempting to run Perf Mon, I get:

$ gr-perf-monitorx 127.0.0.1 23456

2014-05-22 11:01:54.450720 /usr/bin/gr-perf-monitorx: error: Traceback  
(most recent call last):  
File “/usr/lib/pymodules/python2.7/Ice.py”, line 984, in main  
status = self.doMain(args, initData)  
File “/usr/lib/pymodules/python2.7/Ice.py”, line 1031, in doMain  
return self.run(args)  
File  
“/usr/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”,  
line 102, in run  
ex = self.parentClass(radio, port, self)  
File “/usr/bin/gr-perf-monitorx”, line 74, in **init**  
self.newCon(radio, port)  
File “/usr/bin/gr-perf-monitorx”, line 88, in newCon  
child = MForm(radio, port, len(self.conns), self)  
File “/usr/bin/gr-perf-monitorx”, line 696, in **init**  
knobs = self.radio.get([])  
File “/usr/lib/python2.7/dist-packages/gnuradio\_ice.py”, line 1221, in  
get  
return  
\_M\_gnuradio.ctrlport.GNURadio.ControlPort.\_op\_get.invoke(self,  
((knobs, ), \_ctx))  
ConnectTimeoutException: exception ::Ice::ConnectTimeoutException  
{  
}

Attempting to run Ctrl Port Mon, I get:

A blank canvas screen like this: [http://i.imgur.com/8N88fcU.png](http://i.imgur.com/8N88fcU.png)

and console output like:

$ gr-ctrlport-monitor 127.0.0.1 23456  
X Error: BadAccess (attempt to access private resource denied) 10  
Extension: 129 (MIT-SHM)  
Minor opcode: 1 (X\_ShmAttach)  
Resource id: 0x4200001  
X Error: BadShmSeg (invalid shared segment parameter) 128  
Extension: 129 (MIT-SHM)  
Minor opcode: 5 (X\_ShmCreatePixmap)  
Resource id: 0x4200012  
X Error: BadDrawable (invalid Pixmap or Window parameter) 9  
Major opcode: 62 (X\_CopyArea)  
Resource id: 0x4200013  
X Error: BadDrawable (invalid Pixmap or Window parameter) 9  
Major opcode: 62 (X\_CopyArea)  
Resource id: 0x4200013  
ctrlport-monitor: radio.get threw exception (exception  
::Ice::ConnectTimeoutException  
{  
}).  
…

My ctrlport.conf file has just one uncommented line:

ControlPort.Endpoints = tcp -t 5000 -h 127.0.0.1 -p 23456

I had extended the timeout, attempting to resolve the problem, but had  
no  
luck.

Very Respectfully,

Dan CaJacob

---

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://www.ruby-forum.com/u/Dan_CaJacob)\
**Post date:** [May 23, 2014, 5:32pm UTC](https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301/2 "2014-05-23T17:32:36Z")

</div>

On Thu, May 22, 2014 at 11:09 AM, Dan CaJacob [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> $ gr-perf-monitorx 127.0.0.1 23456

Hey Dan,

When you’re running the flowgraph that you’re trying to connect to over  
ControlPort, can you verify that they are setting up the correct  
endpoint?  
If you run it yourself, not as a background task, it should print out  
information about the endpoints. That will tell you the port number.  
Just  
want to check to make sure your config file is getting read correctly  
and  
setting it up on port 23456 like you specified.

We really should move the endpoint information to be sent out by the  
gr-log  
system so you can redirect the info to a file and see the info without  
requiring you to have access to stdout.

Tom

---

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://www.ruby-forum.com/u/Dan_CaJacob)\
**Post date:** [May 23, 2014, 7:08pm UTC](https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301/3 "2014-05-23T19:08:05Z")

</div>

Hey Tom,

Yes, it was definitely pulling the correct endpoint. Even though it is  
backgrounded, I have a log for everything that ran.

Very Respectfully,

Dan CaJacob

---

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://www.ruby-forum.com/u/Dan_CaJacob)\
**Post date:** [May 27, 2014, 5:37am UTC](https://www.ruby-forum.com/t/coltrolport-ic-timeout/241301/4 "2014-05-27T05:37:12Z")

</div>

On Fri, May 23, 2014 at 1:06 PM, Dan CaJacob [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hey Tom,
> 
> Yes, it was definitely pulling the correct endpoint. Even though it is  
> backgrounded, I have a log for everything that ran.
> 
> Very Respectfully,
> 
> Dan CaJacob

Hey Dan,  
Bit of a holiday this weekend, mostly away from my computers. I’d like  
to  
try to solve this problem with you, but I’m not sure where to begin. I’m  
wondering if it’s related to the intermittent/infrequent QA failures  
I’ve  
seen when ControlPort is turned on. Is there any chance you can provide  
a  
simple program that we can use to exercise the problem for me to help  
debug?

Tom
