Comments (9)
Hi @myskamartin, can you try
- Run
curl http://localhost:5001/health/liveness
to make sure the API service is started successfully. - Check the API service logs, any exceptions?
And another thing I want to mention is that you only need to run the mongodb initialization script manually if you're using an external mongodb. The "built-in" mongodb in docker-compose is initialized automatically (see line 75)
Lines 64 to 77 in d8db09c
from featbit.
And to figure out why the preflight request fails, try the following command in bash:
curl -v 'http://localhost:5001/api/v1/user/has-multiple-workspaces' \
-X 'OPTIONS' \
-H 'Access-Control-Request-Headers: authorization,content-type,organization,workspace' \
-H 'Access-Control-Request-Method: POST' \
-H 'Origin: http://localhost:8081'
from featbit.
Hi @deleteLater, and thanks for your reply.
The API server has started successfully:
[root@ip-10-98-170-245 ~]# curl http://localhost:5000/health/liveness
Healthy
I don't see any exception in the API logs that would raise my attention, everything looks in order.
But checking why the preflight request fails reveals the 204 No Content
(full output below)
[root@ip-10-98-170-245 featbit]# curl -v 'http://localhost:5000/api/v1/user/has-multiple-workspaces' \
> -X 'OPTIONS' \
> -H 'Access-Control-Request-Headers: authorization,content-type,organization,workspace' \
> -H 'Access-Control-Request-Method: POST' \
> -H 'Origin: http://localhost:8081'
* Trying 127.0.0.1:5000...
* Connected to localhost (127.0.0.1) port 5000> OPTIONS /api/v1/user/has-multiple-workspaces HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/8.3.0
> Accept: */*
> Access-Control-Request-Headers: authorization,content-type,organization,workspace
> Access-Control-Request-Method: POST
> Origin: http://localhost:8081>
< HTTP/1.1 204 No Content
< Date: Fri, 29 Mar 2024 22:04:08 GMT
< Server: Kestrel
< Access-Control-Allow-Headers: authorization,content-type,organization,workspace
< Access-Control-Allow-Methods: POST
< Access-Control-Allow-Origin: *
<
* Connection #0 to host localhost left intact
Any further help is much appreciated.
FYI: I have started a new installation on Amazon Linux 2023 instance, thus I am no longer using port 5001
from featbit.
Try running the following script in mongodb and see what happens?
https://github.com/featbit/featbit/blob/main/infra/mongodb/docker-entrypoint-initdb.d/init.js
from featbit.
Hi @cosmic-flood,
Running the script will seed the database, but the issue remains and I don't see exceptions in the logs either.
from featbit.
The preflight request returns 204 indicating that there is no CORS issue. Our Api service has request logging enabled by default, so if you refresh your browser, you'll see a browser request log like this one. Can you see these logs?
If there are no such logs, means that the request did not reach to the Api service.
from featbit.
No, I don't see that in the logs at all.
I am a little bit confused. Given the docker-compose
configuration and that I can reach the API
container from the UI
container, what else do I need to do to reach the API service?
Again, I am not changing the configuration at all to be clear on this one.
from featbit.
Ok, so the question is why requests sent from the browser are not reaching the API service. To be clear, the request was sent from the browser, not the UI service, so you need to make sure that you can access the API service from the machine that is accessing the UI.
For example, you run docker-compose on machine A and then access the UI from machine B, that's not gonna work. If that's your case, you need to update the environment variable "API_URL" to http://machine-A-host:5000
Lines 3 to 15 in 7a89dd5
from featbit.
Close this issue as there is no further information. Feel free to reopen it if you have any questions. @myskamartin
from featbit.
Related Issues (20)
- [Bug]: Social links not working in the footer of the website. HOT 4
- Feature Suggestion: Able to Enable/Disable feature flag's insights data collection
- Feature Suggestion: OpenFeature SDK Javascript - Web APP Front-end HOT 1
- Feature Suggestion: OpenFeature SDK Java HOT 1
- [BUG] The "Is One Of" condition in the form is not functioning properly, as illustrated in my screen capture. HOT 2
- [Bug]: space missing between flag name and "is changed" in notification popover
- Blazor WASM HOT 2
- Feature Suggestion: Method Level @FeatGate HOT 1
- Feature Suggestion: Client-Side SDK for .NET HOT 11
- [Bug]: When select operation first, the property can't be selected
- [Bug]: Links to documentation in the feature flag editor UI are bad and go to 404 pages HOT 1
- [BUG] If the variation name is not short, we won't be able to see the full name. HOT 2
- Feature Suggestion: NextJs support
- Feature Suggestion: Include mongodb upgrade scripts in the helm chart so they don't need to be run manually
- Feature Suggestion: AWS DocumentDB Compatible for FeatBit 3.2.0+
- [Good First Issues]: Add Connection Information to Featbit Eval Server logs HOT 4
- [BUG] Cannot login on fresh install HOT 4
- [Bug]: sanitize inputs for Feature Flags's Key
- [Bug]: Unable to switch project, env in my dell laptop
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 featbit.