codexgigassys / codex-backend

Codex Gigas malware DNA profiling search engine discovers malware patterns and characteristics assisting individuals who are attracted in malware hunting.
MIT License
154 stars 38 forks source link

Error during building api. #1

Open phreakus opened 8 years ago

phreakus commented 8 years ago

When I execute "sudo docker-compose up" command, httpd and db execute normally, but during building api some error is occured.

Do you have any idea?

CrimsonGlory commented 8 years ago

Hi, can you provide us the output of the following commands? # docker version # docker-compose --version # docker images

sashlabs-cyber commented 8 years ago

Hi CrimsonGlory,

I came across the same error, and please find the details which you requested.

Regards,

Sai Santosh image

CrimsonGlory commented 8 years ago

I have the same versions of everything and I can't reproduce the issue. I think this may be related to docker dns config.

Can you try to edit docker-compose.ymlfile and add the following line at the end of the file:

  dns: 8.8.4.4

The result will look like this:

db:
  image: mongo:3.2
  volumes:
    - ../mongo-data/:/data/db

httpd:
    image: httpd:2.4
    volumes:
        - ../codex-frontend/:/usr/local/apache2/htdocs/
    ports:
        - "6100:80"
api:
  build: .
  command: bash -c "(echo updating pip packages && pip install -r /myapp/src/pip_requeriments.txt && echo starting redis && service redis-server start && (echo starting redis worker default && rq worker --path /myapp/src/ default &) && (echo starting redis worker process && rq worker --path /myapp/src/ process &) && (echo starting redis worker checkup && rq worker --path /myapp/src/MalwareCheckUp/ checkup &)) && echo starting api...Check 127.0.0.1:8080 && python /myapp/src/api2.py -H $$HOSTNAME"
  volumes:
    - .:/myapp
  ports:
    - "4500:8080"
  links:
    - db
    - httpd
  dns: 8.8.4.4

Then retry:

docker-compose up --build
sashlabs-cyber commented 8 years ago

Hi CrimsonGlory,

I have tried the way you suggested. Unfortunately it didn't work even now.

image

wigpenepel commented 8 years ago

I have a similar issue, I build it on VM Workstation with Ubuntu Server 16.04.1 first with a 20Gb disk, this was a mistake, however it did work fully, until I dumped several Gig of malware on there and ran out of disk space. Tore it down and rebuilt with a 250Gb allocation, I am suffering the same issue. Without rectification. The build times were only 2 hours apart with no other changes. Whilst I know this answer is not helpful at this time, it will be when I work out how to fix it, luckily I have my -vv switch enabled today and will fully document any solution I find.

ror13h commented 8 years ago

tl;dr Replace 'pylab' in _codex-backend/src/piprequeriments.txt with 'matplotlib'

VM: Ubuntu 16.04 LTS; Docker 1.12.1; Docker-Compose 1.8.0

Same API build error: capture Cause seems to be a missing/renamed python lib in pip_requeriments.txt capture2 Replacing 'pylab' with 'matplotlib' seems to satisfy the missing lib. Re-run docker-compose up and all should work.

Thanks for releasing this tool-- looking forward to exploring it.

CrimsonGlory commented 8 years ago

Thanks everyone for the feedback. It seems we have multiple issues here.

The s/pylab/matplotlib commit has been pushed. But what is happening to wigpenepel, cyber-cyborg999, phreakus seems to be a different thing, because it fails in the first step of the Docker build. I added more verbose output to apt-get to see if we can find out whats going on. For the time being I would recommend to use the ready-to-use Codex VM's.