404 errors and unable to insert macros (macro-browser 404 error)
Asked by Dan Eves:

I'm trying to setup Docker in a container with another container running MySQL as the database. I've run the setup essentially as follows (set up to recreate the issue, not exactly as I intend to implement it. The host OS is Ubuntu Server 18.04 (Bionic Beaver)

```
#!/bin/bash

ROOT_PASSWORD='CorrectHorseBatteryStaple'
CONFLUENCEUSER_PASSWORD='WrongDonkeyMainsGlue'
MYSQL_TAG='8.0.20'
CONFLUENCE_TAG='7.4.0'
ROOT_DIR='/mnt/sda/'
CONFLUENCE_DIR=$ROOT_DIR'confluence/'
MYSQL_DIR=$ROOT_DIR'confluence_mysql/'

#Set up prerequisite network and permanent storage folders
docker network create confluence_network
mkdir $CONFLUENCE_DIR
mkdir $MYSQL_DIR
cp my.cnf $MYSQL_DIR/my.cnf
mkdir $MYSQL_DIR/mysql

# Setup mysql container
docker run --name=confluence_mysql --mount type=bind,src=/mnt/sda/confluence_mysql/my.cnf,dst=/etc/my.cnf --mount type=bind,src=/mnt/sda/confluence_mysql/mysql,dst=/var/lib/mysql --network=confluence_network -e MYSQL_ROOT_PASSWORD=$ROOT_PASSWORD -d mysql/mysql-server

docker exec -it confluence_mysql mysql -uroot -p

#Enter these lines into the mysql command prompt
#CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
#CREATE USER 'confluenceuser'@'confluence.confluence_network' IDENTIFIED BY 'WrongDonkeyMainsGlue';
#GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'confluence.confluence_network';

# Autopopulate mysql details - doesn't seem to pick these up, but enter them in UI
ATL_JDBC_URL='jdbc:mysql://confluence_mysql/confluence'
ATL_JDBC_USER='confluenceuser'
ATL_JDBC_PASSWORD=$CONFLUENCEUSER_PASSWORD
ATL_DB_TYPE='mysql'

# Setup confluence container
docker run -v /mnt/sda/confluence/:/var/atlassian/application-data/confluence --name="confluence" --network=confluence_network -e ATL_JDBC_URL -e ATL_JDBC_USER -e ATL_JDBC_PASSWORD -e ATL_DB_TYPE -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server:$CONFLUENCE_TAG

# Copy the Java driver in and restart the container
docker cp mysql-connector-java-$MYSQL_TAG.jar confluence:/opt/atlassian/confluence/confluence/WEB-INF/lib
docker restart confluence
```

With a my.cnf file as follows

```
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html
#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password
skip-host-cache
#skip-name-resolve
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
secure-file-priv=/var/lib/mysql-files
user=mysql

#Confluence required settings
character-set-server=utf8mb4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row

pid-file=/var/run/mysqld/mysqld.pid
```

When I run the set up it connects successfully to the database, but even with a blank setup when I click on the Insert 'Other macros' nothing happens and I get a 404 message in both safari and chrome browsers (caches cleared etc between tries). None of the suggested remedies including clearing plugin caches work (notable that this error persist from a clean install so unlikely to be related). I don't seem to get the same issue when using an internal database... Same issue on 7.3.5 and 7.4.0


Answers:
author: Moses Thomas
body: [@Dan Eves](/t5/user/viewprofilepage/user-id/3913167) Could you provide the Confluence logs in \<confluence_home\>/logs so that we could see more regarding this error.