sql problem
k1ng0hat
TRIALOP

a year ago

i have a problem with the conection of the database with my project, someone who i can share mi screen and show what's happening please.

0 Replies

adam
MODERATOR

a year ago

Please explain your issue in here, if possible.


k1ng0hat
TRIALOP

a year ago

@Adam so i have a login on the railway project and everything at the begining deploy on a correct way, but when i send the request of the user and password (previously added on my database) this appears, but on my local project everythng is ok

1248679643070861300
1248679643331166200
1248679643691745300


brody
EMPLOYEE

a year ago

your frontend is trying to submit for form with http, you need to be using https when hosting on railway


k1ng0hat
TRIALOP

a year ago

How i do that @Brody


k1ng0hat
TRIALOP

a year ago

on my middleware code?


k1ng0hat
TRIALOP

a year ago

or how


brody
EMPLOYEE

a year ago

change http to https, please don't overthink this


k1ng0hat
TRIALOP

a year ago

Brody


k1ng0hat
TRIALOP

a year ago

or @Adam


k1ng0hat
TRIALOP

a year ago

the error stays


k1ng0hat
TRIALOP

a year ago

its my first time doing this


adam
MODERATOR

a year ago

When you send a request to your backend, currently the url you’re sending to is http. You need to change wherever it says http to https


adam
MODERATOR

a year ago

simple as that


k1ng0hat
TRIALOP

a year ago

thanks!!


k1ng0hat
TRIALOP

a year ago

keeps persisting

1248720892272443400


brody
EMPLOYEE

a year ago

are you using https now


k1ng0hat
TRIALOP

a year ago

yeap


k1ng0hat
TRIALOP

a year ago

but the problem still there


brody
EMPLOYEE

a year ago

that looks like a completely different problem


k1ng0hat
TRIALOP

a year ago

i forced to redirect all to https by the php … forcehttps


brody
EMPLOYEE

a year ago

please send a link to a page and steps to reproduce this issue


k1ng0hat
TRIALOP

a year ago

by dm?


brody
EMPLOYEE

a year ago

in this chat



k1ng0hat
TRIALOP

a year ago

let me create a user 4 u


k1ng0hat
TRIALOP

a year ago

or no, the request is the same


k1ng0hat
TRIALOP

a year ago

check dm


brody
EMPLOYEE

a year ago

please do not dm people without asking, this doesn't need to move to dms so please keep it in this chat


k1ng0hat
TRIALOP

a year ago

sorry


k1ng0hat
TRIALOP

a year ago

it wont happen again


brody
EMPLOYEE

a year ago

please provide some demo credentials


k1ng0hat
TRIALOP

a year ago

adrianmolanonavarro@gmail.com


k1ng0hat
TRIALOP

a year ago

spyro6


brody
EMPLOYEE

a year ago

okay I will look at the network tab when I'm back on the computer


k1ng0hat
TRIALOP

a year ago

ooookay


brody
EMPLOYEE

a year ago

in the mean time, have you looked into your deployment logs?


k1ng0hat
TRIALOP

a year ago

yes


k1ng0hat
TRIALOP

a year ago

but only appears "warnings"


brody
EMPLOYEE

a year ago

have you read them?


k1ng0hat
TRIALOP

a year ago

2024-06-06T17:33:35.041970Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2024-06-06T17:33:35.164734Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 7

2024-06-06T17:33:35.171528Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-06-06T17:33:35.617852Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2024-06-06T17:33:35.916257Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2024-06-06T17:33:35.916317Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2024-06-06T17:33:35.923363Z 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-06-06T17:33:35.958738Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.

2024-06-06T17:33:36.261069Z 8 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'

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


brody
EMPLOYEE

a year ago

these are your database logs


k1ng0hat
TRIALOP

a year ago

huh


brody
EMPLOYEE

a year ago

look at your apps logs


k1ng0hat
TRIALOP

a year ago

this are my deploy logs


k1ng0hat
TRIALOP

