KIX - Forum

Community => Fragen | Konfiguration | Hilfe => Thema gestartet von: christianroeser am 10.08.2021 11:22:19

Titel: Field Agent App
Beitrag von: christianroeser am 10.08.2021 11:22:19
Hallo,

ich versuche gerade Kix Start in Verbindung mit der Field Agent App unter Android ans laufen zu bekommen. Ich scheitere bereits in der Anmeldemaske, dort erhalte ich beim Login die Meldung "Error general error". SSL ist mit einem Letsencrypt Zertifikat eingerichtet, das Backend läuft auf Port 443. Wenn ich die URL https://rechnername/api/v1 (https://rechnername/api/v1) aufrufe, erhalte ich auch folgende Meldung "{"Message":"The resource does not support the requested method. Please have a look into the \"Allow\" header which methods are supported by this resource.","Code":"NotAllowed"}". Das Frontend lässt sich über https://rechnername:8443 (https://rechnername:8443) vom Gerät aufrufen.


Meine Konfiguration schaut wie folgt aus:


enviroment

# the port on the docker host system where the backend service is listening
BACKEND_PORT=20000
BACKEND_PORT_SSL=443


# the port on the docker host system where the frontend service is listening
FRONTEND_PORT=20001
FRONTEND_PORT_SSL=8443


# the port on the docker host system where the ssp service is listening
SSP_PORT=20002
SSP_PORT_SSL=9443



ssl.conf


server {
  listen        8443 ssl;


  include       error.inc;


  include       /etc/nginx/conf.d/ssl/common.conf;
  include       /etc/nginx/conf.d/ssl/ssl.conf;


  location / {
    proxy_pass  http://frontend;


    include     /etc/nginx/conf.d/ssl/common_location.conf;


   proxy_http_version  1.1;
    proxy_set_header    Host            $host;
    proxy_set_header    Upgrade         $http_upgrade;
    proxy_set_header    Connection      $connection_upgrade;
    proxy_set_header    X-Real-IP       $remote_addr;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header    X-NginX-Proxy   true;
    proxy_headers_hash_max_size         512;
    proxy_headers_hash_bucket_size      128;
  }
}


server {
  listen        443 ssl;


  include       error.inc;


  client_max_body_size 100m;


  include       /etc/nginx/conf.d/ssl/common.conf;
  include       /etc/nginx/conf.d/ssl/ssl.conf;


  location / {
    proxy_pass  http://backend;


    include     /etc/nginx/conf.d/ssl/common_location.conf;
  }
}


server {
  listen        9443 ssl;


  include        error.inc;


client_max_body_size 100m;


  include       /etc/nginx/conf.d/ssl/common.conf;
  include       /etc/nginx/conf.d/ssl/ssl.conf;


  resolver       127.0.0.11 valid=30s;
  set            $ssp http://ssp;


  location / {
    proxy_pass  $ssp;
    include     /etc/nginx/conf.d/ssl/common_location.conf;
  }
}



docker-compose.yml


version: '3'


services:
  proxy:
    image: ${REGISTRY}/proxy:${IMAGE_TAG}
    depends_on:
      - backend
      - frontend
    ports:
      - ${FRONTEND_PORT}:80
      - ${BACKEND_PORT}:8080
      - ${SSP_PORT}:9080
      - ${FRONTEND_PORT_SSL}:8443
      - ${BACKEND_PORT_SSL}:443
      - ${SSP_PORT_SSL}:9443
    env_file:
      - environment
    volumes:
      - ./proxy/ssl:/etc/nginx/conf.d/ssl
      - ./proxy/non-ssl.conf:/etc/nginx/conf.d/non-ssl.conf
      - ./proxy/ssl.conf:/etc/nginx/conf.d/ssl.conf
    logging:
      options:
        max-size: "100m"
        max-file: "5"


  backend:
    image: ${REGISTRY}/backend:${IMAGE_TAG}
    user: "110010100"
    depends_on:
      - redis
    env_file:
      - environment
    volumes:
      - ./backend:/opt/kix/conf.d
      - shared:/mnt/shared
      - backend:/mnt/data
    logging:
      options:
        max-size: "100m"
        max-file: "5"
     
  frontend:
    image: ${REGISTRY}/frontend:${IMAGE_TAG}
    user: "110010100"
    depends_on:
      - backend
      - redis
    environment:
      - USE_SSL=0
      - REDIS_CACHE_HOST=redis
      - FRONTEND_CLIENT_ID=kix-agent-frontend
      - FRONTEND_NOTIFICATION_ID=kix-agent-frontend
      - NOTIFICATION_URL=http://frontend:3000/notifications
      - BACKEND_API_URL=http://backend:8080/api/v1
    env_file:
      - environment
    volumes:
      - shared:/mnt/shared
      - frontend:/mnt/data
    logging:
      options:
        max-size: "100m"
     
  db:
    image: ${REGISTRY}/db:${IMAGE_TAG}
    hostname: db
    env_file:
      - environment
    volumes:
      - db:/var/lib/postgresql/data
      - ./db/postgresql.conf:/etc/postgresql/postgresql.conf
    shm_size: '2gb'




  redis:
    image: ${REGISTRY}/redis:${IMAGE_TAG}


volumes:
    shared:
    db:
    backend:
    frontend:



Was mache ich falsch?


Gruß
Christian
Titel: Re: Field Agent App
Beitrag von: René Böhm am 10.08.2021 15:44:32
Hi Christian,
bitte die compose-file nicht ändern. Das wird nicht gebraucht. Der Port muss dort unverändert bleiben. Die Portänderung erfolgt nur über das environment-File.

Viele GrüßeRené
Titel: Re: Field Agent App
Beitrag von: christianroeser am 11.08.2021 11:57:20
Hallo René,


die Änderung habe ich rückgängig gemacht und die Konfiguration in der ssl.conf angepasst. Leider war das nicht die Lösung des Problems.


Im Logfile des Backends tauchen keinerlei Meldungen eines Verbindungsversuchs seitens der App auf. Lässt sich hier der Loglevel erhöhen?




Gruß
Christian
Titel: Re: Field Agent App
Beitrag von: Torsten Thau am 13.08.2021 08:33:32
Hi Christian,


kannst Du bitte via DM an products("ätt")cape-it(Punkt)de Kontakt aufnehmen? Ich würde das gern mal in einer Remote-Sitzung per Teamviewer oder so anschauen. Wir testen die App gegen unsere KIX.cloud da klappt der Zugriff. Ich denke daher, dass es eine Frage des Setups bzw. Verbindungen ist.


CU, Torsten