R
Railway2mo ago
pearcy

MySQL Deployment Fails

I'm encountering issues with a MySQL instance running on Railway, which seems to be affecting my deployment. I tried another instance and getting the same error. Using the built-in deploy path - Create / Database / Add MySQL
You reached the start of the range → Sep 16, 2024 5:33 PM

Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/9fee6adc-f4ac-4cf3-9c39-5f7eb6a624ea/vol_35glb32mgghcrjum

2024-09-16 21:33:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.

2024-09-16 21:33:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2024-09-16 21:33:10+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.

'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'

2024-09-16T21:33:10.434366Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2024-09-16T21:33:10.550541Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.0.1) starting as process 1

2024-09-16T21:33:10.555372Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-09-16T21:33:10.865883Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2024-09-16T21:33:11.058069Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2024-09-16T21:33:11.058105Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2024-09-16T21:33:11.070049Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2024-09-16T21:33:11.096322Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

2024-09-16T21:33:11.096408Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.0.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
You reached the start of the range → Sep 16, 2024 5:33 PM

Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/9fee6adc-f4ac-4cf3-9c39-5f7eb6a624ea/vol_35glb32mgghcrjum

2024-09-16 21:33:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.

2024-09-16 21:33:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2024-09-16 21:33:10+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.

'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'

2024-09-16T21:33:10.434366Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2024-09-16T21:33:10.550541Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.0.1) starting as process 1

2024-09-16T21:33:10.555372Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-09-16T21:33:10.865883Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2024-09-16T21:33:11.058069Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2024-09-16T21:33:11.058105Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2024-09-16T21:33:11.070049Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2024-09-16T21:33:11.096322Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

2024-09-16T21:33:11.096408Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.0.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
Solution:
unable to find user ghost: no matching entries in passwd file
unable to find user ghost: no matching entries in passwd file
...
Jump to solution
13 Replies
Percy
Percy2mo ago
Project ID: 9fee6adc-f4ac-4cf3-9c39-5f7eb6a624ea
Brody
Brody2mo ago
it auto grabbed the volume id, please provide a project id
pearcy
pearcy2mo ago
283b63c7-1b6f-4ed5-93a9-008d5d823a3d
Brody
Brody2mo ago
mysql is in the active state?
pearcy
pearcy2mo ago
yes
Brody
Brody2mo ago
your title states "MySQL Deployment Fails"
pearcy
pearcy2mo ago
I was seeing errors in logs:
No description
pearcy
pearcy2mo ago
new to this - is this normal behavior? Perhaps it's my Ghost CMS instance that is not connecting?
Brody
Brody2mo ago
thats normal, red does not always mean error
pearcy
pearcy2mo ago
this is my Ghost logs:
#8 exporting layers 3.5s done



#8 ...



#9 [auth] sharing credentials for us-west1.registry.rlwy.net



#9 DONE 0.0s



#8 exporting to image

#8 exporting manifest sha256:f860dc39978ecd42b4808909b0ce928ff096dec31d054c256d481cba4f306fad done

#8 exporting config sha256:2b66d9d80ed8ad3cec669fac22833b6dc35c88b1535ca38685c5fef5cc16088c done

#8 exporting attestation manifest sha256:805e76229adf79d3eaefe041737c79e05c161afb987177e002e97455e42979d1 done

#8 exporting manifest list sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036 done

#8 pushing layers



#8 pushing layers 0.8s done

#8 pushing manifest for us-west1.registry.rlwy.net/641ae4b5-4f5c-4be1-9152-8513dc159abe:3000220f-7fba-4fd1-ad5b-1aee7dd30866@sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036



#8 pushing manifest for us-west1.registry.rlwy.net/641ae4b5-4f5c-4be1-9152-8513dc159abe:3000220f-7fba-4fd1-ad5b-1aee7dd30866@sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036 0.7s done

#8 DONE 5.0s



Build time: 68.54 seconds



=========================

Container failed to start

=========================



Failed to start deployment.

If this error persists, please reach out to the Railway team at https://help.railway.app.


