XRAY: How to fix the error “getting the final child's pid from pipe caused” during an upgrade
Relevant for Xray version 3.x with Docker-Compose Installation
When upgrading Xray from one version to another, you may encounter the following error:
# docker-compose -p xray up -d Creating network "xray_default" with the default driver Creating xray_router ... done Creating xray_mongodb ... done Creating xray_persist ... Creating xray_analysis ... Creating xray_server ... error Creating xray_observability ... Creating xray_indexer ... Creating xray_analysis ... error Creating xray_indexer ... error Creating xray_persist ... error Creating xray_observability ... error ERROR: for xray_analysis Cannot start service xray-analysis: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:402: getting the final child's pid from pipe caused: EOF: unknown
This error often suggests that the container fails to start. This is primarily due to a discrepancy in the installation directory between the previous and current versions. Consequently, please ensure that you correctly copied the .env file from the previous installation to the new directory.
Additional information can be found in our Upgrading Xray documentation.
In case the .env file was not copied, it is recommended to delete the current unzipped directory, re-extract it, copy the .env file and run the config.sh file.