0

I am running a Mura CMS instance with docker compose (using config/docker/local-mysql/docker-compose.yml) and getting the following error:

500 Error

Error Executing Database Query.

Datasource:nodatabase

SQL:SELECT IF('muradb' IN(SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA), 1, 0) AS found 

Code:n/a

Type:Database

Timed out trying to establish connection

Here is a copy of my Docker-compose.yml, which is the standard yml file Blue River distributes with Mura. It hasn't be modified other than the change from port 8080 to port 80.

version: '2.1'

services:
  #Mura Server
  mura_mysql_cfml:
    image: ortussolutions/commandbox:latest
    environment:
      PORT: 80
      SSL_PORT: 8443
      CFENGINE: adobe@2016
      CFCONFIG_ADMINPASSWORD: NOT_SECURE_CHANGE
      MURA_ADMIN_USERNAME: admin
      MURA_ADMIN_PASSWORD: admin
      MURA_ADMINEMAIL: example@localhost.com
      MURA_APPRELOADKEY: appreload
      MURA_DATASOURCE: muradb
      MURA_DATABASE: muradb
      MURA_DBTYPE: mysql
      MURA_DBUSERNAME: root
      MURA_DBPASSWORD: NOT_SECURE_CHANGE
      MURA_DBHOST: mura_mysql
      MURA_DBPORT: 3306
      MURA_SITEIDINURLS: "false"
      MURA_INDEXFILEINURLS: "false"
      MURA_TESTBOX: "true"
    volumes:
        - ../../../:/app
    ports:
        - "80:80"

  #MySQL
  mura_mysql:
    image: mysql:latest
    environment:
        MYSQL_ROOT_PASSWORD: NOT_SECURE_CHANGE
        MYSQL_DATABASE: muradb
    volumes:
        - mura_mysql_data:/var/lib/mysql
    ports:
        - "55555:3306"

volumes:
    mura_mysql_data:

Any ideas of what may be going wrong?

Alec Walczak
  • 427
  • 1
  • 5
  • 17
  • Can you add the docker-compose.yml file you’re using? We might be able to see your issue there. Just change any passwords before posting. – Steve Withington Oct 12 '17 at 11:29

2 Answers2

0

Your issue is where you've modified the ports in your docker-compose.yml file.

The left side is the host ... or your local machine. The right side is the container's network port, which you shouldn't change. So, under the mura_mysql_cfml service try:

ports:
    - "80:8080"

Also, under the environment: setting, I would ommit the PORT: 80 environment variable altogether. The reason is because that port isn't exposed in the underlying Docker image.


EDIT:

Also, I just noticed you're not using the default image. This is critical! The image you're attempting to use doesn't even have Mura CMS in it. Which means you would have to supply it, or mount it as a volume into the /app directory.

Coincidentally, I'm working on putting together some example images, and docker-compose.yml files for users such as yourself. It's still being worked on, but I think you should take a look at the repository anyway: https://github.com/blueriver/docker-muracms

Hope this helps!

  • The image in was the problem. I used this docker-compose.yml https://hub.docker.com/r/blueriver/muracms/ which has worked. Now I have a problem with trailing slashes on URLs -- my URLs do not rewrite to include slashes. Do you know how I can tackle this? – Alec Walczak Oct 12 '17 at 17:03
  • If you're using the "official" image, everything should work with or without the trailing slashes. I'm not sure exactly what issue you're referring to. Could you be more specific? Or, give a link or error output? – Steve Withington Oct 12 '17 at 19:35
  • Using the official image. I deployed a site bundle made in Mura 7.0.44, everything looks great except when I go to URLs on my site without trailing slashes (www.fakesite.com/site), they don't rewrite to add the trailing /, instead I get a 404 error. However, if I add an index.cfm to the URL without a trailing slash (www.fakesite.com/index.cfm/site) it does redirect to (www.fakesite.com/index.cfm/site/). I have site id and index turned off in the compose file. I also have settings.ini.cfm set to 0 for both. I added the web.config and .htaccess rules too. ideas about how to fix this? – Alec Walczak Oct 12 '17 at 19:40
  • First, if you're running in Docker, the settings.ini.cfm file is ignored. You use the environment variables instead. That said, in my tests, I'm unable to reproduce your issue. When I remove the trailing slash, Mura automatically redirects to the URL to include the trailing slash. So, I'm not sure why you are experiencing this without being able to test your issue somehow. – Steve Withington Oct 12 '17 at 19:44
-1

For some reason the web server in your docker stack can't reach the mysql server.

How are you executing the docker-compose? Do you get any different result if you try the other docker-compose files in Mura?

Also, have you tried installing Kitematic? It provides a lot of visual data about your docker containers and images.

m_evangelista
  • 534
  • 1
  • 4
  • 11