Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Issue : deepfenceio/deepfence_init_ce:1.4.1 Exit Errror #680

Closed
jplopezy opened this issue Nov 16, 2022 · 8 comments
Closed

Docker Issue : deepfenceio/deepfence_init_ce:1.4.1 Exit Errror #680

jplopezy opened this issue Nov 16, 2022 · 8 comments
Assignees
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned

Comments

@jplopezy
Copy link

Dear team,

I would like to ask you about the following error I have.

The error happens after a zero installation by downloading the docker-compose file and running it.

I only modify in it the default port since I have in use the 443, but after that everything is the same.

The docker runs correctly but when I try to enter the port I get the following message in the browser: "secure connection failed" "PR_END_OF_FILE_ERRROR".

It doesn't seem to be a browser problem since I validated it with several ...

I run the command docker ps -a and I see that there is an instance with an error.

Error :

5f182a2d1de5 deepfenceio/deepfence_init_ce:1.4.1 "/usr/local/bin/entr…" 2 hours ago Exited (0) 2 seconds ago df-init-container

I really don't know what I could do... the instance has the capability to support docker and is on AWS EC2 which I understand is compatible with this solution.

thanks,

@jplopezy jplopezy added bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned labels Nov 16, 2022
@ramanan-ravi
Copy link
Collaborator

ramanan-ravi commented Nov 16, 2022

Hello @jplopezy ,
Can you check if these logs has any errors?

docker logs deepfence-api
docker logs deepfence-router

deepfenceio/deepfence_init_ce is supposed to exit, so that's fine

@jplopezy2
Copy link

