fbctf icon indicating copy to clipboard operation
fbctf copied to clipboard

Composer error

Open MNWPRO opened this issue 7 years ago • 23 comments

In the latest edition Standard Docker Startup or Installation Guide, Production or Installation Guide, Development

These commands have been executed: sudo apt-get install ntp sudo service ntp stop sudo ntpd -gq sudo service ntp start

docker build --build-arg MODE=prod --build-arg DOMAIN=test.mydomain.com --build-arg [email protected] --build-arg TYPE=certbot -t="fbctf_in_prod" .

but There is still a problem Do not run composer as root/super user! image

I think it's the problem of composer
but How to solve @justinwray

MNWPRO avatar Dec 20 '17 17:12 MNWPRO

default

MNWPRO avatar Dec 20 '17 17:12 MNWPRO

@MNWPRO My apologies, the documentation for manual Docker install had not been updated for 16.04. Therefore you were getting outdated packages when running through the install steps.

The updates have been added here.

Also do not worry about the Do not run Composer as root/super user message. That is just a default warning. We are not running it as root/sudo.

stevcoll avatar Dec 20 '17 19:12 stevcoll

@stevcoll The latest updates are still ineffective, Encountered the same mistake. And then it stopped Docker build failed

MNWPRO avatar Dec 21 '17 00:12 MNWPRO

Edit: Since you're using Docker, did you remove the old container and images first? Before the most recent installation? Or rename the new image?

Did you start over with your VM from scratch or try to install over the last installation? I tested the entire process earlier and didn't have any issues.

Can you paste all commands run (could use history command to get everything you've run) and your entire provision log here? Also you are using 16.04 right?

stevcoll avatar Dec 21 '17 00:12 stevcoll

Also you seem to be using an old version of the FBCTF source files. Update your repo before you run anything else:

cd fbctf
git fetch
git pull

stevcoll avatar Dec 21 '17 01:12 stevcoll

1 2 3

I don't have an old fbctf image @stevcoll

MNWPRO avatar Dec 21 '17 01:12 MNWPRO

Can you run git log in the fbctf directory and give us the commit head? Something weird is going on; we are way ahead of HHVM version 3.11 for instance.

stevcoll avatar Dec 21 '17 01:12 stevcoll

wait a moment

MNWPRO avatar Dec 21 '17 01:12 MNWPRO

image

MNWPRO avatar Dec 21 '17 01:12 MNWPRO

@stevcoll Are some of the files not updated?

MNWPRO avatar Dec 21 '17 02:12 MNWPRO

When you installed the second time (after documentation update), did you remove the previous FBCTF Docker image and container? You wouldn't be able to use the same name twice without an error. Based on the testing here and your Composer issue, it seems like somehow you're running the old container.

sudo docker image ls
sudo docker container ls

sudo docker image rm [id/name]
sudo docker container rm [id/name]

stevcoll avatar Dec 21 '17 02:12 stevcoll

image @stevcoll After the execution of the command
The problem is not solved

MNWPRO avatar Dec 21 '17 02:12 MNWPRO

@MNWPRO Sorry to see you are having issues deploying the docker image.

Looking over your screenshots, it is clear that something is outdated on your system. It shows you using HHVM version 3.11.1 while the project is currently using 3.21.

@stevcoll had you verify the local git repository on your system, and that appears up-to-date, so something else is causing an issue. A few possibilities include:

  • An existing (old) Docker image
  • Outdated system packages/outdated host system
  • Local modifications to the git repo

Could you please provide answers the following:

  • What Linux Distribution and version thereof are you running docker on (that is, your host system)?
  • Do you have any existing/previously built FBCTF docker images (see @stevcoll's comment for details on how to obtain this)?
  • Are there any local modifications to the FBCTF code (use git status to verify this)?

I would also like you to try using the Quick Setup process, to deploy:

git clone https://github.com/facebook/fbctf
cd fbctf
source ./extra/lib.sh
quick_setup start_docker dev

justinwray avatar Dec 21 '17 20:12 justinwray

image image image

I didn't change the source code I've tried Quick Setup process,but There's the same mistake @justinwray

MNWPRO avatar Dec 22 '17 07:12 MNWPRO

Is there a good solution to the problem @stevcoll

MNWPRO avatar Dec 25 '17 14:12 MNWPRO

@MNWPRO We're just gonna need to get more detail here. It's still very puzzling that you're on an older version of HHVM. If you look at extra/lib.sh under the function install_hhvm(), you'll see that it should be installing HHVM (xenial-lts-3.21). Something weird is going on because after the new keys are added and apt-get repo updated, you should be getting HHVM version 3.21. Older versions of HHVM are not going to work, thus your dependency issues.

I would suggest, paste your entire provision log in here. All the output you get from the Docker install. Don't paste screenshots, copy and paste the output and wrap it with code tags here, or attach a text file. We need to see why you're getting an older version of HHVM.

stevcoll avatar Dec 27 '17 00:12 stevcoll

log.txt

MNWPRO avatar Dec 27 '17 10:12 MNWPRO

@stevcoll I read the lib.sh, it's 3.21

MNWPRO avatar Dec 27 '17 11:12 MNWPRO

The problem is here:

Failed to fetch http://dl.hhvm.com/ubuntu/dists/xenial-lts-3.21/InRelease Could not resolve 'dl.hhvm.com'

Please do an nslookup on dl.hhvm.com

Without being able to resolve that domain and fetching the data, you are not going to get the newer version of HHVM, which is what is causing your issues.

stevcoll avatar Dec 27 '17 21:12 stevcoll

nslookup failed ! @stevcoll How to solve

MNWPRO avatar Dec 28 '17 01:12 MNWPRO

I tried all the possible ways. All failed. Can you provide a docker image of a developer mode? @stevcoll I'll be very grateful.

MNWPRO avatar Dec 28 '17 15:12 MNWPRO

A bit out of this specific problem context, but may be useful for those others finding this Issue title "Composer error" to resolve a different problem, a friendly reminder:

Minimum of 2GB of memory needs to be allocated if you're installing FBCTF into Docker container on a VMware (or similar) VM. VMware defaults to 1GB out-of-the-box (but of course it can be changed per each VM). I hadn't noticed this as the cause of my problems trying to get FBCTF installed on Docker on VMware until I stumbled across the memory requirement statement somewhere around here. In my case, the FBCTF was failing at the point in the shell script where Composer was being installed. Just a friendly reminder!

eeeehaw avatar Jan 29 '18 19:01 eeeehaw

@eeeehaw I'll try it

MNWPRO avatar Jan 30 '18 01:01 MNWPRO