EventStore / EventStore.UI

The user interface for Event Store
57 stars 37 forks source link

Trouble running projection query when tunneling #361

Closed Jusbeer closed 1 year ago

Jusbeer commented 1 year ago

When attempting to run a projection query from the Query tab in a cluster in version 22.10, and accessing the EventStore UI through tunneling using VPC peering, this error message is appearing "Failed to update the query: Unknown error." This issue prevents the successful update of projection code within the cluster.

Steps to reproduce the error: 1.Establishes tunneling using VPC peering to access the EventStore cluster running version 22.10.

  1. Navigate to the query tab in the UI interface through the established tunnel.
  2. Update the projection query code with the following code:
fromStream("name-8c4d2f6b-cb36-41d7-bb7b-3fc64e0a03f8")
  .when({
      $init: function(){
          return {
              count: 0
          }
      },
      $any: function(s,e){
          s.count += 1;
      }
  })
  1. Click on the update/save button to apply the changes and the following error message is shown: "Failed to update the query: Unknown error".
Jusbeer commented 1 year ago

After thorough testing and investigation, the issue appears seems to be due to an incorrect network configuration. A correct way to access the UI using tunneling with a container (ip 1.2.3.4) in a peered network would be to, run the command "socat tcp-listen:2113,reuseaddr,fork tcp:cg0o80do0aessv79nhg0.mesdb.eventstore.cloud:2113" in the container, and adding these entries: 1.2.3.4 cluster-id-0.mesdb.eventstore.cloud 1.2.3.4 cluster-id-2.mesdb.eventstore.cloud 1.2.3.4 cluster-id-1.mesdb.eventstore.cloud to /etc/hosts/ on your machine, then access the UI using https://cluster-id-1.mesdb.eventstore.cloud:2113/ from the browser in your machine.