-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backend and Ngins errors on ingest of new repo. Patches website down. #30
Comments
Check logs - your permissions are wrong:
|
This is the relevant code from import-repository)
while true; do
patches_read "Enter the location of the repository you would like to import. This should be a directory containing a catalog file and associated repository files."
import_directory=${RETURN_VALUE}
patches_echo "Setting directory permissions and ownership for ${import_directory}. \`chmod -R 775 ${import_directory}\`. This will fail if your user does not have the ability to run chmod against this directory."
chmod -R 775 ${import_directory}
chown "$(whoami)": -R ${import_directory}
if validate_directory "$import_directory"; then
if [[ -n $(find "$import_directory" -maxdepth 1 -type f -name "*.xml") ]]; then
patches_echo "Directory validation complete..."
break
else
patches_echo "There are no XML files found in the directory ${import_directory}. The catalog XML must be present - are you sure you got the path correct? Exiting." --error >&2 # Redirect error message to stderr
exit 1
fi
else
patches_echo "The specified location is not valid. Please try again." --error
fi
done
if check_images; then
if ! ask_yes_no "Patches will import $import_directory. When it does this it will remove the original directory to conserve space after the import. Patches will also be stopped during the import and then started afterwards. This should only take a few seconds to complete. Would you like to continue?"; then
patches_echo "Terminating." --error
exit 1
fi
patches_stop
mv "$import_directory" "${TOP_DIR}/repos/xml"
patches_start
else
mv "$import_directory" "${TOP_DIR}/repos/xml"
if ask_yes_no "It looks like the Patches images are not yet configured. Do you want to run setup now?"; then
patches_setup
else
patches_echo "Exiting."
exit 0
fi
fi
;; the directory permissions should be 775. Are they something different? If so, did you use |
I did....and I saw that. Where do I change that? |
/patches/xml/1242024 is a mount inside the container not on your host. That path looks correct. You can check it by exec'ing into the container if you want: cd /opt/patches
TOP_DIR=./
SCRIPT_DIR=./podman-build/
CERT_DIRECTORY=./server_certs/
podman rm -f -t 0 patches-backend && \
podman run \
--name patches-backend \
--env-file ${TOP_DIR}/.patches-backend \
--volume ${TOP_DIR}/server/data:/home/node/app/data:Z \
--volume ${TOP_DIR}/server/config.js:/home/node/app/server/config.js:Z \
--volume ${TOP_DIR}/server/routes:/home/node/app/server/routes:Z \
--volume ${TOP_DIR}/server/logger.js:/home/node/app/server/logger.js:Z \
--volume ${TOP_DIR}/server/db.js:/home/node/app/server/db.js:Z \
--volume ${TOP_DIR}/server/index.js:/home/node/app/server/index.js:Z \
--volume ${TOP_DIR}/server/knexfile.js:/home/node/app/server/knexfile.js:Z \
--volume ${TOP_DIR}/server/rebuild_database.js:/home/node/app/server/rebuild_database.js:Z \
--volume ${TOP_DIR}/server/util.js:/home/node/app/server/util.js:Z \
--volume ${TOP_DIR}/server/seeds/:/home/node/app/server/seeds:Z \
--volume ${TOP_DIR}/package.json:/home/node/app/package.json:Z \
--volume ${TOP_DIR}/${CERT_DIRECTORY}:/patches/${CERT_DIRECTORY}:z \
--volume ${SCRIPT_DIR}/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:Z \
--volume ${TOP_DIR}/migrations:/home/node/app/migrations:Z \
--volume ${TOP_DIR}/repos/xml:/patches/xml:z \
--volume ${TOP_DIR}/repos/xml/parsed:/patches/xml/parsed:z \
--publish "9229:9229" \
--network host-bridge-net \
-it \
localhost/dell/patches-base:latest \
/bin/bash Note the line The source cause of that though is the folder on the host |
i used import-repository |
[devuser@localhost ~]$ cd /opt/patches/repos/xml/ |
It has to be the entire path. Maybe something is wrong with repos or xml. If those are normal try debugging as mentioned above - exec into the container and try touching a file in the folder. |
Try reading the file with cat and see if it works. If it doesn't you know you have a read probably and can focus in on that permission. Make sure everything starting at /opt/patches down is owned by devuser. Maybe ownership changed somewhere on one of the folders in the chain /opt/patches/repos/xml chain |
reading the file with cat work swimmingly. for some reason the backend just does not want to start even with a re setup |
Try See: https://github.com/dell/patches/blob/main/DEBUGGING.md#debugging-the-backend That manually runs the backend. See what the output is. |
Also, just to confirm, reading the file with cat in the container works swimmingly? It's in the container that matters. |
patches-backend_error.log
patches-backend_standard.log
patches-frontend_error.log
patches-frontend_standard.log
patches-httpd_error.log
patches-httpd_standard.log
patches-nginx_error.log
patches-nginx_standard.log
patches-psql_error.log
patches-psql_standard.log
The text was updated successfully, but these errors were encountered: