imagegenius / docker-obico

Monolithic (Single) Docker Container for Obico Server
https://hub.docker.com/r/imagegenius/obico
GNU General Public License v3.0
8 stars 3 forks source link

471c0364-ig91 Error 500 #19

Closed gullygossner closed 2 months ago

gullygossner commented 4 months ago

Trying to run 471c0364-ig91 in docker (unraid). This occurs with both with docker compose and unraid's built in docker app method.

It appears that everything loads fine but I when I attempt to access the site errors are thrown.

I've attached a log file of the occurrence. logfile.txt

mericon commented 4 months ago

Having the same exact problem

Subcode commented 4 months ago

same issue on a fresh install with the :latest tag.

MVerBerkmoes commented 3 months ago

Same issue here. Have removed and reinstalled both Obico AND Redis with no joy. I have almost an identical error log to the attachment included above.

UnRAID - v 6.12.11 Redis - v7.2.5

TheBennyJ commented 3 months ago

I'm also having the same issue

TheBennyJ commented 3 months ago

I'm also having the same issue

Actually found my problem, I've setup it to point to a domain, when accessing from unraid it was trying to use the IP address instead. Going to the configured site URL solved my issue

psybernoid commented 3 months ago

I'm also having the same problem. Had to recreate my container recently. So starting with a new config. I'm getting the 500 error

hydazz commented 3 months ago

Obico keeps pushing breaking updates and its difficult to stay on top of them, Ill try get a working build up asap

srsabu commented 3 months ago

I was having the same problem but was able to use the instructions here to get access to Django. I used the local IP address and port of my Unraid server as the domain.

https://stackoverflow.com/questions/16068518/django-site-matching-query-does-not-exist

ss1gohan13 commented 3 months ago

Found a potential fix for anyone looking:

Follow these steps:

open unraid console type: docker exec -it 71c0df5a6061 /bin/bash cd /app/obico/backend/ python3 manage.py shell

push enter

ip_address = ''

if not Site.objects.exists(): Site.objects.create(domain=ip_address, name='My Site') else: site = Site.objects.first() site.domain = ip_address site.name = 'My Site' site.save()

push enter a couple of time

restart obico

you should now be able to access the website

Thank you @IzFunk3

gullygossner commented 3 months ago

Attempting to do this fix.

in the ip_adress line do I put my obico ip address and port number? Is there indentations required in the code to make it work propropely?

I have attempted it a couple different ways but get IndentationError: expected an indented block after 'if' statement on line 3

and If I indent I get NameError: name 'Site' is not defined

frmattb commented 3 months ago

Attempting to do this fix.

in the ip_adress line do I put my obico ip address and port number? Is there indentations required in the code to make it work propropely?

I have attempted it a couple different ways but get IndentationError: expected an indented block after 'if' statement on line 3

and If I indent I get NameError: name 'Site' is not defined

try this:

open unraid console for that docker type: cd /app/obico/backend/ python3 manage.py shell

push enter

ip_address = '' from django.contrib.sites.models import Site

if not Site.objects.exists(): (add tab) Site.objects.create(domain=ip_address, name='My Site') else: (add tab) site = Site.objects.first() site.domain = ip_address site.name = 'My Site' site.save()

hydazz commented 3 months ago

im unsure what exactly is causing this, this image is exactly the same as the upstream setup 😑

weawer commented 3 months ago

i dont even seem to be able to access python3 in the docker.

AstralDarko commented 3 months ago

Same issue here. No access to python3 by default. Installed it, got the following error:

`Traceback (most recent call last): File "/app/obico/backend/manage.py", line 8, in from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/obico/backend/manage.py", line 10, in raise ImportError( ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?`

hydazz commented 3 months ago

believe youll need to invoke python with python3.11

still working on a fix, seems like every second build i do just works, then does not without making any changes so im loosing hair rn

weawer commented 3 months ago

thanks for your hard work and please dont stress too much about it!

WoutvanderAa commented 2 months ago

I am also running in this issue with django, does anyone know a fix for it?

WoutvanderAa commented 2 months ago

Found a potential fix for anyone looking:

Follow these steps:

open unraid console type: docker exec -it 71c0df5a6061 /bin/bash cd /app/obico/backend/ python3 manage.py shell

push enter

ip_address = ''

if not Site.objects.exists(): Site.objects.create(domain=ip_address, name='My Site') else: site = Site.objects.first() site.domain = ip_address site.name = 'My Site' site.save()

push enter a couple of time

