Project

General

Profile

Test Network Connection Between Remote and Instrument Computers » History » Version 18

Anchi Cheng, 06/03/2011 10:05 AM

1 1 Amber Herold
h1. Test Network Connection Between Remote and Microscope Computers
2
3
4
5 14 Amber Herold
By far the biggest installation problem comes from network connection is block at the microscope computer from the remote computer where the main Leginon program is run. Here is a test to do before trying to start leginon operation at the remote computer. Leginon bulletin board has a thread that has  "various problems and solutions":http://emg.nysbc.org/boards/6/topics/3  from users.
6 1 Amber Herold
7
8
9
h2. Start a Test Launcher on the Microscope Computer
10
11
12
13 11 Amber Herold
#  scope> go to the location where Leginon is installed, generally
14 7 Amber Herold
 <pre>C:\Python25\Lib\site-packages\Leginon\</pre>
15 11 Amber Herold
#  scope> double click on test1.py. You should see something like this:
16
<pre>INFO localtransport server created at location {'instance': <localtransport.Server object at 0x40e614cc>}
17 1 Amber Herold
INFO tcptransport server created at location {'hostname': 'myscope', 'port': 49152}
18
INFO <class 'event.SetManagerEvent'> binding added for destination myscope, method <function printData at 0x40e63c34>
19
ACCEPTING CONNECTIONS AT:  myscope:49152
20 11 Amber Herold
hit enter to kill
21
</pre>
22 1 Amber Herold
**If the line before last says ACCEPTING CONNECTIONS ...., you have an opened port on this host.
23 11 Amber Herold
&nbsp;
24
# Write down the name of the hose, in this case "myscope", and the opened port, in this case "49152", and proceed to try to connect to that computer from the remote compute in the next step.
25 1 Amber Herold
26
27 6 Anchi Cheng
h2. Attempt Connection from the Remote Computer
28 1 Amber Herold
29
30 11 Amber Herold
#  remote linux computer> go to the location where Leginon is installed, type the following to find the location:
31 1 Amber Herold
 <pre>start-leginon.py -v</pre>
32 11 Amber Herold
#  remote linux computer> start the 2nd test script with the host name of the microscope computer and its open port
33
<pre>
34
remote linux computer/Leginon>test2.py myscope 49152
35
</pre>
36 1 Amber Herold
You should see something like this:
37 11 Amber Herold
<pre>
38
INFO localtransport server created at location {'instance': <localtransport.Server object at 0x2b08e0d43810>}
39 1 Amber Herold
INFO tcptransport server created at location {'hostname': 'myremote', 'port': 49152}
40
ACCEPTING CONNECTIONS AT:  myremote:49152
41
INFO <class 'event.NodeAvailableEvent'> binding added for destination myremote, method <function printData at 0x2b08e0d51c80>
42
CONNECTING TO:  myscope:49154
43
WARNING localtransport client add failed
44
INFO tcptransport client added
45 3 Anchi Cheng
INFO server location set to to {'TCP transport': {'hostname': 'myscope', 'port': 49154}}
46
hit enter to kill
47
48 1 Amber Herold
INFO handling threaded
49
INFO inserted in queue (class NodeAvailableEvent)
50
INFO <class 'event.NodeAvailableEvent'> handling destination defcon1, method <function printData at 0x2b08e0d51c80>
51
REMOTE CLIENT RESPONDED:  myscope:49154
52
</pre>
53
54
55
If you get the last line "REMOTE CLIENT RESPONDED" with correct hostname and port, the
56
connection is fine. You can go to next section to test Leginon run on the remote
57
computer.
58
59 17 Anchi Cheng
You can ignore the following error message print out in test1.py on the microscope PC when you exit it.
60
<pre>
61
tcptransport.TransportError: No route to host
62
</pre>
63 1 Amber Herold
64
h2. Problem solving tips
65
66
67 15 Amber Herold
*  See Leginon bulletin board thread on "network problem, Leginon not seeing tecnai host":http://emg.nysbc.org/boards/6/topics/3
68 1 Amber Herold
69
70
71
72
h2. Most likely reason for the failure of the test: FIREWALL
73
74
75
76 7 Amber Herold
*  The easiest solution is have the involving computers inside the same firewall.
77 1 Amber Herold
78
79 16 Amber Herold
*  Alternatively, you can [[Test Network Connection Between Remote and Microscope Computers|open specific ports for Leginon system]] as described in the Leginon bulletin board thread on "network problem, Leginon not seeing tecnai host":http://emg.nysbc.org/boards/6/topics/3
80 1 Amber Herold
81
82
83
h2. Another possible reason for the failure of the test: HOST file requirement
84
85 7 Amber Herold
h4. Try add the client host in your host file on the main Leginon computer, and vice versa.
86 1 Amber Herold
87
Modify your host file to include the host (Create it if not exist).
88
89
*  On Linux, this file is
90 10 Amber Herold
> /etc/hosts
91 1 Amber Herold
92
93
*  On Window XP, this file is
94 10 Amber Herold
> C:\\WINDOWS\system32\drivers\etc\hosts
95 1 Amber Herold
96
97 2 Amber Herold
*  On Window NT, this file is
98 10 Amber Herold
> C:\\WINNT\system32\drivers\etc\hosts
99 2 Amber Herold
100 18 Anchi Cheng
h4. The Linux main Leginon computer also needs to identify itself by its hostname registered on Microscope Windows computer.
101 2 Amber Herold
102 18 Anchi Cheng
You can modify it using the "hostname" command.
103
104
To confirm what python thinks the hosname is, run the following in python command line:
105
<pre>
106
import socket
107
socket.gethostname()
108
</pre>
109 2 Amber Herold
______
110
111
[[Test Leginon on the Computer Controlling the Microscope|< Test Leginon on the Computer Controlling the Microscope]] | [[Run Leginon Client on the Microscope Computer|Run Leginon Client on the Microscope Computer >]]
112
113
______