These are chat archives for ushahidi/Community

9th
Jan 2019
Ushbot
@ushbot
Jan 09 08:19
[David Losada, Ushahidi] ah that particular problem is probably the database configuration variable names, this is an updated example: `\
[David Losada, Ushahidi] DB_HOST=192.168.33.110
DB_PORT=3306
DB_DATABASE=ushahidi
DB_USERNAME=homestead
DB_PASSWORD=secret
[David Losada, Ushahidi] some of those variable names are different from v3
Ushbot
@ushbot
Jan 09 10:10
[Mohmed Osman] Hello Dears , I am having problem with connecting to DB using docker-compose up I have this error massage Problem with dial: dial tcp 127.0.0.1:3306: getsockopt: connection refused. Sleeping 1s
[Mohmed Osman] any Suggestion
Ushbot
@ushbot
Jan 09 10:23
[David Losada, Ushahidi] @Mohmed , can you try this diff ? ```
diff --git a/docker-compose.yml b/docker-compose.yml
index ebae014bb..93ffb48dd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,10 +15,10 @@ services:
ENABLE_PHPFPM: "true"
ENABLE_PLATFORM_TASKS: "false"
RUN_PLATFORM_MIGRATIONS: "true"
  • DB_NAME: ushahidi
  • DB_DATABASE: ushahidi
    DB_HOST: mysql
  • DB_USER: ushahidi
  • DB_PASS: ushahidi
  • DB_USERNAME: ushahidi
  • DB_PASSWORD: ushahidi
    command: start
    ports:
    • "80:8080"
      @@ -30,8 +30,8 @@ services:
      ENABLE_PHPFPM: "false"
      ENABLE_PLATFORM_TASKS: "true"
      RUN_PLATFORM_MIGRATIONS: "false"
  • DB_NAME: ushahidi
  • DB_DATABASE: ushahidi
    DB_HOST: mysql
  • DB_USER: ushahidi
  • DB_PASS: ushahidi
  • DB_USERNAME: ushahidi
  • DB_PASSWORD: ushahidi
    command: start
    ```
[Mohmed Osman] diff: docker-compose.ymlindex: No such file or directory
[Mohmed Osman] where can I found docker-compose.ymlindex: Ush ?
Ushbot
@ushbot
Jan 09 10:56
[David Losada, Ushahidi] you should put those contents in a file .. for example: ushahidi.diff
[David Losada, Ushahidi] and run “patch -p1 < ushahidi.diff”
Ushbot
@ushbot
Jan 09 12:09
[Mohmed Osman] can you send it to me as .txt :) Ush It didn't work with me the way you describe it
Ushbot
@ushbot
Jan 09 13:01
[David Losada, Ushahidi] well, another way is just to edit docker-compose.yml :) change DB_NAME for DB_DATABASE, DB_USER for DB_USERNAME and DB_PASS for DB_PASSWORD
[David Losada, Ushahidi] that’s essentially what the diff reflects
[Mohmed Osman] i have changed the docker-compose.yml already but still having this error
[David Losada, Ushahidi] Luis Hernando, here is a summary of the changes for v4: https://github.com/ushahidi/platform/releases/tag/v4.0.0
[David Losada, Ushahidi] the same error @Mohmed ?
[Mohmed Osman] check the output ! above
[Mohmed Osman] is this has to do with the socket is enabled on MySQL server ?
Ushbot
@ushbot
Jan 09 13:21
[David Losada, Ushahidi] “mysql_1 | 2019-01-09 13:07:39 1 [ERROR] InnoDB: Cannot allocate memory for the buffer pool”
[David Losada, Ushahidi] MySQL seems to be starved for memory
[Mohmed Osman] InnoDB: Initializing buffer pool, size = 128.0M
[Mohmed Osman] Yes that what it shows also
[David Losada, Ushahidi] if you are running docker on a vm and you have other containers running, you may need to give more memory to the vm
[Mohmed Osman] i am not running a vm
Ushbot
@ushbot
Jan 09 13:29
[David Losada, Ushahidi] so if this is on linux, then yep.. it’s pretty much down to the how much memory you have available in the machine
[Mohmed Osman] any way around ? , can I reduce mysql pool size ? is this an option ?
[David Losada, Ushahidi] it could work. I don’t know what is necessary to adjust that on the docker image… but you may use any docker image if you find one that makes that easily tweakable. You can also host the database anywhere you would like