Docker Setup "okay" = reachable, but no login

So, after some hassle, I was able to make IN reachable via Traefik.
Now then, happy as a cat, login… no no no.

Why do we set credentials in the first place, wenn all we get is this?

500: SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘172.27.0.7’ (using password: YES) (SQL: select * from users where email = admin@domain.com and users.deleted_at is null limit 1)

Hi,

From the error it looks like the credentials for the database may be incorrect.

yeah, seems so - i managed to reinstall the whole package, and this time i got to a setup page where i could enter evrything; once being done, and all tests suceeded i get upon trying to log in:

401: These credentials do not match our records

so kinda “failing forward”
… the credentials are defo correct…

ouch, i think i know… both my ninja and my nextcloud setups refer to their respectiva databases as “db” … and they are in the same network so i can get to them via traefik… so i guess ninja was trying to access the nextcloud db…

oh let me see how i can fix that :woman_facepalming:

Ok no joy here.

Reading the Logs from the APP, it seems the APP wants to connect to the Database on a host that doesnt exist:

INFO Configuration cached successfully.
INFO Caching the framework bootstrap files.
config … 29ms DONE
routes … 67ms DONE
In Connection.php line 759:

SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘172.27.0.6’ (using p
assword: YES) (SQL: select * from information_schema.tables where table_sch
ema = ninja and table_name = accounts and table_type = ‘BASE TABLE’)

Now i tried giving the Database the above IP, in order to help this litte f***er out, but NOPE, then it tries to reach the database at a different IP that has no endpoint…

what is this? why is it doing this crap?

No guarantee this your resolution but i JUST fought with this issue today. The fix for me was parenthesis ‘password’. So ’ before and after password of the sql user

Thank you, i am still struggling, killed the whole system after exeything else started to become buggy from all my edits… will open a new thread…

If you haven’t seen it this recent video may help:

Thanks, thats exactly the guide I used… Thank you anyway :slight_smile:

I guess it’s really that ninja dev don’r want self hosted installs look “legit?”
If I follow dbtechs guide 1:1 i can get it running, but it will be purely accessible via the http port, no https possible, no cloudflare based forwarding from a domain name to that port works, no making it work with traefik…

Sad.

We do everything we can to make our selfhost installs as “legit” as possible. We deploy to the hosted platform straight from our public GitHub repo, we support CloudFlare so there’s no reason why a selfhost install couldn’t support it. This is most likely a configuration issue.

@david any ideas?

Thank you for your patience, support & continued willingness to help. :pray:

Sorry if I am a bit frustrated and upset at this stage, I’ve been on this for a week now, killed whole compute instances again and again, it is probably at least the tenth clean setup of a compute instance since the beginning of last week trying to get this to work somehow alongside nextcloud with some sort of domain name based :confused:

Maybe this helps:

  1. When I look at the Environment Variables in Portainer, none of the contents of the .env file were visible in, this is more a “felt” number than a real one, 80% of installs. ( Wich results in one or another issue from earlier in the post )

  2. I luckily had one machine setup saved where ninja at least works, and in this one the variables are also there, so I set up a machine again based on that image. That install “works”, but has the issue of my later posts, in wich ich have the “reachable via ip:port” but not via cloudflare or traefik ( or, also tried that variant, putting the machine in a private subnet at setting up a loadbalancer with a public ip in oraclecloud).

  3. If you are interested, I am happy to share credentials for a compute instance with either setup, as there is nothing “production” going on there yet :wink:

So I set up a test instance…

I tried attaching the corresponding logs here, but that does not work unfortunately, cannot select any files, so links in next response :wink:
( Password: InvoiceNinja123! including the “!” - current provides enforces Passwd.)

  1. App
  2. Database
  1. Web Server

Funny enough, this setup uses copied and pasted docker-compose.yml & env from the other instance (but of course with updated APP_KEY, and it actually uses another port, wich has also been updated), where I can at least reach ninja on its IP and port :woman_shrugging:t2:

see here: http://158.101.223.54:8080/#/

I can see the content is loading, but it looks to be loading painfully slow. If you open the network tab, you’ll see the main.foss file download but it has only downloaded 6mb in ~ 2minutes for me…

Hmm, that helps us in wich respect? Portainer and shell are reachable without delay. Also rebooted the instance… No change

@Freddie_ger

I’ve re-read this thread, can you advise exactly what problem are you seeing now? When i Load the link above the login screen eventually appears after ~ 2 minutes Unsure exactly what issue remains now?