Open Veinar opened 2 months ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
We don't use OKD here, so I honestly don't know. This looks like more of a server config issue than a Snipe-IT issue though. Google isn't offering much up though.
Hi @snipe thanks for your quick reply, I will try to solve this problem on my own. And yes, I agree that this is a problem related to the specific OKD/Openshift environment.
My focus is on this particular log output:
supervisor: couldn't setuid to 1000: Unable to set effective user groups
supervisor: child process was not created
OKD does not allow you to easily change the uid or gid when the container is spawned. Looking through the Dockerfile and the startup.sh
script on the latest
image, I found at the very end of this startup.sh
script is a directive:
exec supervisord -c /supervisord.conf
Which, when executed on an "idle" container (with CMD overwritten to sleep
), generates the same error as OKD/Openshift.
So basically I confirm that this is not a problem with the Snipe-IT software, but with the supervisord
dependency, which does not work properly on systems similar to OKD/Openshift.
I would like to keep this thread for future discoveries by various people, but I don't see an option to convert it to Discussion.
So yes, you can close it, as this is not a problem for this particular software. I will continue working on getting this up and running and will contact the guys from supervizord
team. I would like to comment in the future on how my research on this topic went.
Regards, Konrad 😃
Okay, one more step forward, I was able to get response from Snipe-IT server that is hosted on OKD/Openshift. With APP_DEBUG
option enabled I got some errors and maybe someone can guide me where to search for potential problems next.
So far in supervisord.conf
I had to change user declarations in two places:
[supervisord]
section I've added additional line user=root
,[program:run_schedule]
section I've changed user=docker
to user=root
.All this just to get some certificates error 🥲
RuntimeException: Unsupported cipher or incorrect key length. Supported ciphers are: aes-128-cbc, aes-256-cbc, aes-128-gcm, aes-256-gcm. in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:55
Whole log with stack trace was uploaded to pastebin
If anyone is willing to help I would be glad for any hints, And yes I know that Openshift is not supported platform.
Regards, Konrad 👋
What happens when you try to run php artisan key:generate
?
Hi @snipe,
I've executed command echo yes | php artisan key:generate
at the beginning but same result as before.
Logs output (truncated):
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
>
Application key set successfully.
Module ssl disabled.
To activate the new configuration, you need to run:
service apache2 restart
...
Does setting ENV
to production
may cause this issue ?
Regards, Konrad 👋
Debug mode
Describe the bug
Hello,
I'm trying to implement snipe-it on OKD, I don't really know what's wrong, it looks like it wants to be run as
root
, so I'm giving it a go. When it is not run asroot
, it leads to a permissions error when creating directories. But it performs some operations in the startup script that are not understandable (to me), involving setting groups bysupervisor
, which leads to an error during spawning child processes. Output logs from the container:What are the required
uid
andgid
for the container? Are changes touid
andgid
necessary. Or should I provide a specific configuration to allowsupervisor
to run asroot
.I am willing to help solve this problem due to the availability of the environment and some knowledge of deployment on k8s like systems.
Thanks in advance, Regards, Konrad
Reproduction steps
Expected behavior
Start and stabilize snipe-it on OKD.
Screenshots
No response
Snipe-IT Version
latest
Operating System
Openshift
Web Server
n/a
PHP Version
n/a
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
It's fresh deployment of application, database (same namespace
mysql
database) population was successful but we were unable to achieve stability due to startup problem.