fiskaltrust/product-de-bring-your-own-datacenter

Internal Server Error at Request "Echo - Cashbox Restart"

AndreasEntscheffPinter opened this issue · 3 comments

I followed the guide at https://github.com/fiskaltrust/product-de-bring-your-own-datacenter to install bring-your-own-datacenter at a GoogleCloudPlatform Kubernetes-Cluster. It seems the installation was successful because if I navigate to http://[AMBASSADOR_ENDPOINT_IP]/api/version I get the expected output:
[
"fiskaltrust.SignatureCloud.DE",
"1.0.0",
"api:v1"
]

Now I used the guide at https://github.com/fiskaltrust/product-de-bring-your-own-datacenter/blob/master/QuickStart.md to set up a cashbox. After doing all the steps I tried doing the "1. Echo - Cashbox Restart" request from the "fiskaltrust DE ByoDC TestCall" postman collection (of course I set the cashbox-id, accesstoken and base_url...). The request runs for around 15 seconds and then crashes with "500 Internal Server Error". What can I do to troubleshoot this?

I already have a few suspicions:

  1. At the logs of the Kubernetes-Cluster I see this:
    "2020/10/28 10:27:52 kubernetes:service|bring-your-own-datacenter||hostname=: ERROR: WORKER PANICKED: unable to parse requirement: invalid label value: "*": at key: "hostname": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')"
    If I view the configuration-settings using this command...
    helm show values fiskaltrust/bring-your-own-datacenter
    ... I see there's a value
    hostname: "*"
    I think this could be the problem. Did you ever try your application at a googleCloudPlatform Kubernetes-Cluster?
    I will try to fix this by specifying an empty string instead of * at the hostname value
    UPDATE (29.10.2020): empty string instead of "*" at the hostname configuration entry helped, I don't see any errors anymore in the cluster and container logs after fixing this

  2. At creating the queue in the sandbox portal the guide reads, I shall click the "http(REST)" button to create an endpoint and after doing this the UI proposes this in the endpoint inputbox:
    rest://localhost:1500/8facd875-5204-4900-82ce-838f01d1613a
    I now replaced localhost:1500 by the IP of my ambassador endpoint before saving so the result I saved was:
    rest://[AMBASSADOR_ENDPOINT_IP]/8facd875-5204-4900-82ce-838f01d1613a
    Is this correct? Or should I have used [AMBASSADOR_ENDPOINT_IP]:1500? Or maybe don't edit the value at all and leave localhost there?

  3. At creating the SCU I have a similar issue as in the previous point. The guide reads I shall click the gRPC button to craete a gRPC endpoint. The inputbox proposed "grpc://localhost:1401". I replaced again localhost by the ambassador endpoint IP and removed the port information :1401 so the result was grpc:// [AMBASSADOR_ENDPOINT_IP]. Is it correct to do it like that?

Please answer my questions that I highlighted in bold. Any other input that will help me to move forward is also appreciated of course :-) Thank you.

Hi Andreas, thank you for this detailed question.

  • No, we did not test ByoDC on GCP/GKE yet
  • The Endpoints which are created in Queues and SCUs are used by the middleware internally. This is for more complex scenarios when using the middleware functions on different computers. In ByoDC scenario the Queue and SCU are communicating directly. So you should not edit the endpoints. The Ambassador endpoint is only for routing inbound requests from your POS Systems.
    I hope I could answer your question properly...

Thank you very much Christian :-)
Your answer was the first part of the solution.
The second part was fixing a connection issue between the middleware and the mysql-database-server that I had configured in the portal. After fixing this the internal server error is gone now and I can move forward with implementing the solution.

You are most welcome, Andreas.
Have a nice weekend...