1
我試圖在遠程Linux Amazon AMI服務器上運行Java .jar文件。在本地,當我運行這個Java項目時,建立了一個永久的HTTP連接,並且一切都按預期工作。如果我在我的服務器上運行這個,我會得到一個認證錯誤。我必須通過OAuth1進行身份驗證才能訪問在本地計算機上完美工作的Twitter服務器。我是否必須在服務器上安裝某些東西才能支持OAuth或類似的東西?Java應用程序在不同的服務器上運行時未針對Twitter進行身份驗證
16214 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.DefaultHttpClient - Authentication required
16214 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.DefaultHttpClient - userstream.twitter.com:443 requested authentication
16214 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
16214 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for negotiate authentication scheme not available
16215 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
16215 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
16215 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
16215 [hosebird-client-io-thread-0] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
16215 [hosebird-client-io-thread-0] WARN com.twitter.hbc.httpclient.ClientBase - hosebird-client-0 Error connecting w/ status code - 401, reason - Unauthorized
當你在本地運行什麼是有關此日誌有什麼不同?找出差異,你可能會發現問題。 –
@JimGarrison本地沒有驗證錯誤... –
從本地嘗試發佈相同的日誌。 –