Testing: Difference between revisions
Jump to navigation
Jump to search
→Connecting from the local server to local service
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | == Test connectivity to the web service == | ||
find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server | find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server | ||
=== | === Connecting from the local server to local service === | ||
WAN ○ -------> ○ LAN -------> <span style="color:red">● server</span> | WAN ○ -------> ○ LAN -------> <span style="color:red">● server</span> | ||
Line 17: | Line 17: | ||
*** [http://linux.die.net/man/8/ss ss] "utility to investigate sockets" e.g. {{kbd | key = <nowiki>ss -tnlp | grep 80</nowiki>}} or using OR operator<ref>[http://www.thegeekstuff.com/2011/10/grep-or-and-not-operators/ 7 Linux Grep OR, Grep AND, Grep NOT Operator Examples]</ref> {{kbd | key = <nowiki>ss -tnlp | grep '80\|443'</nowiki>}} | *** [http://linux.die.net/man/8/ss ss] "utility to investigate sockets" e.g. {{kbd | key = <nowiki>ss -tnlp | grep 80</nowiki>}} or using OR operator<ref>[http://www.thegeekstuff.com/2011/10/grep-or-and-not-operators/ 7 Linux Grep OR, Grep AND, Grep NOT Operator Examples]</ref> {{kbd | key = <nowiki>ss -tnlp | grep '80\|443'</nowiki>}} | ||
*** [http://linuxcommand.org/man_pages/ps1.html ps] List the current processes. Input {{kbd | key = <nowiki>ps -aux | grep "PORT_NUMBER"</nowiki>}} e.g. {{kbd | key = <nowiki>ps -aux | grep 443</nowiki>}} | *** [http://linuxcommand.org/man_pages/ps1.html ps] List the current processes. Input {{kbd | key = <nowiki>ps -aux | grep "PORT_NUMBER"</nowiki>}} e.g. {{kbd | key = <nowiki>ps -aux | grep 443</nowiki>}} | ||
*** [https://docs.oracle.com/cd/E19504-01/802-5753/6i9g71m3i/index.html netstat Command] {{kbd | key=<nowiki>netstat -tulpn | grep LISTEN</nowiki>}} e.g. | |||
** {{Win}} Using the software [http://www.nirsoft.net/utils/cports.html CurrPorts] to check the process and port. e.g. Apache will not running if the 80 port was occupied by skype<ref>[http://stackoverflow.com/questions/4705005/how-to-solve-wamp-and-skype-conflict-on-windows-7 How to solve WAMP and Skype conflict on Windows 7? - Stack Overflow]</ref>. | ** {{Win}} Using the software [http://www.nirsoft.net/utils/cports.html CurrPorts] to check the process and port. e.g. Apache will not running if the 80 port was occupied by skype<ref>[http://stackoverflow.com/questions/4705005/how-to-solve-wamp-and-skype-conflict-on-windows-7 How to solve WAMP and Skype conflict on Windows 7? - Stack Overflow]</ref>. | ||
<pre> | |||
$ netstat -tulpn | grep LISTEN | |||
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - | |||
// means the 80 port service is running | |||
</pre> | |||
* Is the port opened for external users? OS firewall or protected by antivirus software. | * Is the port opened for external users? OS firewall or protected by antivirus software. | ||
** {{Linux}} | ** {{Linux}} | ||
Line 30: | Line 40: | ||
* double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]] | * double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]] | ||
=== | === Connecting from LAN to the server === | ||
WAN ○ -------> <span style="color:red">● LAN -------> ● server</span> | WAN ○ -------> <span style="color:red">● LAN -------> ● server</span> | ||
Testing on LAN (local network, subnet scope): The different servers between LAN or with the same ip class (ex: 1.2.3.*) may not have the firewall limit. | |||
** | |||
* Is the service alive? | |||
* | * Connect to the internal IP eg: {{kbd | key= telnet 172.18.0.1 23}} (1) IP start with 172.18... is [http://www.itcom.itd.umich.edu/backbone/umnet/privateIP.html Private IP Network Numbers] (2) where 23 is the port number where the service running | ||
* If the local service is web server, you can also try to connect the internal IP e.g. {{kbd | key = <nowiki>lynx http://172.18.0.1</nowiki>}} for {{Linux}} | |||
* Double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]] | |||
=== | === Connecting from WAN to the server === | ||
<span style="color:red">WAN ● -------> ● LAN -------> ● server</span> | <span style="color:red">WAN ● -------> ● LAN -------> ● server</span> | ||
Line 59: | Line 71: | ||
* refresh browser cache: [http://refreshyourcache.com/en/cache/ Refresh your cache - When hitting F5 just isn't enough!] | * refresh browser cache: [http://refreshyourcache.com/en/cache/ Refresh your cache - When hitting F5 just isn't enough!] | ||
== | == Connection test == | ||
=== | === Case 1: Access the server from outside network ex: WAN === | ||
Where are you? Access the server from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN) | Where are you? Access the server from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN) | ||
Open the browser from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN) | |||
* and type the address: {{kbd | key =<nowiki>http://the.domain</nowiki>}} {{exclaim}} Note: Not [https://en.wikipedia.org/wiki/Private_network Private network] / Private IP address | * and type the address: {{kbd | key =<nowiki>http://the.domain</nowiki>}} {{exclaim}} Note: Not [https://en.wikipedia.org/wiki/Private_network Private network] / Private IP address | ||
* or use the remote website monitoring services: [[Web Ping]] | * or use the remote website monitoring services: [[Web Ping]] | ||
Using alternative web services if the Python was installed | |||
* (for python 2.x) {{kbd | key=<nowiki>python -m SimpleHTTPServer <port></nowiki>}}<ref>[https://docs.python.org/2/library/simplehttpserver.html 20.19. SimpleHTTPServer — Simple HTTP request handler — Python 2.7.17 documentation]</ref> | |||
* (for python 3.x) {{kbd | key=<nowiki>python -m http.server <port></nowiki>}}<ref>[https://docs.python.org/3.8/library/http.server.html?highlight=http%20server#module-http.server http.server — HTTP servers — Python 3.8.1 documentation]</ref> | |||
Using telnet client | Using telnet client | ||
Line 79: | Line 95: | ||
# [http://check-host.net/ Check server: Check host - online website monitoring, Check IP] "checks the possibility of a TCP connection to host's specified port from different locations around the world." quoted from website. {{access | date=2015-08-02}} | # [http://check-host.net/ Check server: Check host - online website monitoring, Check IP] "checks the possibility of a TCP connection to host's specified port from different locations around the world." quoted from website. {{access | date=2015-08-02}} | ||
=== | === Case 2: Access the server from inside ex: localhost or Local LAN === | ||
If you has permission to log in the server via SSH or Remote desktop service. | If you has permission to log in the server via SSH or Remote desktop service. | ||
* (1)open the browser, (2)type the address: {{kbd | key = <nowiki>http://127.0.0.1</nowiki> }} | * (1)open the browser, (2)type the address: {{kbd | key = <nowiki>http://127.0.0.1</nowiki> }} | ||
Line 100: | Line 116: | ||
# [http://portforward.com/help/portcheck.htm PFPortCheck Program]: check TCP/UDP port from localhost(where you installed the program) to portforward.com | # [http://portforward.com/help/portcheck.htm PFPortCheck Program]: check TCP/UDP port from localhost(where you installed the program) to portforward.com | ||
# [http://technet.microsoft.com/en-us/sysinternals/bb897437 TCPView for Windows] | # [http://technet.microsoft.com/en-us/sysinternals/bb897437 TCPView for Windows] | ||
== user client node == | == user client node == | ||
Line 115: | Line 129: | ||
* Clear server cache ex: [http://www.smarty.net/manual/en/caching.php Smarty Caching] | * Clear server cache ex: [http://www.smarty.net/manual/en/caching.php Smarty Caching] | ||
==== | ==== Online IDE ==== | ||
[[Programming online (Online IDE)]] | |||
=== browser plug-ins issue === | === browser plug-ins issue === | ||
Line 154: | Line 150: | ||
Modify the following files if you want to test the domain name before the mapping of domain name and ip was changed really | Modify the following files if you want to test the domain name before the mapping of domain name and ip was changed really | ||
* C:\WINDOWS\system32\drivers\etc\hosts for {{win}} XP, Win7<ref>[http://tommy.ironman.tw/windows-7-vista-hosts-error/ Azan 黃贊臣 » 在Windows 7 或 Vista 中修改hosts檔的方法]</ref>, Win 10 & Windows Server 2008 R2 Standard | * C:\WINDOWS\system32\drivers\etc\hosts for {{win}} XP, Win7<ref>[http://tommy.ironman.tw/windows-7-vista-hosts-error/ Azan 黃贊臣 » 在Windows 7 或 Vista 中修改hosts檔的方法]</ref>, Win 10 & Windows Server 2008 R2 Standard | ||
* C:\WINNT\system32\drivers\etc\hosts | * On Windows 2003 server: edit the file located at {{kbd | key=<nowiki>C:\WINNT\system32\drivers\etc\hosts</nowiki>}} | ||
* {{kbd | key=<nowiki>/etc/hosts</nowiki>}} | * On {{Linux}}, input the command {{kbd | key=<nowiki>sudo vi /etc/hosts</nowiki>}} | ||
<pre> | <pre> | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
# ip domain.com | # ip domain.com | ||
</pre> | </pre> | ||
* {{kbd | key=<nowiki>/private/etc/hosts</nowiki> | * On {{Mac}}, input the command {{kbd | key=<nowiki>sudo vi /private/etc/hosts</nowiki>}} <ref>[https://www.tekrevue.com/tip/edit-hosts-file-mac-os-x/ How to Edit the Hosts File on Mac OS X - TekRevue]</ref> | ||
Line 291: | Line 287: | ||
* [http://help.trello.com/article/736-troubleshooting-browser-issues-with-trello Troubleshooting browser issues with Trello - Trello Help] {{access | date = 2017-03-28}} | * [http://help.trello.com/article/736-troubleshooting-browser-issues-with-trello Troubleshooting browser issues with Trello - Trello Help] {{access | date = 2017-03-28}} | ||
* [https://asana.com/guide/help/faq/connectivity Supported browsers and troubleshooting steps for Asana | Product guide · Asana] {{access | date = 2017-03-28}} | * [https://asana.com/guide/help/faq/connectivity Supported browsers and troubleshooting steps for Asana | Product guide · Asana] {{access | date = 2017-03-28}} | ||
* [https://ngrok.com/ ngrok - secure introspectable tunnels to localhost] {{access | date = 2020-02-20}} | |||
{{Template:Build a website}} | {{Template:Build a website}} |