#8 exporting layers 3.5s done



#8 ...



#9 [auth] sharing credentials for us-west1.registry.rlwy.net



#9 DONE 0.0s



#8 exporting to image

#8 exporting manifest sha256:f860dc39978ecd42b4808909b0ce928ff096dec31d054c256d481cba4f306fad done

#8 exporting config sha256:2b66d9d80ed8ad3cec669fac22833b6dc35c88b1535ca38685c5fef5cc16088c done

#8 exporting attestation manifest sha256:805e76229adf79d3eaefe041737c79e05c161afb987177e002e97455e42979d1 done

#8 exporting manifest list sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036 done

#8 pushing layers



#8 pushing layers 0.8s done

#8 pushing manifest for us-west1.registry.rlwy.net/641ae4b5-4f5c-4be1-9152-8513dc159abe:3000220f-7fba-4fd1-ad5b-1aee7dd30866@sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036



#8 pushing manifest for us-west1.registry.rlwy.net/641ae4b5-4f5c-4be1-9152-8513dc159abe:3000220f-7fba-4fd1-ad5b-1aee7dd30866@sha256:8d85b9100ef3eefe3fd1fa2a0069c11bb4290b037462cff7525fbf6822734036 0.7s done

#8 DONE 5.0s



Build time: 68.54 seconds



=========================

Container failed to start

=========================



Failed to start deployment.

If this error persists, please reach out to the Railway team at https://help.railway.app.


and building from this Github file: docker-compose.yml
version: '3'
services:
ghost:
build: .
ports:
- 2368:2368
environment:
NODE_ENV: production
url: https://${RAILWAY_STATIC_URL}
mail__transport: SMTP
mail__options__service: Mailgun
mail__options__host: smtp.mailgun.org
mail__options__port: 465
mail__options__secure: true
mail__options__auth__user: postmaster@email.${RAILWAY_STATIC_URL}
mail__options__auth__pass: ${MAILGUN_PASSWORD}
mail__from: noreply@email.${RAILWAY_STATIC_URL}
volumes:
- ./data:/var/lib/ghost/content
restart: unless-stopped
version: '3'
services:
ghost:
build: .
ports:
- 2368:2368
environment:
NODE_ENV: production
url: https://${RAILWAY_STATIC_URL}
mail__transport: SMTP
mail__options__service: Mailgun
mail__options__host: smtp.mailgun.org
mail__options__port: 465
mail__options__secure: true
mail__options__auth__user: postmaster@email.${RAILWAY_STATIC_URL}
mail__options__auth__pass: ${MAILGUN_PASSWORD}
mail__from: noreply@email.${RAILWAY_STATIC_URL}
volumes:
- ./data:/var/lib/ghost/content
restart: unless-stopped
Brody
Brody2mo ago
okay thank you I'll try to grab that error for you
Solution
Brody
Brody2mo ago
unable to find user ghost: no matching entries in passwd file
unable to find user ghost: no matching entries in passwd file
pearcy
pearcy2mo ago
Thanks @Brody for anyone else with error, my file: Dockerfile
FROM ghost:5-alpine

# Create the ghost user and group if they do not exist
RUN addgroup -S ghost && adduser -S ghost -G ghost

# Switch to the ghost user
USER ghost

# Add a health check to monitor the Ghost instance
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl --fail http://localhost:2368 || exit 1

# Copy your local files to the Ghost directory
COPY . /var/lib/ghost

# Expose the Ghost port
EXPOSE 2368
FROM ghost:5-alpine

# Create the ghost user and group if they do not exist
RUN addgroup -S ghost && adduser -S ghost -G ghost

# Switch to the ghost user
USER ghost

# Add a health check to monitor the Ghost instance
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl --fail http://localhost:2368 || exit 1

# Copy your local files to the Ghost directory
COPY . /var/lib/ghost

# Expose the Ghost port
EXPOSE 2368
Want results from more Discord servers?
Add your server