abstruse icon indicating copy to clipboard operation
abstruse copied to clipboard

abstruse-worker_linux_amd64 does not connect on Debian buster 64

Open jvmvik opened this issue 3 years ago • 6 comments

If I install and run the 2.0.0 version on debian buster. The server works great with postgres 11 but the worker does not want to connect. I see:

invalid character '<' looking for beginning of value

Looking at the source code, the error is coming from the GRPC standard error mechanism. But I cannot pinpoint the cause. Any idea ? I wonder if this application requires dependency to "protobuf".

Thanks

jvmvik avatar Mar 01 '21 03:03 jvmvik

did you set same jwt secret on both server and worker side?

jkuri avatar Mar 01 '21 15:03 jkuri

btw neither server or worker needs protobuf dependency, only for building from source. can you see any other error on the workers output? please try to use --logger-level=debug when running worker.

jkuri avatar Mar 01 '21 18:03 jkuri

With the 2.0 release the log option does not bring much more details.

server

2021-03-06T09:10:37.260-0600    DEBUG   succesfully connected to database       {"type": "db"}                                                                                  
2021-03-06T09:10:37.260-0600    DEBUG   starting websocket server on ws://127.0.0.1:2220        {"type": "websocket"}                                                           
2021-03-06T09:10:37.261-0600    INFO    starting scheduler loop {"type": "scheduler"}
2021-03-06T09:10:37.261-0600    INFO    starting HTTP server on localhost:8080  {"type": "http"}                                                                                

worker on the same host

 ./abstruse-worker_linux_amd64 --logger-level debug --auth-jwtsecret=4d8903ee
2021-03-06T09:23:46.958-0600    INFO    grpc server listening on localhost:3330 {"type": "server"}
2021-03-06T09:23:46.959-0600    ERROR   invalid character '<' looking for beginning of value    {"type": "app"}

~/abstruse/abstruse.json

{
  "auth": {
    "jwtsecret": "4d8903ee"
  },
  "db": {
    "charset": "utf8",
    "driver": "postgres",
    "host": "localhost",
    "name": "ci",
    "password": "ci",
    "port": 5432,
    "user": "ci"
  },
  "http": {
    "addr": "localhost:8080",
    "compress": false,
    "tls": false,
    "uploaddir": "uploads/"
  },
  "logger": {
    "filename": "abstruse.log",
    "level": "info",
    "maxage": 3,
    "maxbackups": 3,
    "maxsize": 500,
    "stdout": true
  },
  "tls": {
    "cert": "cert.pem",
    "key": "key.pem"
  },
  "websocket": {
    "addr": "127.0.0.1:2220"
  }
}

~/abstruse/abstruse-worker.json

{
  "auth": {
    "jwtsecret": "4d8903ee"
  },
  "grpc": {
    "addr": "localhost:3330"
  },
  "id": "acf94ad2",
  "logger": {
    "filename": "abstruse-worker.log",
    "level": "info",
    "maxage": 3,
    "maxbackups": 3,
    "maxsize": 500,
    "stdout": true
  },
  "registry": {
    "addr": "https://registry-1.docker.io",
    "password": "",
    "username": ""
  },
  "scheduler": {
    "maxparallel": 5
  },
  "server": {
    "addr": "http://localhost"
  },
  "tls": {
    "cert": "cert-worker.pem",
    "key": "key-worker.pem"
  }
}

jvmvik avatar Mar 06 '21 15:03 jvmvik

Are you behind a proxy? I just got the same issue, and turned out that it was a response from nginx <!DOCTYPE html>

invalid character '<' looking for beginning of value

That message looks like it could be the case

MrCyjaneK avatar Jun 16 '21 16:06 MrCyjaneK

yes, I'm behind NGinx proxy.

jvmvik avatar Jun 17 '21 01:06 jvmvik

Then please take look at https://www.nginx.com/blog/nginx-1-13-10-grpc/

MrCyjaneK avatar Jun 17 '21 05:06 MrCyjaneK