简体   繁体   English

在使用openstack.net在机架空间云中上传云文件时,我得到了net.openstack.Core.Exceptions.Response.BadServiceRequestException

[英]while uploading a cloudfile in rackspace cloud using openstack.net i get net.openstack.Core.Exceptions.Response.BadServiceRequestException

While uploading a file to rackspace cloud using the CreateObjectFromFile method from my local machine, it goes though fine. 从我的本地计算机使用CreateObjectFromFile方法将文件上传到机架空间云时,一切正常。 but when i do it from a client machine i get net.openstack.Core.Exceptions.Response.BadServiceRequestException. 但是当我从客户端计算机上执行此操作时,我会收到net.openstack.Core.Exceptions.Response.BadServiceRequestException。

ContainerID: 1644 
srcfileName: \\10.5.48.2\XMLGateway\BOOutBox\PJR340131023160359529217.xml 
desfileName: 1644_PJR340131023160359529217.xml

cloudFilesProvider.CreateObjectFromFile(inStrContainerID, inStrSrcFilePath, strDesFileName);

I checked for documentation on this exception and i cannot find anything useful. 我检查了有关此异常的文档,但找不到任何有用的东西。

EDIT: here is the error stack 编辑:这是错误堆栈

net.openstack.Core.Exceptions.Response.BadServiceRequestException: Invalid request body: unable to parse Auth data. Please review XML or JSON formatting.
at net.openstack.Providers.Rackspace.Validators.HttpResponseCodeValidator.Validate(Response response)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.ExecuteRESTRequest[T](CloudIdentity identity, String urlPath, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Boolean isRetry, Boolean isTokenRequest, String token, Int32 retryCount, Int32 retryDelay, Func`7 callback)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.ExecuteRESTRequest[T](CloudIdentity identity, String urlPath, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Boolean isRetry, Boolean isTokenRequest, String token, Int32 retryCount, Int32 retryDelay)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.<>c__DisplayClassc.<GetUserAccess>b__b()
at net.openstack.Core.Caching.UserAccessCache.<>c__DisplayClassc.<Get>b__4(String k)
at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
at net.openstack.Core.Caching.UserAccessCache.Get(String key, Func`1 refreshCallback, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.GetUserAccess(CloudIdentity identity, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.CloudIdentityProvider.GetUserAccess(CloudIdentity identity, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.ProviderBase`1.GetServiceEndpoint(CloudIdentity identity, String serviceName, String region)
at net.openstack.Providers.Rackspace.ProviderBase`1.GetPublicServiceEndpoint(CloudIdentity identity, String serviceName, String region)
at net.openstack.Providers.Rackspace.CloudFilesProvider.GetServiceEndpointCloudFiles(CloudIdentity identity, String region, Boolean useInternalUrl)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObject(String container, Stream stream, String objectName, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObjectFromFile(String container, String filePath, String objectName, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at ?.?.?(String ?, String ?, String ?, String ?, String ?, String& ?, Boolean& ?, String& ?)

Edit 2: Ok after updating the dll to the new versions, this is the stacktrace: 编辑2:将dll更新到新版本后,可以,这是stacktrace:

Unable to connect to the remote server
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.203.3.30:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.<>c__DisplayClass6.<Stream>b__5(HttpWebRequest req)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.<>c__DisplayClass9.<ExecuteRequest>b__8()
at JSIStudios.SimpleRESTServices.Client.RequestRetryLogic.Execute(Func`1 callback, IEnumerable`1 non200SuccessCodes, Int32 retryCount, Nullable`1 retryDelay)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.ExecuteRequest(Uri url, HttpMethod method, Func`3 responseBuilderCallback, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Func`2 executeCallback)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.Stream(Uri url, HttpMethod method, Func`3 responseBuilderCallback, Stream content, Int32 bufferSize, Int64 maxReadLength, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Action`1 progressUpdated)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.Stream(Uri url, HttpMethod method, Stream content, Int32 bufferSize, Int64 maxReadLength, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Action`1 progressUpdated)
at net.openstack.Providers.Rackspace.ProviderBase`1.StreamRESTRequest(CloudIdentity identity, Uri absoluteUri, HttpMethod method, Stream stream, Int32 chunkSize, Int64 maxReadLength, Dictionary`2 queryStringParameter, Dictionary`2 headers, Boolean isRetry, RequestSettings requestSettings, Action`1 progressUpdated)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObject(String container, Stream stream, String objectName, String contentType, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObjectFromFile(String container, String filePath, String objectName, String contentType, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at ?.?.?(String ?, String ?, String ?, String ?, String ?, String& ?, Boolean& ?, String& ?

So does have to do with with firewall settings on the client machine? 那么,与客户端计算机上的防火墙设置有关吗?

A newer release of the SDK is available through NuGet. 可通过NuGet获得较新版本的SDK。 Two of the many changes included in that release are the following: 该版本中包含的许多更改中的两项如下:

  1. Removed GeographicalCloudIdentityProvider (a class only used inside the SDK itself, nevertheless this is the part of your stack trace that indicated you were using an old version of the SDK) 删除了GeographicalCloudIdentityProvider (仅在SDK本身内部使用的类,不过这是堆栈跟踪的一部分,指示您正在使用旧版本的SDK)
  2. Added the ability for ResponseException (the base class of BadServiceRequestException and several others) to include detailed information about the cause of the problem as part of the exception. 添加了ResponseExceptionBadServiceRequestException和其他几个基类)的功能,以将有关问题原因的详细信息作为异常的一部分包括在内。

(Applies to openstack.net 1.2.x only): Due to a limitation in the SDK dependencies that we are working to resolve ASAP, you'll need to explicitly install one of the SDK dependencies before installing the SDK. (仅适用于openstack.net 1.2.x):由于我们正在努力解决的SDK依赖关系中的限制,因此在安装SDK之前,您需要显式安装其中一个SDK依赖关系。 The instructions for this are included in the comment marked UPDATE on the following page: openstacknetsdk/openstack.net#203 有关说明,请参见以下页面上标有UPDATE的注释: openstacknetsdk / openstack.net#203

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用openstack.net对Rackspace上的云文件验证受限用户 - Authenticating restricted user to Cloud Files on Rackspace using openstack.net 如何使用openstack.net从Rackspace上的CloudFiles获取jpg文件 - How to get jpg file from CloudFiles on Rackspace using openstack.net 使用伦敦帐户通过openstack.net API云文件进行身份验证 - Authenticating with openstack.net API cloud files using London account 如何使用OpenStack.NET创建新服务器 - How to create a new server using OpenStack.NET 如何使用openstack.net在rackspace CloudFiles容器中创建Content-Type“application / directory”对象? - How to create an object with Content-Type “application/directory” inside a rackspace CloudFiles Container with openstack.net? Openstack.Net SDK无法访问服务 - Openstack.Net SDK cannot access services Rackspace Cloud Files(OpenStack Swift)在vb.net中的TempUrl示例 - Rackspace Cloud Files (OpenStack Swift) TempUrl Example in vb.net Openstack.Net SDK无法访问具有区域的服务 - Openstack.Net SDK cannot access service with region 使用Lucene,Solr或elasticsearch索引Amazon S3,Rackspace云文件或OpenStack SWIFT - Using Lucene, Solr or elasticsearch to index Amazon S3, Rackspace Cloud Files or OpenStack SWIFT 如何使用 Horizo​​n 或 Openstack 客户端获取 openstack 版本? - How to get openstack version using Horizon or Openstack client?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM