Comments (22)
I don't understand what the fix is here. I have a default filebrowser installation and keeps giving me this healtcheck error too:
curl: (3) URL rejected: Bad hostname
- Execute an interactive shell inside the container
docker exec -it -u root [CONTAINER_NAME] ash
- Install nano (or another editor of your choice):
apk add --no-cache nano
- Edit
healthcheck.sh
:nano healthcheck.sh
- Add the
-r
or--raw-output
flag to the jq command:
ChangeADDRESS=${FB_ADDRESS:-$(jq .address /.filebrowser.json)}
toADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)}
from filebrowser.
@mapxn and future readers, the problem has been identidied and fixed (see #3087), no need to spam report. Either wait for the next release, or use one of the optiones above to temporarily fix it yourself.
from filebrowser.
Guess this wont work for me, as it repulls the image in portainer when i change my compose to run as root (otherwise i cant edit healtcheck). I need a new docker image build :-(
I fixed mine by doing a cat to the healthcheck (docker exec -it filebrowser cat healthcheck.sh
) to get its content. Made a copy outside of the container since you have the /srv mounted to some place inside the machine, keeping the same name. Edited the script to add the -r flag and copied back the edited file, replacing the old one.
Here's a one line command as a temp fix:
docker exec -it [CONTAINER_NAME] sed -i 's/\(jq .address \/.filebrowser\.json\)/\1 -r/' healthcheck.sh
from filebrowser.
If fixing a typo that makes the default docker image unusable takes more than two weeks, that doesn't really instill confidence in the project.
from filebrowser.
FYI, the fix has been merged (#3130), so just wait for the next release 😁
from filebrowser.
@jinks If you think you can do better, why don't you fork this project and maintain it better instead. Don't forget that this project is maintained by unpaid volunteers with their own lives, and no obligations to any of us.
from filebrowser.
@Tuumke You don't have to run the container as root. If you are using Portainer, you can execute a shell from the webui (select /bin/ash
), and there you can specify the user, type root
inside:
PS. Fixed my comment above
from filebrowser.
Needs to get merged first.
from filebrowser.
from filebrowser.
Ah, you're correct. The double quotes are introduced by executing jq without the -r (--raw-output) flag. I didn't realize there was already logic in healthcheck.sh
intended to fallback to "localhost".
Not sure why yours wasn't falling back to localhost though. Adding the -r flag is all I needed.
from filebrowser.
Ah, you're correct. The double quotes are introduced by executing jq without the -r (--raw-output) flag. I didn't realize there was already logic in
healthcheck.sh
intended to fallback to "localhost".Not sure why yours wasn't falling back to localhost though. Adding the -r flag is all I needed.
Oh yes, you're right. Only -r is needed. Just tested on a fresh container and it works fine.
from filebrowser.
I don't understand what the fix is here. I have a default filebrowser installation and keeps giving me this healtcheck error too:
curl: (3) URL rejected: Bad hostname
from filebrowser.
I don't understand what the fix is here. I have a default filebrowser installation and keeps giving me this healtcheck error too:
curl: (3) URL rejected: Bad hostname
Were you able to inspect the pull request? That might make it clear. There's a healthcheck.sh script inside the container that needs to be changed to incorporate the mentioned -r parameter.
from filebrowser.
I don't understand what the fix is here. I have a default filebrowser installation and keeps giving me this healtcheck error too:
curl: (3) URL rejected: Bad hostname
1. Execute an interactive shell inside the container ```shell docker exec -it [CONTAINER_NAME] ash ``` 2. Install nano (or another editor of your choice): ```shell apk add --no-cache nano ``` 3. Edit `healthcheck.sh`: ```shell nano healthcheck.sh ``` 4. Add the `-r` or `--raw-output` flag to the jq command: Change `ADDRESS=${FB_ADDRESS:-$(jq .address /.filebrowser.json)}` to `ADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)}`
Guess this wont work for me, as it repulls the image in portainer when i change my compose to run as root (otherwise i cant edit healtcheck). I need a new docker image build :-(
from filebrowser.
Have the same issue.
from filebrowser.
Guess this wont work for me, as it repulls the image in portainer when i change my compose to run as root (otherwise i cant edit healtcheck). I need a new docker image build :-(
I fixed mine by doing a cat to the healthcheck (docker exec -it filebrowser cat healthcheck.sh
) to get its content. Made a copy outside of the container since you have the /srv mounted to some place inside the machine, keeping the same name. Edited the script to add the -r flag and copied back the edited file, replacing the old one.Here's a one line command as a temp fix:
docker exec -it [CONTAINER_NAME] sed -i 's/\(jq .address \/.filebrowser\.json\)/\1 -r/' healthcheck.sh
Thanks for your workaround!
If your container does not run as root, just add "-u root".
docker exec -it -u root [CONTAINER_NAME] sed -i 's/\(jq .address \/.filebrowser\.json\)/\1 -r/' healthcheck.sh
from filebrowser.
healthechk.sh shoudl be changed to:
#!/bin/sh PORT=${FB_PORT:-$(jq -r .port /.filebrowser.json)} ADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)} ADDRESS=${ADDRESS:-localhost} curl -f http://$ADDRESS:$PORT/health || exit 1
-r needs to be added in order to give just the strings and not "strings", i.e. the address is
http://filebrowser:431/health
and not
http://"filebrowser":431/health
from filebrowser.
@lustrant Already has been (see #3087)
from filebrowser.
But when can we see this fixed in the docker image? :O
Been a while now, surely this is pushed easy into a new image?
from filebrowser.
@Guiorgy Because I don't care enough to maintain a project long-term.
The question remains, why pushing a 2-letter fix to Docker Hub remains such a chore. It's not even part of the core code. Unless there is something seriously wrong with the release process, I would imagine pushing the fix to Docker should be less work than this thread has already consumed.
from filebrowser.
@jinks As I said, they have their lives, maybe they have something more urgent going on. And it's not like the container is completely broken, or hard to manually workaround.
from filebrowser.
I'm running into this issue as well, and my workaround is to add an environment variable FB_ADDRESS: 0.0.0.0
so that the command jq .address /.filebrowser.json
doesn't work
from filebrowser.
Related Issues (20)
- An exception occurred while browsing pictures
- The missing docs.... Bootstrap a filebrowser container
- configured server port is ignored
- [BUG]Text Formatting Error
- Service terminates (no info)? HOT 3
- Space used not updating untill site refreshed HOT 3
- 在电脑重启后程序会在system32文件夹下再次生成一个数据库文件 HOT 1
- 百度网盘上传文件怎么都上传补上去。现实复制成功但是model根本没更新
- cannot modify odoo.conf from file manager
- 能登录但是无法访问
- Provide API Documentation And some sdk client and server for filebrowser
- Change Image Preview Cropping
- Ability to Remove 'Login' button from shared links
- Firefox don't load full folder, can't see all files present.
- Object object error
- Just wanted to say thank you for existing! HOT 2
- 有没有手里APP版本 HOT 1
- Ability to create temporary users
- Copy to Clipboard Buttons Not Working in Safari
- The shell window is displayed underneath the settings icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filebrowser.