mikesplain / openvas-docker

A Docker container for Openvas
MIT License
762 stars 302 forks source link

[INFO] certificate file not found for domain example.com. #241

Closed itsecforu closed 4 years ago

itsecforu commented 5 years ago

Hello folks! All services started and running. But I cant open OpenVas vie browser. if I open with port 80 I see Nginx's start page. with 443 it just doens't work.

letsencrypt logs: Using the staging environment, [INFO] certificate file not found for domain example.com. Starting webroot initial certificate request script..., Making a temporary self signed certificate to prevent chicken and egg problems, Generating a 4096 bit RSA private key, ......++, ...........................................................................................++, writing new private key to '/etc/letsencrypt/live/example.com/privkey.pem', /etc/letsencrypt/live/example.com/privkey.pem: No such file or directory, 140522178246304:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/letsencrypt/live/example.com/privkey.pem','w'), 140522178246304:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:, Warning: This Docker image will soon be switching to Alpine Linux., You can switch now using the certbot/certbot repo on Docker Hub., /opt/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible., utils.DeprecatedIn23,, Saving debug log to /var/letsencrypt/log/letsencrypt.log, Plugins selected: Authenticator webroot, Installer None, An unexpected error occurred:, ConnectTimeout: HTTPSConnectionPool(host='acme-staging-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7efeeaea9bd0>, 'Connection to acme-staging-v02.api.letsencrypt.org timed out. (connect timeout=45)')), Please see the logfiles in /var/letsencrypt/log for more details., [INFO] Fixing permissions, Certificate request process finished for domain example.com,

My .yml file:

`version: '3.7'
services:

  nginx:
    image: nginx:alpine
    hostname: nginx
    ports:
      - 1480:80
    volumes:
       - vol_openvas_nginx:/etc/nginx
       - vol_letsencrypt:/etc/letsencrypt
       - vol_letsencrypt_data:/tmp/letsencrypt
    networks:
      - net_openvas
    deploy:
      labels:
        openvas_nginx.service.deployment.autoredeploy: 'true'
      restart_policy:
        max_attempts: 5
      placement:
        constraints:
         - node.hostname == s1

  nginx_ssl:
    image: nginx:alpine
    hostname: nginx_ssl
    ports:
      - 2443:443
    volumes:
       - vol_openvas_nginx_ssl:/etc/nginx
       - vol_letsencrypt:/etc/letsencrypt
       - vol_letsencrypt_data:/tmp/letsencrypt
    networks:
       - net_openvas
    deploy:
      labels:
        openvas_nginx_sll.service.deployment.autoredeploy: 'true'
      restart_policy:
        max_attempts: 5
      placement:
        constraints:
          - node.hostname == s1

  letsencrypt:
    image: kvaps/letsencrypt-webroot
    environment:
      DOMAINS: example.com
      EMAIL: webmaster@example.com
      WEBROOT_PATH: /tmp/letsencrypt
      EXP_LIMIT: 30
      CHECK_FREQ: 30
    volumes:
      - vol_letsencrypt:/etc/letsencrypt
      - vol_letsencrypt_data:/tmp/letsencrypt
    networks:
      - net_openvas
    deploy:
      labels:
        letsencrypt.service.deployment.autoredeploy: 'true'
      restart_policy:
        max_attempts: 5
      placement:
        constraints:
         - node.hostname == s1

  openvas:
    image: mikesplain/openvas
    environment:
      OV_PASSWORD: *******
      hostname: openvas
    expose:
      - 443
    volumes:
      - vol_openvas_lib:/var/lib/openvas/mgr
    labels:
       deck-chores.dump.command: sh -c "greenbone-nvt-sync; openvasmd --rebuild --progress"
       deck-chores.dump.interval: daily
    networks:
      - net_openvas
    deploy:
      labels:
        openvas.service.deployment.autoredeploy: 'true'
      restart_policy:
        max_attempts: 5
      placement:
        constraints:
         - node.hostname == s1

  cron:
    image: funkyfuture/deck-chores
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - net_openvas
    deploy:
      labels:
        cron.service.deployment.autoredeploy: 'true'
      restart_policy:
        max_attempts: 5
      placement:
        constraints:
         - node.hostname == s1

networks:
  net_openvas:
    driver: overlay   
volumes:
  vol_openvas_nginx:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/openvas
  vol_openvas_nginx_ssl:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/openvas_ssl      
  vol_letsencrypt:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/letsencrypt
  vol_letsencrypt_data:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/letsencrypt_data
  vol_openvas_lib:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/openvas_lib
  vol_docker_sock: 
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /opt/docker_lib`

Can anyone come across this? really need to solve this problem 🛠️

fredairic[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

fredairic[bot] commented 4 years ago

This issue has been automatically closed because it has not had recent activity. Issue creator may reopen if the issue still exists. Thank you for your contributions.