Test Network Connection Between Remote and Instrument Computers » History » Version 19
Anchi Cheng, 06/14/2012 02:46 PM
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 | |
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 | 19 | Anchi Cheng | check if you have [[add host|added hosts]] to the right files on both sides of the connection. |
86 | 18 | Anchi Cheng | |
87 | To confirm what python thinks the hosname is, run the following in python command line: |
||
88 | <pre> |
||
89 | import socket |
||
90 | socket.gethostname() |
||
91 | </pre> |
||
92 | 2 | Amber Herold | ______ |
93 | |||
94 | [[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 >]] |
||
95 | |||
96 | ______ |