sudo docker logs deepfence-api
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to deepfence-es port 9200: Connection refused
Elastic search is unavailable - sleeping
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to deepfence-es port 9200: Connection refused
Elastic search is unavailable - sleeping
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to deepfence-es port 9200: Connection refused
Elastic search is unavailable - sleeping
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to deepfence-es port 9200: Connection refused
Elastic search is unavailable - sleeping
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 542 100 542 0 0 2125 0 --:--:-- --:--:-- --:--:-- 2125
{
"name" : "deepfence-es",
"cluster_name" : "df-es-cluster",
"cluster_uuid" : "fZdY5g7rS462HU1Q-k0MHQ",
"version" : {
"number" : "7.17.5",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "8d61b4f7ddf931f219e3745f295ed2bbc50c8e84",
"build_date" : "2022-06-23T21:57:28.736740635Z",
"build_snapshot" : false,
"lucene_version" : "8.11.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Adding elasticsearch custom configuration
Adding deepfence indices
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1273 100 353 100 920 15347 40000 --:--:-- --:--:-- --:--:-- 55347
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [cve/Cd1iAcaFRuSqlQlbsspdGA] already exists","index_uuid":"Cd1iAcaFRuSqlQlbsspdGA","index":"cve"}],"type":"resource_already_exists_exception","reason":"index [cve/Cd1iAcaFRuSqlQlbsspdGA] already exists","index_uuid":"Cd1iAcaFRuSqlQlbsspdGA","index":"cve"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1016 100 373 100 643 26642 45928 --:--:-- --:--:-- --:--:-- 72571
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [cve-scan/JlCIFpgoQPWFiW0p5kVDJg] already exists","index_uuid":"JlCIFpgoQPWFiW0p5kVDJg","index":"cve-scan"}],"type":"resource_already_exists_exception","reason":"index [cve-scan/JlCIFpgoQPWFiW0p5kVDJg] already exists","index_uuid":"JlCIFpgoQPWFiW0p5kVDJg","index":"cve-scan"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1097 100 393 100 704 32750 58666 --:--:-- --:--:-- --:--:-- 91416
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [sbom-cve-scan/cwBpzLTXQ0e7XZhuT1tOBw] already exists","index_uuid":"cwBpzLTXQ0e7XZhuT1tOBw","index":"sbom-cve-scan"}],"type":"resource_already_exists_exception","reason":"index [sbom-cve-scan/cwBpzLTXQ0e7XZhuT1tOBw] already exists","index_uuid":"cwBpzLTXQ0e7XZhuT1tOBw","index":"sbom-cve-scan"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 297 100 243 100 54 15187 3375 --:--:-- --:--:-- --:--:-- 18562
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: no settings to update;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: no settings to update;"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2265 100 393 100 1872 98250 457k --:--:-- --:--:-- --:--:-- 552k
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [sbom-artifact/ZTLFm0ggSO2enCSmqWFvRQ] already exists","index_uuid":"ZTLFm0ggSO2enCSmqWFvRQ","index":"sbom-artifact"}],"type":"resource_already_exists_exception","reason":"index [sbom-artifact/ZTLFm0ggSO2enCSmqWFvRQ] already exists","index_uuid":"ZTLFm0ggSO2enCSmqWFvRQ","index":"sbom-artifact"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 722 100 365 100 357 40555 39666 --:--:-- --:--:-- --:--:-- 80222
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [report/JLrd-EQuQdGT6yEho-yQQg] already exists","index_uuid":"JLrd-EQuQdGT6yEho-yQQg","index":"report"}],"type":"resource_already_exists_exception","reason":"index [report/JLrd-EQuQdGT6yEho-yQQg] already exists","index_uuid":"JLrd-EQuQdGT6yEho-yQQg","index":"report"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1516 100 385 100 1131 24062 70687 --:--:-- --:--:-- --:--:-- 94750
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [secret-scan/IncT-FqwQ5GFTreCu6RbfQ] already exists","index_uuid":"IncT-FqwQ5GFTreCu6RbfQ","index":"secret-scan"}],"type":"resource_already_exists_exception","reason":"index [secret-scan/IncT-FqwQ5GFTreCu6RbfQ] already exists","index_uuid":"IncT-FqwQ5GFTreCu6RbfQ","index":"secret-scan"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1536 100 405 100 1131 45000 122k --:--:-- --:--:-- --:--:-- 250k
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [secret-scan-logs/fFgqibOiS9K1i2N6PXfv5Q] already exists","index_uuid":"fFgqibOiS9K1i2N6PXfv5Q","index":"secret-scan-logs"}],"type":"resource_already_exists_exception","reason":"index [secret-scan-logs/fFgqibOiS9K1i2N6PXfv5Q] already exists","index_uuid":"fFgqibOiS9K1i2N6PXfv5Q","index":"secret-scan-logs"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1283 100 381 100 902 31750 75166 --:--:-- --:--:-- --:--:-- 104k
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [compliance/GIctTbSGR7yuUPedP6tzgw] already exists","index_uuid":"GIctTbSGR7yuUPedP6tzgw","index":"compliance"}],"type":"resource_already_exists_exception","reason":"index [compliance/GIctTbSGR7yuUPedP6tzgw] already exists","index_uuid":"GIctTbSGR7yuUPedP6tzgw","index":"compliance"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1327 100 425 100 902 60714 125k --:--:-- --:--:-- --:--:-- 185k
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [cloud-compliance-scan/9VQQn45LQkSlQlcq2Rrz_A] already exists","index_uuid":"9VQQn45LQkSlQlcq2Rrz_A","index":"cloud-compliance-scan"}],"type":"resource_already_exists_exception","reason":"index [cloud-compliance-scan/9VQQn45LQkSlQlcq2Rrz_A] already exists","index_uuid":"9VQQn45LQkSlQlcq2Rrz_A","index":"cloud-compliance-scan"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1060 100 421 100 639 30071 45642 --:--:-- --:--:-- --:--:-- 75714
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [compliance-scan-logs/HcnIjWFNQX26ffQqBNHHJw] already exists","index_uuid":"HcnIjWFNQX26ffQqBNHHJw","index":"compliance-scan-logs"}],"type":"resource_already_exists_exception","reason":"index [compliance-scan-logs/HcnIjWFNQX26ffQqBNHHJw] already exists","index_uuid":"HcnIjWFNQX26ffQqBNHHJw","index":"compliance-scan-logs"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1084 100 445 100 639 27812 39937 --:--:-- --:--:-- --:--:-- 67750
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [cloud-compliance-scan-logs/vO3ymVC5TqWbM2xxjxoufQ] already exists","index_uuid":"vO3ymVC5TqWbM2xxjxoufQ","index":"cloud-compliance-scan-logs"}],"type":"resource_already_exists_exception","reason":"index [cloud-compliance-scan-logs/vO3ymVC5TqWbM2xxjxoufQ] already exists","index_uuid":"vO3ymVC5TqWbM2xxjxoufQ","index":"cloud-compliance-scan-logs"},"status":400}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1508 100 405 100 1103 50625 134k --:--:-- --:--:-- --:--:-- 184k
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [cloudtrail-alert/hrggYpjFQNON1ippSDMgtQ] already exists","index_uuid":"hrggYpjFQNON1ippSDMgtQ","index":"cloudtrail-alert"}],"type":"resource_already_exists_exception","reason":"index [cloudtrail-alert/hrggYpjFQNON1ippSDMgtQ] already exists","index_uuid":"hrggYpjFQNON1ippSDMgtQ","index":"cloudtrail-alert"},"status":400}
Adding cve map pipeline
200

Adding cve scan map pipeline
200

Adding compliance_pipeline
200

Adding compliance_scan_logs_pipeline
200

Adding default_upsert indexed script
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 416 100 21 100 395 381 7181 --:--:-- --:--:-- --:--:-- 7563
{"acknowledged":true}
/usr/local/lib/python3.9/site-packages/elasticsearch/connection/base.py:193: ElasticsearchDeprecationWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
warnings.warn(message, category=ElasticsearchDeprecationWarning)

custom configuration added successfully
deepfence-postgres:5432 - accepting connections
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
Creating user roles
Finished creating user roles
[2022-11-16 15:02:32 +0000] [90] [INFO] Starting gunicorn 20.1.0
[2022-11-16 15:02:32 +0000] [90] [INFO] Listening at: http://0.0.0.0:9998 (90)
[2022-11-16 15:02:32 +0000] [90] [INFO] Using worker: gevent
[2022-11-16 15:02:32 +0000] [91] [INFO] Booting worker with pid: 91

sudo docker logs deepfence-router
Waiting for containers to start up
Waiting for containers to start up
Waiting for containers to start up
Waiting for containers to start up
Waiting for containers to start up
Starting router

@ramanan-ravi
Copy link
Collaborator

Can you try in Google Chrome once?
You have to accept warning about self signed certificate.

@jplopezy2
Copy link

It didn't work for me... it could be that these steps are incomplete :

Docker installation process for ThreatMapper Management Console

sudo sysctl -w vm.max_map_count=262144 # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

wget https://github.com/deepfence/ThreatMapper/raw/master/deployment-scripts/docker-compose.yml
docker-compose -f docker-compose.yml up --detach

Now to test I downloaded the full repository run the build.sh and then "docker-compose -f docker-compose.yml up --detach" but it doesn't respond.

@shyam-dev
Copy link
Contributor

@jplopezy2 What is the configuration of the system ?

@gnmahanth
Copy link
Contributor

@jplopezy2 Here are the steps if you have port 443 is already in use

assuming you want to use port 8090 to access threatmapper set the environment variable

export MGMT_CONSOLE_PORT=8090

then start threatmapper

docker-compose up -d

once all containers are up the UI will be accessible over port 8090, please accept self-signed certificate exception

https://<server ip>:8090

Please make sure you have enough system resources to run threatmapper containers https://docs.deepfence.io/docs/threatmapper/architecture/requirements

@jplopezy
Copy link
Author

This was my mistake... in the docker-compose when I modified the exposed port to the instance I also modified the internal one, that is to say if the default was "443:443" I changed it to "8443:8443".

The solution was to leave the internal port the same and modify only the external port "8443:443".

I close the ticket

@shyam-dev
Copy link
Contributor

Thank you for the response @jplopezy. We will close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned
Projects
None yet
Development

No branches or pull requests

5 participants