EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: EpicsQT and Archiver Appliance
From: "Abdalla Ahmad" <[email protected]>
To: Andraz Pozar <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 2 May 2017 08:55:28 +0000
Hi Andraz

Thank you for the tip, the proxy works now with the QEGui tool.

Now instead of having the AA locally I moved it to another PC to have something similar to what Michael wrote here: https://github.com/epicsdeb/carchivetools/blob/master/README-a2aproxy.md , but in the twisted log all components are returned with localhost instead of that PC's IP, so I modified the appliance.xml on that PC to have the actual IP instead of localhost and it works just fine.

Looking forward for native support for AA on Qt.

Best Regards,

Abdalla Ahmad
Control Engineer
SESAME
Allan, Jordan.
Tel: (+962-5) 3511348 , ext. 265
Fax: (+962-5) 3511423
Mob: (+962-7)88183296
www.sesame.org.jo

-----Original Message-----
From: Andraz Pozar [mailto:[email protected]] 
Sent: Tuesday, May 02, 2017 7:00 AM
To: Abdalla Ahmad <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: EpicsQT and Archiver Appliance

Hi Abdalla,

This is how I set up a2aproxy to work with Archiver Appliance (AA) and EpicsQT:

 * In order for the a2aproxy to get all of the info it needs to work properly, you have to give it a getApplianceInfo endpoint, so if you have a default AA setup, that should be http://localhost:17665/mgmt/bpl/getApplianceInfo.
 * To start the a2aproxy I execute: twistd -n -l <path_to_log_file> a2aproxy -P 8080 -A http://localhost:17665/mgmt/bpl/getApplianceInfo
    This will start it in nodaemon mode, output logs into <path_to_log_file> and listen on port 8080 for requests from your EpicsQt client.

* If you have have this up and running successfully, the only thing left to do is to set:  
   QE_ARCHIVE_LIST=<your_host>:8080/cgi-bin/ArchiveDataServer.cgi on your EpicsQt client host.
   You have to use the cgi-bin/ArchiveDataServer.cgi endpoint since a2aproxy is mimicking a standard CA Archiver.

* When you'll be retrieving the data, you can't use the linear mode as it's not supported by a2aproxy, so try raw or plot binning.

Let me know how it goes.

Cheers,

Andraz Pozar | Controls Engineer| Australian Synchrotron
p: (03) 8540 5387 | f: (03) 8540 4200
[email protected] | www.synchrotron.org.au
800 Blackburn Road, Clayton, Victoria 3168

Message: 4
Date: Mon, 1 May 2017 11:48:56 +0000
From: "Abdalla  Ahmad" <[email protected]>
To: Michael Davidsaver <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Subject: RE: EpicsQT and Archiver Appliance
Message-ID:
	<[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hello Michael

After enabling the '-d' option I get this:

[carchive.util.LimitedSite] DEBUG:carchiveutil build IPv4Address(TCP, 127.0.0.1, 41780) <twisted.web.http.HTTPChannel instance at 0x397d638 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [01/May/2017:11:35:02 +0000] "POST /retrieval HTTP/1.1" 404 153 "-" "libmaia/0.2"

Regarding your request for the channel archiver client source, I have included Andrew Starritt one of the EPICS Qt project developers, maybe he can elaborate more on this.

Best Regards,

Abdalla Ahmad
Control Engineer
SESAME
Allan, Jordan.
Tel: (+962-5) 3511348 , ext. 265
Fax: (+962-5) 3511423
Mob: (+962-7)88183296
www.sesame.org.jo


-----Original Message-----
From: Michael Davidsaver [mailto:[email protected]]
Sent: Thursday, April 27, 2017 4:37 PM
To: Abdalla Ahmad <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Subject: Re: EpicsQT and Archiver Appliance

On 04/27/2017 02:22 AM, Abdalla  Ahmad wrote:
> Hello Michael
> 
> Thank you for the tips, the proxy is now running as you pointed out:
> 
> Twistd -n a2aproxy -P 8888 -A localhost:8888/retrieval

Can you also add '-d' to turn on some extra debug output?

> but I think I missed something on the client side.
> 
> I have EPICS Qt 3.2.4 with Qt 5.6.0 installation on the same server as the AA and I exported QE_ARCHIVE_LIST as "localhost:8888/retrieval but running Archive Status in QEGui tool still gives me:

Do you (or anyone) know where the source for this channel archiver client can be found?

> INFO: Requesting PV name info from http://localhost:8888/retrieval
> ERROR: request failure from http://localhost:8888/retrieval

Does the a2aproxy log include any errors?  If the xmlrpc call results in a python exception, then something will be logged.

With debugging enabled you should see a line with 'archiver.names' for every client request.


It is also possible that a2aproxy is returning some xml which violates assumptions of the client code.  With xml the obvious candidate would be ordering.  a2aproxy builds xml using python dictionaries, which do not have stable/defined iteration ordering, which some xml parsers require.




> Best Regaerds,
> 
> Abdalla.
> 
> -----Original Message-----
> From: Michael Davidsaver [mailto:[email protected]]
> Sent: Wednesday, April 26, 2017 4:17 PM
> To: Abdalla Ahmad <[email protected]>
> Cc: [email protected]
> Subject: Re: EpicsQT and Archiver Appliance
> 
> On 04/26/2017 06:50 AM, Abdalla  Ahmad wrote:
>> Dear Michael
>>
>> Can you please elaborate more on installing the proxy you wrote? I'm having difficulties running it on Scientific Linux 7 machine.
>>
>> First I have the requirements (numpy, twisted and protocol-buffer), then I did:
>>
>> python setup.py build
>> sudo python setup.py install
>>
>> After that I ran the command as in the README:
>>
>> twistd -n a2aproxy -P 8888 AA-SERVER-URL:17665
>>
>> And then I get "Wrong number of arguments". 
> 
> oops, the README was wrong!  '-A' is missing.  Now fixed.
> 
> An known working example from nsls2 can be seen in debian/channelarchiver-a2aproxy.default in the source tree.
> 
>> twistd a2aproxy -P 8889 -A
>> http://capp01.cs.nsls2.local:17665/mgmt/bpl/getApplianceInfo -d
> 
> 
>> Running "twistd a2aproxy" gives an error like "No module named EPICSEvent_pb2". Also when reordering the arguments it does not recognize the "-n" option.
> 
> twistd is picky about ordering of arguments as these are parsed by 
> different code.  Arguments before the application name ('a2aproxy' in 
> this case) are for twisted itself (run 'twistd -h').  The remaining 
> arguments are for the application.  (run 'twistd a2aproxy -h')
> 
> 
>> "No module named EPICSEvent_pb2"
> 
> Switch to some other directory and retry.
> 
> By default python searches the current directory before /usr/local.  I would guess that, after installation, your shell is still in the source directory, so 'import carchive' finds the copy in the source tree which doesn't contain the generated files.
> 
>> python -c 'import carchive; print carchive.__file__'
> 
> Will show the path of the module which was imported.
> 



------------------------------

_______________________________________________
Tech-talk mailing list [email protected] https://mailman.aps.anl.gov/mailman/listinfo/tech-talk


End of Tech-talk Digest, Vol 11, Issue 157
******************************************

References:
RE: EpicsQT and Archiver Appliance Andraz Pozar

Navigate by Date:
Prev: RE: EpicsQT and Archiver Appliance Andraz Pozar
Next: Question about autosave ? lzf neu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EpicsQT and Archiver Appliance Andraz Pozar
Next: CA gatway runs away when zero length PV name in UDP search request Shuei YAMADA
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024