restart obico

you should now be able to access the website

Thank you @IzFunk3

I tried this but I got the following error message: Error response from daemon: No such container: 71c0df5a6061 bash: cd: /app/obico/backend/: No such file or directory bash: python3: command not found

What am I doing wrong? do I not have python installed or something..

jarjo commented 2 months ago

you need to use the id of your container.

WoutvanderAa commented 2 months ago

you need to use the id of your container.

I did that the second time and I got in, I tried the second command like the following; root@9fa07d551f9d:/# ip_address = '192.168.178.89:3334'

if not Site.objects.exists(): Site.objects.create(domain=ip_address, name='My Site') else: site = Site.objects.first() site.domain = ip_address site.name = 'My Site' site.save()

And I got this error: bash: ip_address: command not found bash: syntax error near unexpected token (' bash: syntax error near unexpected tokendomain=ip_address,' bash: else:: command not found bash: syntax error near unexpected token `(' bash: site.domain: command not found bash: site.name: command not found

do you know what should I be doing differently to not get this error? I am very new to linux and docker in general.

WhiskeySheppard commented 2 months ago

I'm getting the same thing but I'm not using UnRAID. I attempted to install on Ubuntu/Docker and I cant get to the obico or the admin page. I keep getting Server 500 error. I've tried installing on two machines. obico-server-web-1_logs.txt

hydazz commented 2 months ago

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost

https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

gullygossner commented 2 months ago

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost

https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

I think it's good to go. I had to manually add HOST_IP variable to my unraid template.

weawer commented 2 months ago

Seems to have resolved the issue thanks :)

WhiskeySheppard commented 2 months ago

Yea, I found a fix. It was due to poor documentation.

image

Step 4.2 fixed the issue. However when people typically follow a "guide" and they come to a issue, They dont typically look forward a few steps. They retrace the steps they've already done based on the guide to see what they may have overlooked.

The guide is configuration through a Docker, How many docker instances are ran through a device where you can pull up a browser and view something through localhost? Most people run docker through a device they're accessing through SSH.

SO to me, It would make more sense for this portion of the documentation:

image

should be listed prior to this:

image

Since in most cases, you wont be able to access or use (http://localhost:3334/admin/sites/site/). The typical user wont be able to access the obico homepage or the admin/djano page which they guide tells you to do once docker is up and running until they jump ahead in the documentation and follow the 4.2 step. Therefore this step should be listed in the documentation prior to telling you to test the obico homepage or the admin/djano page.

AstralDarko commented 2 months ago

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

I think it's good to go. I had to manually add HOST_IP variable to my unraid template.

Same here. After the update, manually adding the template variable resolved it. Thanks so much for all your hard and fast work on this!

frmattb commented 2 months ago

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

I think it's good to go. I had to manually add HOST_IP variable to my unraid template.

I'm not sure who setup the unraid template, but if we had a way of contacting them to get them to add the common variables to the template, it would help this whole operation a great deal.

WoutvanderAa commented 2 months ago

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

I think it's good to go. I had to manually add HOST_IP variable to my unraid template.

It fixed it indeed sorry for the late reply

MVerBerkmoes commented 2 months ago

This did not resolve my issue, even after a full uninstall and reinstall on UnRAID.

From: frmattb @.> Sent: Monday, September 2, 2024 8:21 AM To: imagegenius/docker-obico @.> Cc: MVerBerkmoes @.>; Comment @.> Subject: Re: [imagegenius/docker-obico] 471c0364-ig91 Error 500 (Issue #19)

did this resolve the issue? should note that error 500 is the 'intended' result if not accessing via localhost https://www.obico.io/docs/server-guides/configure/#41-if-you-can-access-your-obico-server-using-httplocalhost3334

I think it's good to go. I had to manually add HOST_IP variable to my unraid template.

I'm not sure who setup the unraid template, but if we had a way of contacting them to get them to add the common variables to the template, it would help this whole operation a great deal.

— Reply to this email directly, view it on GitHub https://github.com/imagegenius/docker-obico/issues/19#issuecomment-2324625042 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALU2SR4XCMXDSXUJRGPGHQ3ZURJ3VAVCNFSM6AAAAABKVF5OUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUGYZDKMBUGI . You are receiving this because you commented. https://github.com/notifications/beacon/ALU2SR2SJVUW7AKUPTX7W5TZURJ3VA5CNFSM6AAAAABKVF5OUCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUKR33JE.gif Message ID: @. @.> >