abhinavcreed13 / docker-load-balancer-ec2

The idea is to design a load balancer using Docker Swarm that can distribute the load on different worker machines, based on the inter-arrival of requests.
https://abhinavcreed13.github.io/blog/docker-swarm-amazon-ec2-aws/
MIT License
0 stars 2 forks source link

docker-project-aws.zip has no END header #1

Closed alaiavee closed 2 hours ago

alaiavee commented 2 hours ago

FYI, trying to follow the great guide you wrote on your blog (https://abhinavcreed13.github.io/blog/docker-swarm-amazon-ec2-aws/); and at step 6 I'm hitting a road block with the zip not having an END header. So maybe the file is corrupt now?

[ec2-user@ip-172-31-36-120 ~]$ ls -al
total 300
drwx------ 4 ec2-user ec2-user    118 Nov 16 00:12 .
drwxr-xr-x 3 root     root         22 Nov 15 23:00 ..
-rw-r--r-- 1 ec2-user ec2-user     18 Jul 15  2020 .bash_logout
-rw-r--r-- 1 ec2-user ec2-user    193 Jul 15  2020 .bash_profile
-rw-r--r-- 1 ec2-user ec2-user    231 Jul 15  2020 .bashrc
drwx------ 3 ec2-user root         25 Nov 15 23:43 .cache
-rw-rw-r-- 1 ec2-user ec2-user 292226 Nov 16 00:12 docker-project-aws.zip
drwx------ 2 ec2-user ec2-user     29 Nov 15 23:00 .ssh
[ec2-user@ip-172-31-36-120 ~]$ sudo unzip docker-project-aws.zip
Archive:  docker-project-aws.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of docker-project-aws.zip or
        docker-project-aws.zip.zip, and cannot find docker-project-aws.zip.ZIP, period.

Also tried jar:

[ec2-user@ip-172-31-36-120 ~]$ jar xvf ./docker-project-aws.zip 
java.util.zip.ZipException: zip END header not found
    at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1637)
    at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1645)
    at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1483)
    at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
    at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:717)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:151)
    at jdk.jartool/sun.tools.jar.Main.extract(Main.java:1397)
    at jdk.jartool/sun.tools.jar.Main.run(Main.java:397)
    at jdk.jartool/sun.tools.jar.Main.main(Main.java:1689)
alaiavee commented 2 hours ago

The size obviously isn't right, maybe an issue with wget. I'll just work with the scp method...

--2024-11-16 00:54:46--  https://github.com/abhinavcreed13/docker-load-balancer-ec2/blob/main/package/docker-project-aws.zip
Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘docker-project-aws.zip’

    [   <=>                                                                                                                                                                                               ] 292,219      599KB/s   in 0.5s   

2024-11-16 00:54:47 (599 KB/s) - ‘docker-project-aws.zip’ saved [292219]
alaiavee commented 2 hours ago

Closing since it's obviously an issue with the download I'm getting via wget.

abhinavcreed13 commented 2 hours ago

Yup looks like the zip file is not properly downloaded.

All good, glad you found the guide useful 🙂

alaiavee commented 2 hours ago

I see, it's related to how Github serves files https://unix.stackexchange.com/a/387912

abhinavcreed13 commented 2 hours ago

I would say easier to just download the zip and upload to your server for unzipping.