[RESOLVED] Copying large files across the network stops

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

June 9, 2020 - 7:31 PM

Hello, we tried to create a package for a business software suite, similar to the Adobe suite. The problem we encountered is that the installation is very large, so to manage any updates or bug fixes, we had to put everything on a NAS (via an SMB3 network share).
The current problem is that the installation fails because the folder is never completely copied to the client machine's location. We tried using Copytree and filecopy2 without success. Only `run_powershell copy-item` seems to work better, but it doesn't (sometimes Wapt completely skips the command line and copies nothing). :x

Wapt: 1.8.1
WaptServer: Debian 10
ConsoleWapt: Windows 10
Last edited by d3sys on 01 Oct 2020 - 20:14, edited 1 time.
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

June 9, 2020 - 9:10 PM

d3sys wrote: June 9, 2020 - 7:31 PM Hello, we tried to create a package for a business software suite, somewhat like the Adobe suite. The problem we encountered is that the installation is very large.
The largest package we know of is a National Instruments Labview with lots of modules, around 70GB, distributed using the classic method via a web download.

I advise against distributing your packages via SMB (see https://www.wapt.fr/fr/doc/wapt-common- ... takes.html), it's ugly.

There's no reason why you shouldn't be able to do it. Check your web server logs to see why it's blocking; you must have a technical limitation somewhere that you'll need to change.

Sincerely.

Vincent
Vincent CARDON
Tranquil IT
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

June 10, 2020 - 01:56

vcardon wrote: June 9, 2020 - 9:10 PM I advise against distributing your packets via SMB (see https://www.wapt.fr/fr/doc/wapt-common- ... takes.html), it's ugly.

Regards,

Vincent
Thanks for the link, but I'd already read it. The problem is that the documentation, while well-written and well-thought-out, is very brief and rather short when it comes to package creation. Most of the functions explained concern file manipulation, and what could be simpler than SMB for that?.

- Now this means we need to install a web server on the WAPT server. The question is: how do we code this cleanly to transfer an entire folder (approximately 80GB) after installation into our app's folder, and then launch the patches to be applied according to the user?
- The documentation (unless I missed it) didn't dwell much on file exchanges via WebServer, we don't know if it's a good idea to launch a Web server on the WAPT server.
- Does WAPT handle recovery in case of an HTTP/FTP connection failure?
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 10, 2020 - 08:51

d3sys wrote: June 10, 2020 - 01:56 - Now this means that we need to install a web server in the WAPT server.
Wapt is already a web server that hosts Wapt packages. You don't need to install anything else.
d3sys wrote: June 10, 2020 - 1:56 AM The question is: how to properly code this to transfer an entire folder (approx. 80GB) after installation into our app's folder, and then launch the patches to be applied according to the user?
- The documentation (unless I missed it) didn't go into much detail about file exchanges via WebServer; we don't know if it's a good idea to run a web server on the WAPT server.
You just need to place the folder in your package

Code: Select all

c:\waptdev\tis-copyfile
Then in the package:

Code: Select all

def install():
    copytree2('sources','C:\\projet')

https://doc.tranquil.it/wapt/fr/doc/wap ... -directory

For code within the user session:

https://doc.tranquil.it/wapt/fr/doc/wap ... index.html
d3sys wrote: June 10, 2020 - 1:56 AM - Does WAPT handle recovery in case of an HTTP/FTP connection failure?
Yes, absolutely
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

June 10, 2020 - 2:25 PM

sfonteneau wrote: June 10, 2020 - 08:51 Wapt is already a web server that hosts Wapt packages. You don't need to install anything else.

You just need to place the folder in your package

Code: Select all

c:\waptdev\tis-copyfile
Then in the package:
That's precisely what we want to avoid. It took us almost 24 hours to send a 5GB package, and as for editing, well, don't even get me started. Imagine the urgent need to correct a programming error while it takes to download the file again before and after editing! That's why we opted for file sharing, which means the packages are much smaller (in kilobytes!) and there are no lengthy transfers just for a single code modification.
Unless we do it really wrong (by the way, we're programmers but not in Python) :geek: So we're still learning! Which I would truly understand... so I'm asking for clarification, our understanding is failing...
We have another problem with this method: during installation, subfolders don't seem to be taken into account. So I'd like to revert to a more practical (cleaner) method :roll: ) but which works effectively right away. So where is our mistake? :|
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

June 10, 2020 - 4:25 PM

Vincent CARDON
Tranquil IT
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 10, 2020 - 9:32 PM

d3sys wrote: June 10, 2020 - 2:25 PM That's precisely what we want to avoid. It took us almost 24 hours to send a 5GB package
, and as for editing, well, don't even get me started. Imagine the urgent need to correct a programming error while it takes to download it again before and after editing? That's why we opted for file sharing, and as a result, the packages are much smaller (in kilobytes!) and there are no lengthy transfers just for a single code modification.
24 hours. It's really not Really That's not normal, is the server in the cloud or on the same local network?
d3sys wrote: June 10, 2020 - 2:25 PM We have another problem with this method: during installation, subfolders do not seem to be taken into account.
I just did a test with copytree2('sources','C:\\projet')

The subfolders are copied correctly

To put it simply, we use the "everything in the package" method precisely to avoid problems during installation. Copying errors, timeouts, network unavailability, etc...

There is also a security aspect; if everything is in the package, then everything is signed; if it is not in the package, then wapt cannot guarantee the integrity of the files since they are not in the package manifest.

For me, we need to check why your upload is so slow! Is it a bandwidth issue or something else?
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

June 11, 2020 - 09:07

vcardon wrote: June 10, 2020 - 4:25 PM https://www.wapt.fr/fr/doc/wapt-common- ... repository ?

+

https://winscp.net/eng/docs/task_synchronize

will resolve your issue.

Regards,

Vincent
Thanks for the reminder. Not wanting to seem unpleasant or too stubborn, I returned with my team with better intentions... to start all over again with this valuable information...
Using WinSCP, upload your package to the /var/www/html/wapt/ directory on your Linux server.

Once the transfer is complete, you need to regenerate the Packages file in your repository:

wapt-scanpackages /var/www/wapt/
We upload/synchronize in www/html/wapt then we scan the packets contained in www/wapt/ Is this a mistake?



sfonteneau wrote: June 10, 2020 - 9:32 PM 24h This is really, really not normal
That's what we told ourselves... :( :cry: But apart from server overload (100 simultaneous users on average) I don't see what could cause this, hence the decentralization decision.
sfonteneau wrote: June 10, 2020 - 9:32 PM Is the server in the cloud or on the same local network?
The server is a Proxmox VM on a gigabit local network.

But the given solution, while it fixes the upload problem after build, does not completely solve the download problem for editing.
Let me explain:
- I understand that the files are always local and synchronized on the server.
- but
1- Each time the scripter is edited or launched, the last used setup is opened even if the package being edited is changed
2- The package version in control must therefore be updated manually (this must be specified in the documentation)
So, two easy sources of error... to err is human.
Don't you have a way to automate this process for large packages that need to be integrated/synchronized externally? (Nooo, we're not lazy!) :roll: just computer scientists in a room resembling an Egyptian tomb with a multitude of swords of Damocles :oops: just above our 3 cm of hair... :cry: (and time is against us...)
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

June 11, 2020 - 09:41

If I understand correctly, what might help you would be to split your package into two parts.
On one side, the "heavy" files, and on the other, the scripts or configuration files that you need to modify frequently?
Then, make the package with the heavy files a dependency.

This way, you can quickly edit the package containing the scripts and configuration files, and it would also solve your problem with the subversion number incrementing automatically.
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

June 11, 2020 - 12:12

florentR2 wrote: June 11, 2020 - 09:41 And put the package with the large files as a dependency.
Excellent idea, I hadn't thought of that. Yes, that's what needs to be done.

Vincent
Vincent CARDON
Tranquil IT
Locked