Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

1.4 Troubleshooting

Alex Skrypnyk edited this page Jan 6, 2020 · 13 revisions

This is a collection of issues encountered by govCMS users, and the ways they either got around them or died trying. If you've hit a problem you don't see here, add it in!

Be sure to include any error messages, so users find this page when they google theirs!

On this page

I can't log into my new local govCMS site, the password reset doesn't work!

GovCMS installs with a single-use login for the admin user, but refuses to allow setting a new password when prompted. This is a known bug.

Running ahoy login or docker-compose exec -T test drush uli may fail with the error Password may only be changed in 24 hours from the last change.

To fix it, reset the admin user password via Drush:

Mac/Linux:  ahoy drush upwd admin --password='${your-new-password}'
Windows:    docker-compose exec -T test drush upwd admin --password='${your-new-password}'

Provided sql file my-local-database.sql does not exist

Sometimes when running ahoy mysql-import <my-local-database>, the ahoy command returns this error. No idea why.

The fix is to manually run the command inside the ahoy command:

ahoy drush sql-drop && ahoy drush sql-cli < my-local-database.sql

Command <my-command> needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command

If you see this error when attempting to run a drush command:

Command <command> needs a higher bootstrap level to run - you        [error]
will need to invoke drush from a more functional Drupal environment
to run this command.
The drush command <command> could not be executed.              [error]

yet running drush status shows the website is alive, and the database connected successfully, I don't know what the problem really is.

The 'fix' is to blow away your local repo, download a fresh copy and ahoy up.

Content images don't appear up on my local site

If you've imported a website, it's normal not to include the entire filebase as this won't be tracked in the website's Git repository (unless you're clinically insane).

Freshly imported sites will only include the database and tracked codebase, so images won't be there.

The fix for this is detailed in the SaaS Developer Guide.

Browser shows No input file specified error when visiting project's URL

This normally indicates that there is no website living inside your project.

e.g When first running the govcms7-scaffold-paas project containers, and visiting http://govms7-paas.docker.amazee.io, this error will appear in the browser as the /docroot/ folder doesn't contain a website, so the server doesnt' know what to serve.

To fix this, either:

  1. Add a copy of Drupal (new site or existing site) into /docroot; OR
  2. Run docker-compose down, then uncomment line 31 of .env file and run docker-compose up -d

My custom theme doesn't appear in the Themes admin page

If you've added a sub theme into your website's theme directory, but it isn't show up under Admin > Appearance, it may be a permissions issue preventing Docker from accessing the new files.

The fix is to:

  1. Reset Docker Desktop to inherit and sharing permission changes:

    docker-compose stop
    docker-compose up -d
  2. Then flush all your website caches:

    docker-compose exec -T test drush cc all

    or

    ahoy drush cc all

No theme is rendering at all, just plain text on a white screen and errors about files!

This is normally caused by a missing tmp directory.

To fix it, create a new directory called tmp under sites/default/files (or wherever you have Drupal set to store it's temporary files).

I get input device is not a TTY when running certain docker-compose commands

Issue on Mac OS and Windows.

docker-compose exec runs with TTY allocation by default. Sometimes, Docker complains that it doesn't want it when running certain commands, e.g:

docker-compose exec cli drush sql-cli < mydatabase.sql
the input device is not a TTY

To fix this, add a -T flag to the exec command:

docker-compose exec -T cli drush sql-cli < mydatabase.sql

On Windows, if the -T flag doesn't help, you may need to install winpty, which gives Unix-like powers to Windows console programs.

To use it, simply prefix your command with winpty <command>.

Installing Pygmy fails

Discovered on MacOS.

When attempting to install pygmy with gem install pygmy, it may fail with this error (the path may vary based on your version of Ruby):

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/local/

Installing the latest stable version of RVM (Ruby Version Manager) can help avoid this. Be sure to use the command that installs the stable version, not the dev version!

pygmy up failing

Discovered on MacOS.

Docker may be running on another user's profile. Try restarting your computer.

Site cannot be found in browser after updating Docker

If you just updated Docker and your local site suddenly cannot be accessed via a browser, try turning pygmy off and on again - rebooting Docker messes with it.

pygmy down && pygmy up

docker login failing with credentials error

Discovered on MacOS.

Error in command line

Error saving credentials: error storing credentials - err: exit status 1, out: 'The user name or passphrase you entered is not correct.'

To fix this, open Keychain and lock/unlock your login keychain. Right click on the padlock.

docker pull failing with 'Access Denied' error

Error shown in command line

Using default tag: latest
Error response from daemon: Get https://gitlab-registry-production.govcms.amazee.io/v2/sandbox/_site_name_/mariadb-drupal-data/manifests/latest: unauthorized: HTTP Basic: Access denied

This is normally caused by not being logged into the GitLab registry where the images live. To fix it, log in with:

docker login gitlab-registry-production.govcms.amazee.io

Log in with your govCMS GitLab username (e.g. email address) and your Personal Access Token (PAT) as the password (setting up SSH access to GitLab will save you needing to do this repeatedly).

If you don't have a Personal Access Token (PAT), you may not have a GitLab account set up with GovCMS. GovCMS runs their own hosted instance of GitLab, which is separate from https://www.gitlab.com.

docker-compose up failing when it reaches SOLR containers

Discovered on MacOS, while creating a govCMS8 site.

Issue - Instance 1

Creating network "gov8-site_default" with the default driver
Creating gov8-site_mariadb_1 ...
Creating gov8-site_solr_1    ... error
Creating gov8-site_redis_1   ... done
Creating gov8-site_mariadb_1 ... error
Creating gov8-site_php_1     ...
Creating gov8-site_nginx_1   ...
Creating gov8-site_test_1    ...

ERROR: for gov8-site_solr_1  Cannot start service solr: driver failed programming external connectivity on endpoint... ...input/output error

Issue - Instance 2

Starting gov8-sitename_mariadb_1 ... error
Starting gov8-sitename_redis_1   ...
Starting gov8-sitename_solr_1    ...
Starting gov8-sitename_cli_1     ...

Starting gov8-sitename_redis_1   ... done
Starting gov8-sitename_solr_1    ... error
ir /port/tcp:0.0.0.0:... input/output error


ERROR: for gov8-sitename_solr_1  Cannot start service solr: driver failed programming external connectivity on endpoint... ...Error starting userland proxy: mkdir /port/Starting gov8-sitename_cli_1     ... done
Starting gov8-sitename_php_1     ... done
Starting gov8-sitename_test_1    ... done
Starting gov8-sitename_nginx_1   ... done
Starting gov8-sitename_chrome_1  ... done

ERROR: for mariadb  Cannot start service mariadb: driver failed programming external connectivity on endpoint gov8-sitename_mariadb_1... Error starting userland proxy: mkdir ...input/output error

ERROR: for solr  Cannot start service solr: driver failed programming external connectivity on endpoint gov8-sitename_solr_1 '(...: Error starting userland proxy: mkdir /port/tcp:0.0.0.0:... input/output error
ERROR: Encountered errors while bringing up the project.

Solution 1

Didn't work: Tried netstat -a -b but nothing was running on port 80.

Worked: Restarted docker

Solution 2

Didn't work: Restarting docker

Solution 3 (this worked)

CMD netstat -a -b to see what was running on port 80 and killed the process via Task Manager; it was httpd.exe, i.e Apache

Drupal status report complains of an inconsistent database schema and mismatched tables

Discovered on MacOS after importing a PaaS site locally.

After signing in and viewing the Status Report, the errors below appear:

Database 4 byte UTF-8 support   Enabled, but database tables need conversion
Please convert all database tables to utf8mb4 prior to enabling it in settings.php. See the documentation on adding 4 byte UTF-8 support for more information.

    Database schema Inconsistent

The Schema comparison report shows:

    XX modules with matching tables
    XX extra tables
    XX modules with mis-matching tables

The database schema comparison report provides more details.

Cause unknown, no fix yet available.

Clone this wiki locally