Skip to content

Unable to download file from the parse-server #2743

Closed
@swapnilgt

Description

@swapnilgt

I have not marked the above one as complete because I host my parse-server instance on a machine which is accessible using a global domain and not on any infrastructure provider like Heroku or AWS.

Issue Description

I have a parse-server hosted on one of the machines with a locally installed mongodb instance. I have a class which contains File in one of the columns. The problem is that I am unable to download the file using the Parse SDK for Android (I haven't tried with other SDKs yet!). The machine has an apache server installed which listens to the requests using a global domain name and then redirects the requests to the local domain using localhost:<port>. I am able to fetch the data of the ParseObject(s) successfully but when I try to download the file using ParseFile.getDataInBackground(...), after a while I get the following error:

com.parse.ParseRequest$ParseRequestException: i/o failure
                                                                                         at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290)
                                                                                         at com.parse.ParseRequest$2.then(ParseRequest.java:145)
                                                                                         at com.parse.ParseRequest$2.then(ParseRequest.java:139)
                                                                                         at bolts.Task$15.run(Task.java:917)
                                                                                         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                                         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                                         at java.lang.Thread.run(Thread.java:818)
                                                                                      Caused by: java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 9910) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)
                                                                                         at libcore.io.IoBridge.isConnected(IoBridge.java:238)
                                                                                         at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
                                                                                         at libcore.io.IoBridge.connect(IoBridge.java:122)
                                                                                         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
                                                                                         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
                                                                                         at java.net.Socket.connect(Socket.java:882)
                                                                                         at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)
                                                                                         at com.android.okhttp.Connection.connect(Connection.java:152)
                                                                                         at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
                                                                                         at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
                                                                                         at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
                                                                                         at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:332)
                                                                                         at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:500)

I was able to download the files a few releases back for the parse-server, though I don't actually remember the release number.

Environment Setup

  • Server
    • parse-server version : 2.2.21
    • Operating System: 14.04.4 LTS (GNU/Linux 3.13.0-65-generic x86_64)
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Remote Server hosted inside a university. Hosted the mongodb instance on the same machine.
  • Database
    • MongoDB version: v3.0.9
    • Storage engine: mmapv1
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Runs on the same machine as the parse-server.

Logs/Trace

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions