Repository for LabRAD tutorials and resources sharing.
For instructions on how to contribute to labrad, see contributing.md.
scala interface for labrad
License: MIT License
Repository for LabRAD tutorials and resources sharing.
For instructions on how to contribute to labrad, see contributing.md.
The Scala manager and registry do not have the online documentation. Here is what happens when I try to get the call signature for registry.get:
In [16]: cxn.registry.get
Out[16]:
LabRAD Setting: "Registry" >> "get" (ID=20)
Get the content of the given key in the current directory
Accepts:
(ssb)
(ssb?)
(sb)
(sb?)
(ss)
s
Returns:
?
When looking in the list of clients in the browser interface, it would be good to have additional information about the individual client connections such as their hostname.
I think this is due to choosing a random port that might be already bound. We should be able to change this to let the OS choose a random port, but then we need to refactor the Listener to allow us to get access to the port that is chosen. In addition, it would be good to improve the error message that gets emitted when this sort of error occurs.
These work when they probably shouldn't:
In [6]: reg.mkdir('')
Out[6]: ['', '']
In [7]: reg.set('')
We are trying to use the python sqlite3 module to extract blob data from registry values that are human readable.
sqlite3 (I think) converts the blob to a Python buffer type. Any thoughts on how to convert the buffer type to a string would be great. I think that ()'s and such that are entered in the Registry are not getting converted nicely to a string. It would be great if we could get a human readable output that looks identical to what we see in the web Registry editor.
I am wondering if what we want to do is related to this PR: #84 and possibly we can't get nice human readable output at present, at least without great effort. This would also be good to know.
We are working on converting sqlite database to something human readable (yaml) that we can meaningfully git.
I am a user of the old Delphi LabRAD manager for years. Now I am trying to upgrade to the new scalabrad manager, but backward compatibility is of my highest priority. For newer users who never touched the Delphi version, these issues might not be interesting…
Since I have multiple problems, I will split them to different issues.
Test platform: Windows 7 x64, Java 8 up to date, Python 2.7, pylabrad up to date, without footprint of previous versions of LabRAD.
Issue with directory names: I noticed is that the new manager ignores any directory if it does not have an extension ‘.dir’ with it (this include subdirectories in registry and data). What is the idea behind this setting? Is there a way to switch off this setting so that all the directories will be recognized? I have several thousands of subdirectories in my old registry and data directories and I don’t really want to add extensions to them.
Added: Now that I played around with the new version of LabRAD, I start to wonder if the .dir issue should be posted here, or rather in the pylabrad repo. Please someone tell me...
We should change this so that newContext
returns a non-default context on the first call so that callers using newContext
never collide with the default context.
please.
See here. grep says this lib isn't used anywhere.
Currently, numbers that do not fit in the allowed bit width just silently overflow. See labrad/scalabrad-web#36
The Delphi manager allows you to kill an unwanted connection from the GUI. There doesn't seem to be any way to do that now.
@maffoo, @ejeffrey: When I try to connect to a computer (rottmayer in the example below) running scalabrad-0.5.0 from bintray, I get a message "Expected STARTTLS". Is there something I should be doing (in which case documentation is needed) or is this a bug? Note that I'm running current pylabrad master. Also, this is the first time for running the scalabrad manager on rottmayer, so maybe there's some configuration stuff which needs to be done?
Full traceback as follows:
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 2.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import labrad
In [2]: cxn=labrad.connect(host='rottmayer')
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-2-dd6249c2a6d2> in <module>()
----> 1 cxn=labrad.connect(host='rottmayer')
C:\Code\pylabrad\labrad\__init__.pyc in connect(host, port, name, **kw)
26 def connect(host=constants.MANAGER_HOST, port=constants.MANAGER_PORT, na
me=None, **kw):
27 """Create a client connection to the labrad manager."""
---> 28 cxn = backend.connect(host=host, port=port, name=name, **kw)
29 return client.Client(cxn)
30
C:\Code\pylabrad\labrad\backend.pyc in connect(host, port, name, backend, **kw)
419 backend = 'asyncore'
420 cxn = backends[backend](name)
--> 421 cxn.connect(host, port, **kw)
422 return cxn
423
C:\Code\pylabrad\labrad\backend.pyc in connect(self, host, port, timeout, passwo
rd)
33 self.host = host
34 self.port = port
---> 35 self.ID = self._connect(password, timeout)
36 self.connected = True
37
C:\Code\pylabrad\labrad\backend.pyc in _connect(self, password, _timeout)
62 def _connect(self, password, _timeout):
63 startReactor()
---> 64 self.cxn = self.call(getConnection, self.host, self.port, se
lf.name, password).wait()
65 return self.cxn.ID
66
C:\Code\pylabrad\labrad\backend.pyc in wait(self)
396 # If any Future in the queue fails,
397 # we immediately bail.
--> 398 result.raiseException()
399 else:
400 for func, args, kw in f.callbacks:
C:\Python279\lib\site-packages\twisted\python\failure.pyc in raiseException(self
)
Error: (2) Expected STARTTLS [payload=None]
In [3]:
We have installed LabRAD on a new centOS 7 computer using an ansible script provided by @ejeffrey. While we can connect to the manager from the local machine (using pylabrad and Twisted version 15.4.0), we are unable to connect from any other machines in our department building.
If we try
cxn = labrad.connect(host='<computer_name>.physics.ucsb.edu')
from Windows with Twisted version 14.0.0, we get a an error from Twisted saying that there was a TCP time out. If we try the same thing on an Ubuntu machine with Twisted version 13.2.0 or 15.4.0 (the same version as on the host machine) we get "no route to host".
In trying to understand what's going on, I ran netstat -an | grep 7682
and got the following output (added first line by hand to help understand what the columns mean):
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 :::7682 :::* LISTEN
tcp6 0 0 127.0.0.1:39472 127.0.0.1:7682 ESTABLISHED
tcp6 0 0 127.0.0.1:39471 127.0.0.1:7682 ESTABLISHED
tcp6 0 0 127.0.0.1:7682 127.0.0.1:39471 ESTABLISHED
tcp6 0 0 127.0.0.1:7682 127.0.0.1:39472 ESTABLISHED
At this point, the only concrete question I can ask is "what's going on?". This may come down to a question about the ansible script, but I sort of doubt it, because it seems the manager is running and listening for incoming connections.
When I run the scalabrad manager, I get lots of INFO messages (see below), presumably about trying to connect. Another one comes up every 10 seconds or so. Are these important/useful, or are they just a pest which should be eliminated? Running scalabrad-0.5.0 from bintray.
17:57:09.119 [main] INFO org.labrad.manager.Manager$ - registry location: R:\_L
abRADRegistry_, format=delphi
17:57:09.124 [main] INFO org.labrad.manager.Manager$ - Using saved certificate
for host 'localhost'. certFile=C:\Users\rottmayer-user\.labrad\manager\certs\loc
alhost.cert, keyFile=C:\Users\rottmayer-user\.labrad\manager\keys\localhost.key
17:57:10.371 [main] INFO org.labrad.manager.Listener - now accepting labrad con
nections: port=7682, tlsPolicy=STARTTLS
17:57:10.373 [main] INFO org.labrad.manager.Listener - now accepting labrad con
nections: port=7643, tlsPolicy=ON
17:57:17.271 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49510, local=/128.111.8.222:7682, isLocalConnection=false
17:57:27.301 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49513, local=/128.111.8.222:7682, isLocalConnection=false
17:57:37.333 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49516, local=/128.111.8.222:7682, isLocalConnection=false
17:57:39.847 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/127.0.0.1:51451, local=/127.0.0.1:7682, isLocalConnection=true
17:57:47.342 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49519, local=/128.111.8.222:7682, isLocalConnection=false
17:57:57.359 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49526, local=/128.111.8.222:7682, isLocalConnection=false
17:58:04.657 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/127.0.0.1:51486, local=/127.0.0.1:7682, isLocalConnection=true
17:58:07.370 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49529, local=/128.111.8.222:7682, isLocalConnection=false
17:58:09.814 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/127.0.0.1:51495, local=/127.0.0.1:7682, isLocalConnection=true
17:58:17.378 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49532, local=/128.111.8.222:7682, isLocalConnection=false
17:58:27.432 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49535, local=/128.111.8.222:7682, isLocalConnection=false
17:58:37.488 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49542, local=/128.111.8.222:7682, isLocalConnection=false
17:58:39.599 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/127.0.0.1:51502, local=/127.0.0.1:7682, isLocalConnection=true
17:58:47.496 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49545, local=/128.111.8.222:7682, isLocalConnection=false
17:58:57.537 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49548, local=/128.111.8.222:7682, isLocalConnection=false
17:59:07.548 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49551, local=/128.111.8.222:7682, isLocalConnection=false
17:59:17.556 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49558, local=/128.111.8.222:7682, isLocalConnection=false
17:59:27.563 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49561, local=/128.111.8.222:7682, isLocalConnection=false
17:59:37.598 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49564, local=/128.111.8.222:7682, isLocalConnection=false
17:59:47.604 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49567, local=/128.111.8.222:7682, isLocalConnection=false
17:59:57.612 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49574, local=/128.111.8.222:7682, isLocalConnection=false
18:00:07.192 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.122:62855, local=/128.111.8.222:7682, isLocalConnection=false
18:00:07.622 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49577, local=/128.111.8.222:7682, isLocalConnection=false
18:00:17.623 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49580, local=/128.111.8.222:7682, isLocalConnection=false
18:00:27.636 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49583, local=/128.111.8.222:7682, isLocalConnection=false
18:00:37.644 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49590, local=/128.111.8.222:7682, isLocalConnection=false
18:00:47.649 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49593, local=/128.111.8.222:7682, isLocalConnection=false
18:00:47.659 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.122:62858, local=/128.111.8.222:7682, isLocalConnection=false
18:00:57.664 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49596, local=/128.111.8.222:7682, isLocalConnection=false
18:01:07.673 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49599, local=/128.111.8.222:7682, isLocalConnection=false
18:01:17.681 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49606, local=/128.111.8.222:7682, isLocalConnection=false
18:01:27.686 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49609, local=/128.111.8.222:7682, isLocalConnection=false
18:01:37.691 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49612, local=/128.111.8.222:7682, isLocalConnection=false
18:01:47.702 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49615, local=/128.111.8.222:7682, isLocalConnection=false
18:01:57.706 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49622, local=/128.111.8.222:7682, isLocalConnection=false
18:02:06.030 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/127.0.0.1:51532, local=/127.0.0.1:7682, isLocalConnection=true
18:02:07.720 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49625, local=/128.111.8.222:7682, isLocalConnection=false
18:02:17.729 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49628, local=/128.111.8.222:7682, isLocalConnection=false
18:02:27.738 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49631, local=/128.111.8.222:7682, isLocalConnection=false
18:02:37.744 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49638, local=/128.111.8.222:7682, isLocalConnection=false
18:02:47.753 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49641, local=/128.111.8.222:7682, isLocalConnection=false
18:02:58.045 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49644, local=/128.111.8.222:7682, isLocalConnection=false
18:03:08.057 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49647, local=/128.111.8.222:7682, isLocalConnection=false
18:03:18.064 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49654, local=/128.111.8.222:7682, isLocalConnection=false
18:03:28.075 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49657, local=/128.111.8.222:7682, isLocalConnection=false
18:03:38.081 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49660, local=/128.111.8.222:7682, isLocalConnection=false
18:03:45.875 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.122:62911, local=/128.111.8.222:7682, isLocalConnection=false
18:03:48.089 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49663, local=/128.111.8.222:7682, isLocalConnection=false
18:03:58.098 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49670, local=/128.111.8.222:7682, isLocalConnection=false
18:04:08.114 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49673, local=/128.111.8.222:7682, isLocalConnection=false
18:04:18.115 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49676, local=/128.111.8.222:7682, isLocalConnection=false
18:04:28.126 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49679, local=/128.111.8.222:7682, isLocalConnection=false
18:04:38.137 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49686, local=/128.111.8.222:7682, isLocalConnection=false
18:04:48.148 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49689, local=/128.111.8.222:7682, isLocalConnection=false
18:04:58.225 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49692, local=/128.111.8.222:7682, isLocalConnection=false
18:05:08.228 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49695, local=/128.111.8.222:7682, isLocalConnection=false
18:05:18.234 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49702, local=/128.111.8.222:7682, isLocalConnection=false
18:05:28.245 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49705, local=/128.111.8.222:7682, isLocalConnection=false
18:05:38.258 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49708, local=/128.111.8.222:7682, isLocalConnection=false
18:05:48.262 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49711, local=/128.111.8.222:7682, isLocalConnection=false
18:05:58.276 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49718, local=/128.111.8.222:7682, isLocalConnection=false
18:06:08.276 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49721, local=/128.111.8.222:7682, isLocalConnection=false
18:06:18.290 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49724, local=/128.111.8.222:7682, isLocalConnection=false
18:06:28.296 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49727, local=/128.111.8.222:7682, isLocalConnection=false
18:06:38.304 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49734, local=/128.111.8.222:7682, isLocalConnection=false
18:06:48.319 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49737, local=/128.111.8.222:7682, isLocalConnection=false
18:06:58.319 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49740, local=/128.111.8.222:7682, isLocalConnection=false
18:07:08.329 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49743, local=/128.111.8.222:7682, isLocalConnection=false
18:07:12.241 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.122:62932, local=/128.111.8.222:7682, isLocalConnection=false
18:07:18.339 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49750, local=/128.111.8.222:7682, isLocalConnection=false
18:07:28.349 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49753, local=/128.111.8.222:7682, isLocalConnection=false
18:07:38.350 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49756, local=/128.111.8.222:7682, isLocalConnection=false
18:07:48.361 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49759, local=/128.111.8.222:7682, isLocalConnection=false
18:07:58.371 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49766, local=/128.111.8.222:7682, isLocalConnection=false
18:08:08.371 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49769, local=/128.111.8.222:7682, isLocalConnection=false
18:08:18.402 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49772, local=/128.111.8.222:7682, isLocalConnection=false
18:08:28.433 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49775, local=/128.111.8.222:7682, isLocalConnection=false
18:08:38.453 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49782, local=/128.111.8.222:7682, isLocalConnection=false
18:08:48.499 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49785, local=/128.111.8.222:7682, isLocalConnection=false
18:08:58.508 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49788, local=/128.111.8.222:7682, isLocalConnection=false
18:09:08.519 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49795, local=/128.111.8.222:7682, isLocalConnection=false
18:09:18.541 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49798, local=/128.111.8.222:7682, isLocalConnection=false
18:09:28.617 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49801, local=/128.111.8.222:7682, isLocalConnection=false
18:09:38.630 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49804, local=/128.111.8.222:7682, isLocalConnection=false
18:09:48.630 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49811, local=/128.111.8.222:7682, isLocalConnection=false
18:09:58.638 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49814, local=/128.111.8.222:7682, isLocalConnection=false
18:10:08.651 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49817, local=/128.111.8.222:7682, isLocalConnection=false
18:10:18.654 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49820, local=/128.111.8.222:7682, isLocalConnection=false
18:10:28.669 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49827, local=/128.111.8.222:7682, isLocalConnection=false
18:10:38.671 [nioEventLoopGroup-3-2] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49830, local=/128.111.8.222:7682, isLocalConnection=false
18:10:48.683 [nioEventLoopGroup-3-3] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49833, local=/128.111.8.222:7682, isLocalConnection=false
18:10:58.687 [nioEventLoopGroup-3-4] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49836, local=/128.111.8.222:7682, isLocalConnection=false
18:11:08.702 [nioEventLoopGroup-3-5] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49843, local=/128.111.8.222:7682, isLocalConnection=false
18:11:18.704 [nioEventLoopGroup-3-6] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49846, local=/128.111.8.222:7682, isLocalConnection=false
18:11:28.716 [nioEventLoopGroup-3-7] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49849, local=/128.111.8.222:7682, isLocalConnection=false
18:11:38.723 [nioEventLoopGroup-3-8] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49852, local=/128.111.8.222:7682, isLocalConnection=false
18:11:48.775 [nioEventLoopGroup-3-1] INFO org.labrad.manager.LoginHandler - rem
ote=/128.111.8.73:49859, local=/128.111.8.222:7682, isLocalConnection=false
I seem to recall there was a web interface. Is this started automatically? If so, how is it accessed?
On the manager computer, we (myself and @cjneill) were unable to connect to the scalabrad manager unless we specified the password even though the LabRADPassword environment variable was set.
In particular, LabRADPassword was set to some value (say, PASSWORD). When we tried opening the manager in the usual way (not using the --password
flag) and then tried labrad.connect()
on the same computer, we got an error message about an incorrect password.
To get the manager/client working, we had to call the manager using the --password=PASSWORD
flag and have the environment variable set (for Python clients).
What's the point of this line using a lazy?
It seems that clients are not getting notifications of new servers connected, and I have to manually call cxn.refresh(). This is with scalabrad-0.4.0 from bintray, so I think that it should be including the #29 fix.
Using the web-server to edit registry keys, if I add a new key and restart the server, the key remains.
If I delete a key and restart, the key is no longer deleted.
If I edit a key and restart, the key is no longer edited.
Is there another way to edit the Registry? What is happening here?
We ran into a situation where the multiheaded registry and auth servers were trying to connect to managers that were no longer running. After several days the manager process was consuming ~13 GB of memory and responding very slowly (if at all) to new connections. It would appear that there is a slow memory leak when the multiheaded servers fail to connect. Could be netty buffers that are not getting released, for example.
Especially with the upcoming SSL support, I think the configuration is getting too big to do through environment variables and command line arguments. There should be a .ini file for configuration parameters.
The auth server doesn't allow you to make change to the auth database from a non-local manager. Ideally this would just work, but at the moment we don't have a way to propagate "admin" information in this case. So the error message should be clear. Right now, I get a JVM traceback that looks like this:
Error: (0) java.lang.RuntimeException: no such connection: 1000002941
at scala.sys.package$.error(package.scala:27)
at org.labrad.manager.HubImpl$$anonfun$1.apply(Hub.scala:136)
at org.labrad.manager.HubImpl$$anonfun$1.apply(Hub.scala:136)
at scala.Option.getOrElse(Option.scala:121)
at org.labrad.manager.HubImpl.username(Hub.scala:136)
at org.labrad.manager.auth.AuthServer.requestInfo(AuthServer.scala:224)
Not really sure why but the scalabrad manager on redheatdos just shut down. The window it was running in closed, so I don't know why. I don't really have anything helpful to say about it, so... there's that.
Kind of obscure error to come across, but if you're in a folder in the command line that was deleted by the registry editor, and you try to do something registry.set()
for example, you get an unhelpful error:
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-46-f1ab015623a3> in <module>()
----> 1 cxn.registry.set('test','value')
/usr/local/google/home/mutus/.virtualenvs/2.7/local/lib/python2.7/site-packages/labrad/client.pyc in __call__(self, *args, **kw)
63 if wrap:
64 future.addCallback(lambda resp: resp[0][1])
---> 65 return future.wait() if wait else future
66
67 # data to be loaded on demand
/usr/local/google/home/mutus/.virtualenvs/2.7/local/lib/python2.7/site-packages/labrad/backend.pyc in wait(self)
396 # If any Future in the queue fails,
397 # we immediately bail.
--> 398 result.raiseException()
399 else:
400 for func, args, kw in f.callbacks:
/usr/local/google/home/mutus/.virtualenvs/2.7/local/lib/python2.7/site-packages/twisted/python/failure.pyc in raiseException(self)
Error: (0) [SQLITE_CONSTRAINT] Abort due to constraint violation (FOREIGN KEY constraint failed) [payload=None]
running the labrad / labrad.bat script with --help or -h should print usage information. Also, there should be documentation in the top level directory about how to configure the registry, password, and other manager settings.
As discussed in labrad/pylabrad#220, transferring large packets is slow and seems to scale quadratically with the packet size. We traced this back to the behavior of netty's ByteToMessageCodec
, which accumulates bytes from multiple network packets into a single ByteBuf
in a way that involves lots of copying, which caused the quadratic slowdown. We need to replace this with a more efficient accumulator.
Brian starts the scalabrad manager from bintray and sees
12:42:39.612 [main] INFO org.labrad.manager.Manager$ - registry location: C:\Us
ers\Brian\.labrad\registry.sqlite, format=sqlite
12:42:41.087 [main] INFO org.labrad.manager.Listener - now accepting labrad con
nections on port 7682
He then starts the registry editor version 1.0.0 and the UI hangs showing no directories.
I am having an issue where I think the registry is returning a NoneType object when I try and read a value from the registry. Below it seems to have errored with:
'''
sample['iq_calibration_dataset']
'''
but when I 'debug' and look at the value of 'k' in line 159 it is referring to 'magnet voltage'. I did previously see this error when trying to set the magnet voltage key.
Here is the registry folder in question:
Here's the traceback.
TypeError Traceback (most recent call last)
in ()
U:\Brooks\Code\Impulse_response_noDMMs.py in step_response(sample, start_flux, e
nd_flux, averages, plot, horizontal_scale, frequency, name, config)
313 update_adr_temperature_keys(sample)
314 print 'DIR: {}'.format(sample['iq_calibration_directory'])
--> 315 print 'Dataset: {}'.format(sample['iq_calibration_dataset'])
316 d = dvw(sample['iq_calibration_directory'], cxn)
317 dataset = sample['iq_calibration_dataset']
C:\pyle\pyle\util\registry.pyc in getitem(self, name)
271 directory (note that the root directory has no parent).
272 """
--> 273 self._update()
274 if name == '..':
275 return self.parent()
C:\pyle\pyle\util\registry.pyc in _update(self)
235 elif now_connected:
236 if updated_keys:
--> 237 self._update_keys(updated_keys)
238 else:
239 log.warn("registry is not connected. cache state may be inva
lid!")
C:\pyle\pyle\util\registry.pyc in _update_keys(self, keys)
157 result = p.send()
158 for k in keys:
--> 159 self._keys[k] = result[k]
160
161 def _handle_server_connect(self, message_ctx, msg):
TypeError: 'NoneType' object has no attribute 'getitem'
Servers that repeatedly try to connect (e.g. datavault multihead) throw errors related to the server already being connected, even if the server is not available. This seems to happen after a bad restart of the server (intermittently).
Used 1.5 GB of RAM after .5 days of running. Windows 7.
We should probably have the old labrad Sourceforge page (https://sourceforge.net/p/labrad/wiki/Home/) direct users to scalabrad for the latest LabRAD version. We should probably also redirect http://labrad.org to https://github.com/labrad.
The delphi and python managers have a configurable "manager name" and an automatically generated GUID along with settings to retreive them. This helps clients identify the manager in multi-manager environments. scalabrad should support these as well.
I don't know if this is a manager issue or a datavault server issue, but when I tried to create a new datavault in my home directory ~/DataVault, it didn't work. I had to give the full file path: /Users/mutus/DataVault then it worked just fine.
if java 8 is not installed the error reads "-cp command not valid windows command".
When using the default worker group for labrad connections, processes might not exit after an error because the event loop group threads are not daemon threads. We should fix this up. defaultWorkerGroup
should probably go away because it's not clear who has the responsibility to shut it down; it will close itself if System.exit is called since it installs a shutdown hook, but if all user threads just exit this does not happen.
It seems there are very few comments in Scala code. While I understand that the situation is quite different from python where we have to laboriously document even things like expected types, I would think documentation of intent could still be useful.
As a case study, I've been trying to understand the code in Registry.scala
. Here's an excerpt
def changeDir(dir: Either[String, Seq[String]], create: Boolean = false): Seq[String] = {
...
}
What is dir
? Reading through the code one finds that it's the directory relative to the current directory into which we navigate. This isn't obvious at all until you read the code and also the _mkDir
code. I think we should do better.
Thoughts?
To make copying not slow as molasses :-)
When we were setting up a new server computer and did not know the proper command line arguments to run the labrad.bat
file, attempting cxn = labrad.connect()
would first query:
Accept server certificate for host 'mrfreeze.physics.ucsb.edu'? (accept just thi s [O]nce; [S]ave and always accept this cert; [R]eject)
but then immediately drop the connection after input without any other error message.
I am currently running the LabRAD manager by:
sbt> run --password="pass"
sbt then prompts we which main class should it run, the Manager or the Migrate.
is this the right way of running it? Or is there a way of storing the port,password etc in a configuration file? Is there a way to choose the default main class to run?
If I have a server name "%LABRADNODE% Direct Ethernet" scalabrad should insert the actual node name from the environment. It doesn't.
To be more like Delphi manager
I got a generic SQLite browser but I can't seem to make sense of the new registry format. How should I browse this registry?
@maffoo Hi Matthew, I'm trying to use the new version labRAD, although there is binary version available online, I want to make some slight modification and compile the source code myself, however it seems that it is a little tricky to properly set up everything to successfully compile it, do you have any suggestions? Any help will be sincerely appreciated. Thanks.
Best,
Youpeng
Got this message when trying to start a server from the node:
org.labrad.errors.LabradException: 0: [node point-sal] Remote Traceback (most recent call last): Failure: labrad.types.Error: (0) Startup failed. [payload=[(datetime.datetime(2017, 3, 10, 11, 56, 20, 525515), "WARNING:root:Twisted version >= 14.0.0 required for SSL support. Older versions don't support the platform CA roots.\n"), (datetime.datetime(2017, 3, 10, 11, 56, 20, 681714), '2017-03-10 11:56:20-0800 [-] Log opened.\n'), (datetime.datetime(2017, 3, 10, 11, 56, 20, 687807), '2017-03-10 11:56:20-0800 [LabradProtocol,client] 'connection failed, disconnecting'\n2017-03-10 11:56:20-0800 [LabradProtocol,client] Traceback (most recent call last):\n2017-03-10 11:56:20-0800 [LabradProtocol,client] File "/usr/local/labrad/pylabrad/labrad/server.py", line 353, in startup\n'), (datetime.datetime(2017, 3, 10, 11, 56, 20, 688099), '2017-03-10 11:56:20-0800 [LabradProtocol,client] yield protocol.loginServer(name, self.description, self.notes)\n2017-03-10 11:56:20-0800 [LabradProtocol,client] Error: (1) java.lang.IllegalArgumentException: requirement failed: server already connected: Hittite T2100 Server (10) [payload=None]\n'), (datetime.datetime(2017, 3, 10, 11, 56, 20, 688316), '2017-03-10 11:56:20-0800 [LabradProtocol,client] There was an error: (1) java.lang.IllegalArgumentException: requirement failed: server already connected: Hittite T2100 Server (10) [payload=None]\n'), (datetime.datetime(2017, 3, 10, 11, 56, 20, 688623), '2017-03-10 11:56:20-0800 [-] Main loop terminated.\n')]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.