Comments (3)
After testing with the compose file a bit more, it seems there are side effects that I am not sure how to counter.
The first build on a fresh system succeeds, but if I change anything in the docker-compose file, I am presented with the internal error.
Even cleaning the system via
docker-compose rm -v
docker system prune
docker rmi misp
docker rmi mysql/mysql-server
removing all data dirs and resetting the git repo to HEAD does not change the outcome.
If you need any detailed logs or further info, please give me a heads up, I'm happy to help.
from x_old_misp_docker.
Seems like I have tracked down the problem.
It all boils down to a faulty MySQL DB-Connection. The config in app/Config/database.php
correctly makes use of the DNS-name of the Docker-container.
However, somewhere deeper the line, something seems to cache the initial IP address of the db
container. As soon as the addresses change (i.e. update, restart, ...), MISP fails with an internal error, as it cannot establish a connection to the database.
I'm not deep enough into the architecture to track it down further, but a workaround seems to be to assign fixed addresses to the containers in the docker-compose.yml
. We should definitely try to track this down, but this might be a workaround for the time being.
The problem can be reproduced by restarting the Docker containers multiple times until there's an IP change. Afterwards, errors like this show up in the error.log:
2019-07-28 10:26:55 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [1045] Access denied for user \'misp\'@\'172.18.0.15\' (using password: YES)',
'enabled' => true,
)
Request URL: /
Stack Trace:
#0 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(278): Mysql->connect()
#1 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/ConnectionManager.php(105): DboSource->__construct(Array)
#2 /var/www/MISP/app/Controller/AppController.php(126): ConnectionManager::getDataSource('default')
#3 /var/www/MISP/app/Controller/EventsController.php(55): AppController->beforeFilter()
#4 /var/www/MISP/app/Lib/cakephp/lib/Cake/Event/CakeEventManager.php(243): EventsController->beforeFilter(Object(CakeEvent))
#5 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(682): CakeEventManager->dispatch(Object(CakeEvent))
#6 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#7 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(EventsController), Object(CakeRequest))
#8 /var/www/MISP/app/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#9 {main}
whereas 172.18.0.15 is the initial IP address of the db
container, but not its current.
from x_old_misp_docker.
I cannot reproduce this.
from x_old_misp_docker.
Related Issues (20)
- MISP SSL Configuration HOT 1
- DEBUG urlib3 POST request failed
- MISP to Sentinel sync failing
- Security Worst Practice: MYSQL_PASSWORD logged in cleartext
- Accessing web Interface from remote host HOT 2
- Request: Build for Apple Silicon ARM64 (M1 Ultra) HOT 2
- Web server failed on Misp Installation HOT 10
- Unable to find MISP related logs HOT 1
- Publish Docker Image to an registry HOT 2
- Import sql db? HOT 2
- An Internal Error Has Occurred. on initial install HOT 2
- misp_db --initialize specified but the data directory has files in it. Aborting.
- MISP files detected as malware backdoor trojan by Defender for endpoint HOT 2
- Feeds are not being downloaded
- Docker compose build fatal error : mkdir: cannot create directory ‘/var/www/MISP’ , could not create leading directories of '/var/www/MISP': Permission denied HOT 1
- misp_web | /usr/bin/env: ‘bash\r’: No such file or directory
- INSTALL_NODB.sh: line 73: syntax error near unexpected token
- Azure (MS EntraID) SSO
- Require Run As Non-Root User
- missing autoload.php HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x_old_misp_docker.