Search Unity

Question "Connection Successful" but can't download (using Accelerator)

Discussion in 'Unity Accelerator' started by hieuletrung0701, Jul 27, 2022.

  1. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    Hi, I'm having problem with Unity Accelerator. I did connected to the cache server from 2 machine (Windows and Linux), and can upload to the server, but I can't download anything from the cache server, it just run the importing.
    Here are the setup and step I did:

    Set up:
    • Cache server (Accelerator): try both Windows 10 and Ubuntu 18.04
    • The 2 machine running Unity: Windows 10
    • Using the same local network
    • Connect to the cache server by Edit -> Project Settings -> Editor -> Cache Server session -> setup like the image below
    Step:
    1. 1st machine import -> some MB show up in the dashboard
    2. 1st machine push to GitLab (via SourceTree)
    3. 2nd machine pull from GitLab (via SourceTree)
    4. 2nd machine open unity
    5. And it always do the importing, not even once do the downloading
    Here are the log file from Accelerator (install on Windows 10) and dashboard. Thanks in advance, I would really appreciate your replies.

    Edit 1: Here is the log file from linux server
     

    Attached Files:

    Last edited: Jul 28, 2022
  2. unity_Jonny

    unity_Jonny

    Unity Technologies

    Joined:
    Feb 11, 2020
    Posts:
    24
    Hi, can you post the Editor.log file from %LOCALAPPDATA%\Unity\Editor\Editor.log
    This will show if the Editor is trying to download from the cache
     
  3. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    Hi, I'm sorry for replied too late.
    Unfortunately, I can't give you that Editor.log, because it contain information about our project. But I have repeat the same steps that I do and give you this Editor.log.

    I have discovered what I have doing wrong:
    1. When I set up the cache server on Windows 10. I also use it to store the 2 unity projects and when I try downloading from cache server on project 2, the connection is aborted, so my friend think that it's because the same port is used by two program (cache server and project 2) cause the error. So we put the server on a linux machine (Ubuntu 18.04 like the doc said).

    2. When we install the Accelerator, we did uncheck the registration (Collaborate), but in the dashboard, it enable the Collaborate. And that was the issue, hence we disable it. And now the accelerator is some how working, but not as what we expected.

    3. I didn't copy the meta file on project 1 to project 2 (see steps below and you will undenstand). Hence the hash of the source on project 2 is different on project 1 (I think the GUID is the different one), so it query the wrong key to the cache server, so nothing is downloaded to project 2, and the imported file is uploaded to cache server (because unity think it's is a different file for being different in GUID).

    So it only works (downloading file for 2nd project) when I:
    1. Import the source file on project 1, let's call it img1.png
    2. Manually copying img1.png and its meta file to project 2 in Windows Explorer

    And it won't work when I:
    1. Import the source file on project 1, let's call it img2.png
    2. Push img2.png and its meta file to GitLab (via SourceTree)
    3. Pull commit (img2.png and its meta file) onto project 2

    I looked into the Editor.log and found that the query key is the same when upload and querying. But when:
    1. Manually copying: the key of Artifact and Metadata is the same when unity upload and querying, so unity did download from cache server
    2. Using git: the key of Artifact and Metadata is not the same when upload and querying, so unity think that it's a different asset, hence it imported the asset and uploaded the imported asset to the cache server.

    I don't know why using git doesn't work, I hope that you guys can help me, I'm looking forward for your answer. And I think that there is so little information about this really really really great cache server (20 minutes importing decrease to 5 minutes is awesome), it'll be great if the documentation will be having a lot more things in it.

    Thank you.
     

    Attached Files:

  4. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    Oh and I find it really confusing to understand all the things in the dashboard, the image below is the current state of my dashboard.
    For example:
    1. Why the "Time Saved by Accelerator" is 0, isn't it the time difference between importing and downloading from cache server. And why did "Time Spent Serving from cache" is increasing instead of "Time Saved by Accelerator".

    2. In the Configuration/Data Policy, what does "Disk Space Usage: Cannot use 1.1 GB" means? Is it "Cannot use when there is 1.1 GB left" or something else?

    Cache server is a great thing, and it'll be more great if the documentation is longer and specific. I don't mind long documentation, I just mind having too little information about what I need. Anyway, thanks very much for your effort of making Cache Server, I really appreciate it.
     

    Attached Files:

  5. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    Hi, it's been a while, so I'm wondering if you guys find what cause the problem. Thanks
     
  6. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    For those who face the same problem like me, I finally got git to work with Accelerator.
    It was because line ending is being changed after commit.

    I'll will post some more specific on how did I solve this issues. Here's some link that I have read:
    Edit 1: Sorry, I was wrong, line ending did not change after commit, but it was changed when checkout (pull, checkout branch,...)
     
    Last edited: Aug 18, 2022
  7. hieuletrung0701

    hieuletrung0701

    Joined:
    Apr 19, 2022
    Posts:
    6
    Hi, for those who are interested on how I solved line ending (eol) problem.

    Here is my .gitattribute file, it'll overwrite git's config on how git will process the eol. I have tested it and it work fine, though there is unexpected result, it's .bytes file still not downloaded from the cache server, and I don't know why because I can't check its eol since it's a binary file.

    I have setup the text files to have eol being normalized base on the OS (code and other texts) because we have Windows machine and a Mac machine (for building iOS app), so I still let git modifies the eol because I was worrying if eol don't match the OS, something wrong might happen, if someone know how to setup eol when using cache server on cross OS, please let me know, I'll be really appreciate it.

    Also, as I have mention in the file, I don't know why Unity keep using eol LF on some file types when the project is on Windows machine. Please tell me if you have any idea about this.

    And I'll be really glad if I can hear some feedbacks about this .gitattribute file, thanks you for reading.
     

    Attached Files: