Open AsixJin opened 3 months ago
Server logs are correct. The server waits for the database to become available. As soon as Postgre is available, the database migration runs. Can you use your Browser's developer console (F12) to check the real issue (detail section of the GraphQL error response) ?
It seems its trying to connect to localhost:8080 when it should be my.url:92 (not the actual url but how I'm representing it here). Is there a setting I forgot to change?
createHttpLink.ts:164
POST http://localhost:8080/graphql net::ERR_CONNECTION_REFUSED
(anonymous) @ createHttpLink.ts:164
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ index.ts:22
Promise.then (async)
(anonymous) @ index.ts:19
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ index.ts:35
e @ module.js:190
t.subscribe @ module.js:264
complete @ Concast.ts:211
t.start @ Concast.ts:104
t @ Concast.ts:84
e.getObservableFromLink @ QueryManager.ts:990
e.getResultsFromLink @ QueryManager.ts:1061
g @ QueryManager.ts:1439
e.fetchQueryByPolicy @ QueryManager.ts:1471
v @ QueryManager.ts:1166
e.fetchQueryObservable @ QueryManager.ts:1207
t.fetch @ ObservableQuery.ts:692
t.reobserve @ ObservableQuery.ts:831
(anonymous) @ ObservableQuery.ts:140
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ useQuery.ts:199
Mo @ react-dom.production.min.js:174
rl @ react-dom.production.min.js:244
yc @ react-dom.production.min.js:286
(anonymous) @ react-dom.production.min.js:282
y @ scheduler.production.min.js:13
w @ scheduler.production.min.js:14
Show 31 more frames
Show less
GraphQLContext.tsx:36 {operation: {…}, networkError: TypeError: Failed to fetch
at http://my.url:92/static/js/main.1983908c.js:2:…, graphQLErrors: undefined, forward: ƒ}forward: ƒ (e)graphQLErrors: undefinednetworkError: TypeError: Failed to fetch
at http://my.url:92/static/js/main.1983908c.js:2:1934175
at new e (http://my.url:92/static/js/main.1983908c.js:2:1913826)
at t.subscribe (http://my.url:92/static/js/main.1983908c.js:2:1914765)
at http://my.url:92/static/js/main.1983908c.js:2:2033268operation: {variables: {…}, extensions: {…}, operationName: undefined, query: {…}, setContext: ƒ, …}[[Prototype]]: Object
(anonymous) @ GraphQLContext.tsx:36
error @ index.ts:57
Gp @ module.js:137
Yp @ module.js:176
t.error @ module.js:229
Gp @ module.js:137
Yp @ module.js:176
t.error @ module.js:229
I_ @ parseAndCheckHttpResponse.ts:172
(anonymous) @ createHttpLink.ts:177
Promise.catch (async)
(anonymous) @ createHttpLink.ts:177
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ index.ts:22
Promise.then (async)
(anonymous) @ index.ts:19
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ index.ts:35
e @ module.js:190
t.subscribe @ module.js:264
complete @ Concast.ts:211
t.start @ Concast.ts:104
t @ Concast.ts:84
e.getObservableFromLink @ QueryManager.ts:990
e.getResultsFromLink @ QueryManager.ts:1061
g @ QueryManager.ts:1439
e.fetchQueryByPolicy @ QueryManager.ts:1471
v @ QueryManager.ts:1166
e.fetchQueryObservable @ QueryManager.ts:1207
t.fetch @ ObservableQuery.ts:692
t.reobserve @ ObservableQuery.ts:831
(anonymous) @ ObservableQuery.ts:140
e @ module.js:190
t.subscribe @ module.js:264
(anonymous) @ useQuery.ts:199
Mo @ react-dom.production.min.js:174
rl @ react-dom.production.min.js:244
yc @ react-dom.production.min.js:286
(anonymous) @ react-dom.production.min.js:282
y @ scheduler.production.min.js:13
w @ scheduler.production.min.js:14
Show 40 more frames
Show less
Vivaldi: Link transitioned from draggable to text-selection mode.
See: https://help.vivaldi.com/?p=104354:
Vivaldi: Link transitioned from draggable to text-selection mode.
See: https://help.vivaldi.com/?p=104354:
Yes, you're missing this configuration: https://github.com/ncarlier/readflow/blob/master/internal/config/defaults.toml#L33
Still getting the error after adding the config file. Here's my new docker compose:
version: "3"
services:
########################################
# PostgreSQL
########################################
db:
image: postgres:14
container_name: db_postgres
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB:-readflow}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-secert}
volumes:
- db-data:/var/lib/postgresql/data
########################################
# readflow
########################################
readflow:
image: "ncarlier/readflow:edge"
restart: always
depends_on:
- db
ports:
- "${PORT:-92}:8080"
environment:
- READFLOW_DATABASE_URI=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-secert}@db_postgres:5432/${POSTGRES_DB:-readflow}?sslmode=disable
- READFLOW_AUTHN_METHOD=basic
- READFLOW_AUTHN_BASIC_HTPASSWD_FILE=file:///var/local/demo.htpasswd # "demo" as username and password
- READFLOW_CONFIG=/var/config.toml
volumes:
- /path/to/demo.htpasswd:/var/local/demo.htpasswd
- /path/to/config.toml:/var/config.toml
networks:
default:
volumes:
db-data:
I copied the default config settings into my config.toml, and I'm still getting the following errors in the browser:
localhost:8080/graphql:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
GraphQLContext.tsx:36 Objectforward: ƒ (e)graphQLErrors: undefinednetworkError: TypeError: Failed to fetch
at http://my.url:92/static/js/main.1983908c.js:2:1934175
at new e (http://my.url:92/static/js/main.1983908c.js:2:1913826)
at t.subscribe (http://my.url:92/static/js/main.1983908c.js:2:1914765)
at http://my.url:92/static/js/main.1983908c.js:2:2033268message: "Failed to fetch"stack: "TypeError: Failed to fetch\n at http://my.url:92/static/js/main.1983908c.js:2:1934175\n at new e (http://my.url:92/static/js/main.1983908c.js:2:1913826)\n at t.subscribe (http://my.url:92/static/js/main.1983908c.js:2:1914765)\n at http://my.url:92/static/js/main.1983908c.js:2:2033268"[[Prototype]]: Erroroperation: {variables: {…}, extensions: {…}, operationName: undefined, query: {…}, setContext: ƒ, …}[[Prototype]]: Object
(anonymous) @ GraphQLContext.tsx:36
I figure I must be missing or forgetting to do something, but this must be the first step in the right direction because I am getting fewer errors. Thanks again for your help.
Sorry, I didn't clearly state this. You don't need to copy the default configuration file, just set the corresponding configuration variable: READFLOW_HTTP_PUBLIC_URL
In your case, set READFLOW_HTTP_PUBLIC_URL=http://my.url:92
Regarding your Docker Compose:
version: "3"
services:
########################################
# PostgreSQL
########################################
db:
image: postgres:14
container_name: db_postgres
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB:-readflow}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-secert}
volumes:
- db-data:/var/lib/postgresql/data
########################################
# readflow
########################################
readflow:
image: "ncarlier/readflow:edge"
restart: always
depends_on:
- db
ports:
- "${PORT:-92}:8080"
environment:
- READFLOW_DATABASE_URI=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-secert}@db_postgres:5432/${POSTGRES_DB:-readflow}?sslmode=disable
- READFLOW_AUTHN_METHOD=basic
- READFLOW_AUTHN_BASIC_HTPASSWD_FILE=file:///var/local/demo.htpasswd # "demo" as username and password
- READFLOW_HTTP_PUBLIC_URL=http://my.url:92
volumes:
- path/to/var/demo.htpasswd:/var/local/demo.htpasswd
networks:
default:
volumes:
db-data:
I'm trying to install readflow on my server (Docker) but I just can't seem to get this working. I get a page that says it can't get user information. It seems to be an issue with the database, but I can't figure out what's going on. Below is my current docker compose:
readflow container log