I
Immich•5mo ago
oButane

Immich cant be reached via ip:port only localhost?

Iv trouble shooted this for the past 2 days and havent been able to get it to work. All the 2283 ports have been added checked etc. I have been back and forth with chatgpt today just going step by step one last time and there is a error where immich_server cant communicate with immich_postgres and chatgpt believe that might be it so now I have to go in the immich_postgresql file and un # the port line to see if thats the fix. Do you think its this or does chat gpt have me on a wild goose chase
52 Replies
Immich
Immich•5mo ago
:wave: Hey @oButane, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
Daniel
Daniel•5mo ago
That's not it, no You should post the information the bot asks for though Also, don't post in multiple channels at the same time
elegos
elegos•5mo ago
@oButane what is your current setup? Are you using docker compose (with the provided docker-compose.yml file) to run everything, from the database to the immich server? If so, there should be no connection issue between the two, as the whole compose environment runs in the same virtual network. As per the connection to the port 2283: supposing again that you are running via docker compose, are you running immich on Linux or Windows? In both cases you need to ensure that, if you have a firewall, it is configured to let others connect to 2283/tcp. If on Linux w/ firewalld, you can run these two commands in your host machine: sudo firewall-cmd --permanent --add-port=2283/tcp && sudo firewall-cmd --reload. After that, you should be able to access via http://your.local.ip.or.mdns:2283
Daniel
Daniel•5mo ago
Tbh I find it weird giving instructions without even knowing what's the issue They've mentioned that their Immich instance cannot reach postgres, which is unrelated to system wide firewall rules
elegos
elegos•5mo ago
It's quite confused indeed, I don't understand if he still has the postgresql connection issue or he just can't connect to the server, as in the title he stands out that he can actually reach immich via loopback
Daniel
Daniel•5mo ago
Oh true, overlooked that actually. Either way I think it makes the most sense to first wait for more information Compose/env file, logs, what they've tried, what they're trying to achieve, ...
oButane
oButaneOP•5mo ago
My bad! & will add that now! So im on windows 10 using docker & I have the docker-compose yml from the github and the example.env file that i renamed to env
Daniel
Daniel•5mo ago
Please actually post them Exactly what you have, not from github
oButane
oButaneOP•5mo ago
Ah ok!
elegos
elegos•5mo ago
And then post the logs, too
oButane
oButaneOP•5mo ago
My bad give me a few minutes I hoped in the shower after posting lol. I did open up ports 2283 on firewall for tcp and udp just in case, also pinged my server from another machine and that was fine. I also made sure docker was enabled etc off the top of my head
Daniel
Daniel•5mo ago
Not expecting the fast Immich support haha
oButane
oButaneOP•5mo ago
Exactly 😂
oButane
oButaneOP•5mo ago
ok so here are the files;
oButane
oButaneOP•5mo ago
what I have done so far:
Daniel
Daniel•5mo ago
For one thing spaces in paths are never a good idea And having your database on windows (ntfs) is a bad idea and most likely won't work https://immich.app/docs/install/requirements#special-requirements-for-windows-users we have a section on this
oButane
oButaneOP•5mo ago
verified docker container network binding verify host accessibility client browser successfully reached server ip:2283 but did not send any data checked logs on immich server and found issue with it connecting to postgres postgres was running fine and healthy but immich_server still unable to connect to postgres ran the logs for immich postgres and it said everything was successful checked the listening address for postgresql.conf and it said # port 5432 and basically stopped at it wanting me to edit the sql file. tried playing around with changing network mode for docker container also docker network connect bridge immich_server allowed traffic on port 2283 This is all the things I tried ahh okay, so that immich not being able to access it may be throwing it off?
Daniel
Daniel•5mo ago
I feel like your database isn't healthy, yes. And even if it is it will( break at some point with that seteup So I'd suggest fixing that first and then going from there
oButane
oButaneOP•5mo ago
okay cool I will fix this first! Hi, so I encountered another error, since I had to remove the path and put DB_DATA_LOCATION=pgdata but its a different issue, the Immich_server container keeps erroring out saying that it failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich' I figured that I had to move the encode-video folder to where it wanted it but that didnt fix it it then wanted it in a different folder. I decided to change the upload location in the env file to UPLOAD_LOCATION=D:\Immich\upload and it said failed to read upload/library/.immich I decided to change it now to UPLOAD_LOCATION=D:\Immich\upload\encoded-video and it says failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich' the actual file is located in D:\Immich\upload\encoded-video here are the files lol sorry its a headache idk why I keep encountering errors on my end
Daniel
Daniel•5mo ago
When moving folders around you need to make sure you're moving everything that's in the folder That includes .immich files
oButane
oButaneOP•5mo ago
is there not a .immich in that folder? I just cut and pasted it around and there should be it in there yup upload/encoded-video/immich exists theres also a .immich file inside of upload itslef along with another folder whose name is a string of letter and numbers
oButane
oButaneOP•5mo ago
error log;
oButane
oButaneOP•5mo ago
now since it was saying something about looking for a library folder with a .immich inside of upload I added a library folder and named a blank file inside .immich and now its stating that it failed to read upload/library/.immich
Daniel
Daniel•5mo ago
It should be encoded-video/.immich Not /immich I think you got confused with all your folders
oButane
oButaneOP•5mo ago
Data D: Immich-> backups Librarys profile thumbs upload-> 6adf7... encoded-video-> .immich library .immich Media- hosting all my photos --- tried recreating the folder system I have to show u then C: Docker files-> immich-app -> postgres .env docker-compose.yml
Daniel
Daniel•5mo ago
Yeah so having encoded videos, library, etc under upload again is cursed
oButane
oButaneOP•5mo ago
ah so im just gonna put it in the immich folder above all that ok and also ahh i didnt see librrary was in there twice OHHH I get it now, the immich folder was located in the D drive but I made the D drive a volume so I got the error code the source path had too many colons and it was looking for my d drive inside of users//username//dockerfiles//immich-app//D:immich:/usr/src/app/upload:rw ok fixed that part
Daniel
Daniel•5mo ago
Lmao the Immich emote Btw you should not have your database on windows You have the postgres folder under C here
oButane
oButaneOP•5mo ago
yea i was confused as to why that did that lol. & yea idk what I did but I did the image-app folder for docker with the env and yml in my c drive and im assuming that since all of my media is on my d drive and the immich folder with upload and library etc was on my d drive with the media so when I made the d drive a volume etc I think that broke it. but yes is the postgres folder supposed to be in the immich-app folder or the Immich folder? I fixed the previous by copying everything that was in the immich folder to the immich-app folder
Daniel
Daniel•5mo ago
Oh just realizing I told you that earlier already, sorry 😅
oButane
oButaneOP•5mo ago
no worries lol, thats why I did the pgdata thing
Daniel
Daniel•5mo ago
The postgres folder is supposed to be in WSL Or as a docker volume If you did that you shouldn't have a postgres folder though
oButane
oButaneOP•5mo ago
originally this just had postgres, yml, and env
No description
oButane
oButaneOP•5mo ago
but I added all the other stuff to it from the other foldr its running again now so thats a start
Daniel
Daniel•5mo ago
Are you using pgdata now?
oButane
oButaneOP•5mo ago
sorry not sure what you mean by that, the env file has it as DB_DATA_LOCATION=pgdata and the yml file I put pgdata: under volume
Daniel
Daniel•5mo ago
That's good Is it possible the postgres folder is just a leftover from earlier then?
oButane
oButaneOP•5mo ago
yes most likely so, let me check the d drive and see if theres one in there ok so now its safe to move back to squasre one only available via local host, do I have to login and create a admin first before its available on 192...?
Daniel
Daniel•5mo ago
Nah, that's unrelated I'd have a search for windows firewall stuff
oButane
oButaneOP•5mo ago
Ok, I did the open port stuff in the firewall and I made sure everything pertaining to docker was enabled Is it possible that docker has its own firewall
Daniel
Daniel•5mo ago
If you expose a port like 2283:2283 that should be exposed to the host
oButane
oButaneOP•5mo ago
Yes sir, The port is exposed
oButane
oButaneOP•5mo ago
No description
oButane
oButaneOP•5mo ago
this specifically have you guys ever seen this issue "The output of docker network inspect bridge appears normal and indicates that the default bridge network is configured correctly. However, the Containers section being empty ("Containers": {}) suggests that no containers are currently attached to the bridge network" after inspecting docker bridge So im still troubleshooting with chatgpt, everything is working but still not contacting the server via 127...:2283 chatgpt things its something to do with immich specifically looking for ipv4 or ipv6 address so its trying to have me force bind it to 0.0.0.0 in the yml. Chat gpt is stumped on this because its suggesting stuff we already did at this point lol Yea its stating that its listening on Listening on http://[::1]:2283 which chatgpt says is keeping it stuck on ipv6
Mraedis
Mraedis•5mo ago
chatgpt is wrong a lot If you used stock docker desktop and stock immich, it's 100% the windows firewall somewhere
Daniel
Daniel•5mo ago
Oh wait just noticing another thing. You're using opera with that stupid "private" (data stealing) VPN. Can you try another browser?
oButane
oButaneOP•5mo ago
I figured I was going on a wild goode chase with chatgpt but it did show me how to check a bunch of stuff. Yea I thought that earlier as well, i clicked the vpn thing and it was off and I tried it on edge but same thing. Let me triple check and use my other machine
sogan
sogan•5mo ago
Try adding this to your .wslconfig file:
[wsl2]
networkingMode=bridged
[wsl2]
networkingMode=bridged
Then restart WSL2
oButane
oButaneOP•5mo ago
I sent my cousin the yml and env files and he built them fine no problem so its something on my end, Im on windows 10 and it says on microsoft wsl documentation that I cant use networkingmode unless its on windows 11 but im going to try just in case yea it gives me a error im gonna completely uninstall docker and delete everything and try it one more time So I bought the pro version of windows so I can have the hyperv options and to perfectly reflect the machine my cousins using and still had the same issue, im resetting my network because the only difference between all of our settings and setups is that he has a network adapter for wsl and I dont. but literally its crazy because we both have the same settings lol im stumped. Okay so I think I got it Im gonna test this tomorrow but possibly there is a issue with my wsl on my machine Im not sure if theres a legacy archive of chats like this but at this point I want to solve this and put the steps in here so if you ever encounter someone with this issue we can also check this But if I fix it then I will put the steps in here on the wsl stuff Reinstalled windows and its just working now smh.
Daniel
Daniel•5mo ago
Average windows moment :KEKL:
oButane
oButaneOP•5mo ago
Literally, lmao im gonna trouble shoot a few things and see if it breaks because I havent done the pgdata thing but lets see. also if anyone has the same issue Im thinking it was wsl, there was probably a weird error so after reinstalling windows I enabled wsl, enabled hyper v, downloaded a wsl from microsoft store and thats pretty much it as far as doing things differently. also hyperv and some wsl options are weird on windows home versions so its recommended to use pro. I upgraded to pro yesterday but did the clean install today So immich's yml and env are located in the linux subsystem, I was able to move the library to my D drive, and no need for postgres because im using pgdata Steps to get immich running on windows 10; 1. Have windows 10 pro version 2. Enable wsl (either via windows features or command line) 3. Make sure wsl is installed properly (command line wsl --install Wsl --update) 4. Enable hyper V 5. Install docker and keep settings 6. Inside of Linux folder that you see in file explorer docker will have created its own folder with a bunch of folders go to the home folder and create user>docker> Open powershell in that folder and run mkdir ./immich-app that will create a folder in that folder so the full path will look like Linux>docker-files>home>user>docker>Immich-app. 7. Create a folder where you want your library stuff to be, it doesnt have to be in the linux folders as I just did it in my D drive. D: user>media>Immich In this folder just make a library folder and possibly a postgres if your setup needs one or nothing if your using pgdata. 8. Download the yml and env files and edit the library location and if you need to do the volume stuff for pg data. 9. Run the container and test on browser localhost. 10. Setup ports to access from different machine inside same network. 11. If this doesnt work but localhost does then check immich server logs on docker. In all honesty its quicker to reinstall windows to fix wsl vs going down the rabbit hole of random errors. 12. Maybe uninstalling and reinstalling, Docker, wsl, and or Ubuntu Could somewhat fix wsl but I had 0 luck with that. There is a bios setting for hyperV/wsl on some mobo's check that and try again. To check windows version type "winver" into Run. This is my setup guide for windows 10 users. In case they every experience this problem.

Did you find this page helpful?