It is not easy to troubleshoot a wireless fault.

Source: Internet
Author: User
Tags app service


This article does not aim to explain how difficult the problem is to be solved, but provides several ideas and methods to solve the problem of connecting the app to the server.


The R & D personnel reported that a mobile app service could not be refreshed in 3G networks. It is a service connected to the test environment and works normally through the office network and WiFi.


R & D personnel think it may be due to a problem in the 3G network or the IDC where the server is located. The problem has occurred for some time.


How amazing? I have to check for 30 years of special cases ~


Find an Android phone and install the SSH terminal Simulator app. You want to directly connect to the network for testing.


Ping indicates that the network is connected and the telnet service port is not allowed.

When you want to simulate a request through curl, it is too painful to enter a long command on the keyboard of your mobile phone.

I also asked my colleagues to use a Bluetooth keyboard to input it. I found it was really feasible. It was just a keyboard used by people to work. I cannot borrow it for a long time.


It's better to use a mobile phone as a mobile hotspot and use a computer to access the Internet through a mobile phone.

In fact, you can also use a 3G network card. I only have one, but it is stored at home and cannot be tested.


The connection to the hotspot is successful, and it is much easier to use the keyboard.

Ping more than 3000 ms, slow, packet loss, timeout, the 3G network quality in the office is indeed poor. Isn't it caused by network quality or speed problems?

Tracert, 16 hop, intermittent, multi-point timeout, but can pass.


Only tcpdump


It is not possible to stare at the port. The noise is too high, so that the IP address can be clean and accurate. How can we find the IP address of the mobile phone?


You can access an IP address to query a website, such as www.ip138.com. The local IP address is displayed on the page. Fortunately, the above is the computer connected to the hotspot network, the browser can also use.

Another safe method is to first connect to an unattended port on the server, and then find the IP address through the tcpdump port on the server.

I used both of them and found that the webpage method was correct.


It is much easier to find the IP address. When tcpdump the Host IP address and port capture packets, it is found that the three handshakes with the service are not completed, and only the SYN and ACK are received.

650) This. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>

Then tcpdump the Host IP address and port 80. Three handshakes can be completed normally.


Is there a problem with the service program and network connection handling? Otherwise let the development debug?

Another thought is wrong. There is only SYN, and no ACK is more likely to be caused by server rejection, which may be a firewall problem.

I checked the iptables configuration and found several accept and a drop

The rule is to allow Intranet and office network access. The IP address you just found is not an office network IP address, so it is definitely not accessible.


Remove the drop rule and Test Access OK. The problem is solved ~


Originally, the firewall rules were developed to ensure the security of the test environment. I did not expect a problem during the 3G network connection test.


R & D personnel suggested why WiFi can be used again. Hey hey, the office network egress IP address is also used for WiFi outlets.


Several ideas and methods mentioned above:

1. Terminal Simulator app

2. Bluetooth keyboard

3. 3g hotspot or 3G Nic test network problems

4. IP address Search Method

5. tcpdump analyzes Network Operations

6. I told you about the IP address of the Wi-Fi egress.


By the way

The terminal simulator supports many commands,

It's really a mini Linux

Enter/system/bin/ls

The supported commands are displayed.


This article from the "Zhang Guanshi technology blog" blog, please be sure to keep this source http://gavins.blog.51cto.com/2315765/1436040

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.