我正在尝试在我的远程 Linux Amazon AMI 服务器上运行 Java .jar 文件。在本地,当我运行这个 Java 项目时,会建立一个永久的 HTTP 连接,并且一切都按预期工作。如果我在我的服务器上运行它,我会收到一个身份验证错误。我必须通过 OAuth1 进行身份验证才能访问在我的本地计算机上完美运行的 Twitter 服务器。我是否必须在我的服务器上安装一些东西才能支持 OAuth 等?
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