2017-04-06 103 views
1

我試圖發送命中谷歌分析測量協議並獲取超時異常。點擊發送捲曲庫,我試圖增加超時,但它沒有幫助。此問題隨機出現谷歌分析測量協議超時

* Connection #7 to host www.google-analytics.com left intact  
https://www.google-analytics.com/collect?tid=UA-61364284-1&geoid=1011969&cm=cpc&cs=smi&cn=1322_5&ul=ru-ru&t=pageview&v=1&dl=http%3A%2F%2Fnominaltechno.ru&cid=a4788d46-3628-4132-a5d9-505201581b59&ua=Mozilla%2F5.0%20%28X11%3B%20Linux%20i586%3B%20rv%3A31.0%29%20Gecko%2F20100101%20Firefox%2F31.0&sc=start&qt=5688590  
* Hostname was found in DNS cache  
* Trying 172.217.20.206...  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* connect to 172.217.20.206 port 443 failed: Connection timed out  
* Trying 2a00:1450:401b:803::200e...  
* Immediate connect fail for 2a00:1450:401b:803::200e: Network is unreachable  
* Failed to connect to www.google-analytics.com port 443: Connection timed out  
* Closing connection 8 

任何人都可以解釋是什麼引起的問題?感謝答案

回答

1

我只是想你對調試端點請求

https://www.google-analytics.com/debug/collect?tid=UA-61364284-1&geoid=1011969&cm=cpc&cs=smi&cn=1322_5&ul=ru-ru&t=pageview&v=1&dl=http%3A%2F%2Fnominaltechno.ru&cid=a4788d46-3628-4132-a5d9-505201581b59&ua=Mozilla%2F5.0%20%28X11%3B%20Linux%20i586%3B%20rv%3A31.0%29%20Gecko%2F20100101%20Firefox%2F31.0&sc=start&qt=5688590  

響應:

{ 
    "hitParsingResult": [ { 
    "valid": true, 
    "parserMessage": [ ], 
    "hit": "/debug/collect?tid=UA-61364284-1\u0026geoid=1011969\u0026cm=cpc\u0026cs=smi\u0026cn=1322_5\u0026ul=ru-ru\u0026t=pageview\u0026v=1\u0026dl=http%3A%2F%2Fnominaltechno.ru\u0026cid=a4788d46-3628-4132-a5d9-505201581b59\u0026ua=Mozilla%2F5.0%20(X11%3B%20Linux%20i586%3B%20rv%3A31.0)%20Gecko%2F20100101%20Firefox%2F31.0\u0026sc=start\u0026qt=5688590" 
    } ], 
    "parserMessage": [ { 
    "messageType": "INFO", 
    "description": "Found 1 hit in the request." 
    } ] 
} 

它告訴我們它的有效打擊。然後我把它放入一個瀏覽器(chrome),它返回了正確的gif。你可能剛剛看到來自丹麥的是我的一擊。

我覺得你的捲曲設置有一些東西。

捲曲的錯誤主機名的DNS緩存未找到:捲曲無法連接到該主機的TCP端口號80

+0

不要以爲它捲曲的設置問題,因爲一些請求到達目的地,我也嘗試發送命中來調試端點和通過控制檯,這是好的 '$ ch = curl_init($ url); curl_setopt($ ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ ch,CURLOPT_CONNECTTIMEOUT,200); curl_close($ ch);' 我也嘗試通過Guzzle庫發送請求,但它沒有幫助 –

+0

您是否嘗試過將您的請求置於簡單的瀏覽器中?它只是一個http調用。我認爲你應該包括你在問題中使用的所有代碼,我很樂意從我的結尾進行測試。該調用不起作用,這是一個Curl錯誤。 – DaImTo

+0

是的,我試圖通過簡單的瀏覽器提出請求,它是好的,謝謝你的回答,我會嘗試檢查捲曲設置 –