a year ago

from the app


k1ng0hat
TRIALOP

a year ago

INFO Server running on [http://0.0.0.0:5887].

Press Ctrl+C to stop the server

2024-06-07 19:26:14 …………………………………………… ~ 0s

2024-06-07 19:30:28 …………………………………………… ~ 1s

2024-06-07 19:30:31 …………………………………………… ~ 0s

2024-06-07 19:30:36 …………………………………………… ~ 0s

2024-06-07 19:31:47 …………………………………………… ~ 0s

2024-06-07 19:31:52 …………………………………………… ~ 0s

2024-06-07 19:31:52 …………………………………………… ~ 0s

2024-06-07 19:36:55 …………………………………………… ~ 0s


brody
EMPLOYEE

a year ago

hmmm that's not helpful


brody
EMPLOYEE

a year ago

are you sure you have setup the connection to the database properly


k1ng0hat
TRIALOP

a year ago

yes sir


k1ng0hat
TRIALOP

a year ago

i changed the var of the .env


brody
EMPLOYEE

a year ago

I assume if you set it up correctly it would have worked then lol


brody
EMPLOYEE

a year ago

there is clearly as misconfiguration somewhere


k1ng0hat
TRIALOP

a year ago

idk where because


k1ng0hat
TRIALOP

a year ago

for example


k1ng0hat
TRIALOP

a year ago

the nixconfig that i had to use was this


k1ng0hat
TRIALOP

a year ago

NIXPACKSBUILDCMD=composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force


k1ng0hat
TRIALOP

a year ago

and is on the final on .env


k1ng0hat
TRIALOP

a year ago

btw, i had to use them here

1248724705024671700
1248724705368735700


brody
EMPLOYEE

a year ago

that's not how the build command works, you don't need to set the environment variable there, just specify the command itself


k1ng0hat
TRIALOP

a year ago

so i erase all of them?


k1ng0hat
TRIALOP

a year ago

and what abbout the start command


k1ng0hat
TRIALOP

a year ago

happens that i dont put that lemme show you


k1ng0hat
TRIALOP

a year ago

let the project start


k1ng0hat
TRIALOP

a year ago

brody


k1ng0hat
TRIALOP

a year ago

are u there?


brody
EMPLOYEE

a year ago

um when did i say to remove them both completely?


k1ng0hat
TRIALOP

a year ago

18 0.608 Composer plugins have bee

18 0.608 Do not run Composer as root/super user! See https://getcomposer.org/root for details

18 0.761 Installing dependencies from lock file

18 0.765 Verifying lock file contents can be installed on current platform.

18 0.808 Package operations: 0 installs, 0 updates, 37 removals

18 0.808 - Removing theseer/tokenizer (1.2.3)

18 0.813 - Removing symfony/yaml (v6.4.7)

18 0.816 - Removing spatie/laravel-ignition (2.7.0)

18 0.819 - Removing spatie/ignition (1.14.1)

18 0.823 - Removing spatie/flare-client-php (1.5.1)

18 0.825 - Removing spatie/backtrace (1.6.1)

18 0.828 - Removing sebastian/version (4.0.1)

18 0.830 - Removing sebastian/type (4.0.0)

18 0.833 - Removing sebastian/recursion-context (5.0.0)

18 0.836 - Removing sebastian/object-reflector (3.0.0)

18 0.841 - Removing sebastian/object-enumerator (5.0.0)

18 0.841 - Removing sebastian/lines-of-code (2.0.2)

18 0.841 - Removing sebastian/global-state (6.0.2)

18 0.841 - Removing sebastian/exporter (5.1.2)

18 0.841 - Removing sebastian/environment (6.1.0)

18 0.841 - Removing sebastian/diff (5.1.1)

18 0.841 - Removing sebastian/complexity (3.2.0)

18 0.841 - Removing sebastian/comparator (5.0.1)

18 0.841 - Removing sebastian/code-unit-reverse-lookup (3.0.0)

18 0.841 - Removing sebastian/code-unit (2.0.0)

18 0.841 - Removing sebastian/cli-parser (2.0.1)

18 0.841 - Removing phpunit/phpunit (10.5.20)

18 0.841 - Removing phpunit/php-timer (6.0.0)

18 0.841 - Removing phpunit/php-text-template (3.0.1)

18 0.841 - Removing phpunit/php-invoker (4.0.0)

18 0.841 - Removing phpunit/php-file-iterator (4.1.0)

18 0.841 - Removing phpunit/php-code-coverage (10.1.14)

18 0.841 - Removing phar-io/version (3.2.1)

18 0.841 - Removing phar-io/manifest (2.0.4)

18 0.841 - Removing nunomaduro/collision (v7.10.0)


k1ng0hat
TRIALOP

a year ago

so this happens


k1ng0hat
TRIALOP

a year ago

:/


k1ng0hat
TRIALOP

a year ago

25 | >>> RUN composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force

26 |

27 |

ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127

Error: Docker build failed


k1ng0hat
TRIALOP

a year ago

this one


brody
EMPLOYEE

a year ago

put your build are start commands back, just without the nixpacks variable


k1ng0hat
TRIALOP

a year ago

so i let the start build


k1ng0hat
TRIALOP

a year ago

but that happen


k1ng0hat
TRIALOP

a year ago

the "error"


brody
EMPLOYEE

a year ago

what is your current build and start command now?


k1ng0hat
TRIALOP

a year ago

lemme showu


k1ng0hat
TRIALOP

a year ago

Dockerfile:25

23 | # build phase

24 | COPY . /app/.

25 | >>> RUN composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force

26 |

27 |

ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127


k1ng0hat
TRIALOP

a year ago

build logs


brody
EMPLOYEE

a year ago

please stop spamming build logs


k1ng0hat
TRIALOP

a year ago

15 ERROR: process "/bin/bash -ol pipefail -c composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127


k1ng0hat
TRIALOP

a year ago

okey


brody
EMPLOYEE

a year ago

as per the service settings


k1ng0hat
TRIALOP

a year ago

failed


k1ng0hat
TRIALOP

a year ago

didnt deploy


brody
EMPLOYEE

a year ago

im sorry but that does not answer the question


k1ng0hat
TRIALOP

a year ago

sorry, im not understanding


k1ng0hat
TRIALOP

a year ago

:c


brody
EMPLOYEE

a year ago

im not sure if i will be able to help here then


k1ng0hat
TRIALOP

a year ago

ahhhhh


k1ng0hat
TRIALOP

a year ago

my current build and start comman


k1ng0hat
TRIALOP

a year ago

the start command was is php artisan serve --host=0.0.0.0 --port=$PORT, but i deleted the nixbuilds from the custom build how you told me


brody
EMPLOYEE

a year ago

i never told you to remove your build command


brody
EMPLOYEE

a year ago

again, put it back, without the nixpacks environment variable


k1ng0hat
TRIALOP

a year ago

OOOH
I UNDERSTAN


k1ng0hat
TRIALOP

a year ago

I UNDERSTANNNNDDDD


k1ng0hat
TRIALOP

a year ago

the (")


brody
EMPLOYEE

a year ago

bruh


k1ng0hat
TRIALOP

a year ago

sorry men


k1ng0hat
TRIALOP

a year ago

hhahahshahsha let me deploy it again


brody
EMPLOYEE

a year ago

what is your current build and start command now?


k1ng0hat
TRIALOP

a year ago

composer install --no-dev && npm install --only=production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force && php artisan serve


k1ng0hat
TRIALOP

a year ago

nope


k1ng0hat
TRIALOP

a year ago

:c


k1ng0hat
TRIALOP

a year ago

Likewise, thank you very much brody


k1ng0hat
TRIALOP

a year ago


k1ng0hat
TRIALOP

a year ago

i tried everything


Loading...