Closed tcase closed 3 years ago
Hi Travis -
Hmm, that's interesting. Can you confirm that the preference under the General tab for "Enable FlexLogger to receive remote automation commands" is on? And was there a project open in FlexLogger when you called get_active_project()?
Thanks!
Greg Stoll FlexLogger R&D
Yes I can confirm both of those conditions are true
Hmm, OK. Do you see the same behavior if you try to call Application.launch() and then get_active_project()? And what about if you call open_project() instead of get_active_project()?
Thanks!
Greg Stoll FlexLogger R&D
I tried this internally and it works, so I'm guessing something about our machine setups is different.
One possibility is that your machine is using a proxy; can you try putting the following code before the call to Application()?
if os.environ.get('https_proxy'):
del os.environ['https_proxy']
if os.environ.get('http_proxy'):
del os.environ['http_proxy']
Another possibility is that the client is trying to connect over IPv6 instead of IPv4. We can try changing line 119 in _application.py from
self._channel = insecure_channel("localhost:%d" % self._server_port)
to
self._channel = insecure_channel("127.0.0.1:%d" % self._server_port)
Let me know if you're able to try these!
Greg Stoll FlexLogger R&D
We are using a proxy on our hosts and it looks like removing that is fixing the problem. not sure why thats happening as the proxy should not be messing with localhost connections.
ok i think I figured out the proxy issue, I need to change our env var from:
os.environ['no_proxy'] = 'intel.com,127.0.0.1' to os.environ['no_proxy'] = 'intel.com,127.0.0.1,localhost'
thanks for your help @gregstoll !
@gregstoll can we get a note added to the documentation to say that ni is using http traffic and honors proxy env vars related to that?
Yes, that's a good idea. I also wonder if we should be using 127.0.0.1
instead of localhost
in our code, which I'm guessing would have avoided this issue.
Running the code below I get the following error - flexlogger version 2021 R1 Build number 8.4.0.49979:
"C:\ProgramData\National Instruments\FlexLogger\LastAutomationPort.txt" contains: 49793