Code Monkey home page Code Monkey logo

maeve-csms's People

Contributors

ahl-tw avatar alessioerosferri avatar belarte-tw avatar dependabot[bot] avatar efesler avatar kaihendry avatar laurabassani avatar neinkeinkaffee avatar subnova avatar usuletw022 avatar vbdavid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maeve-csms's Issues

Running within a Podman unprivileged pod

I'm trying to test maeve-csms under Podman. While I was able to start all containers, I still fail to authenticate with occp-1.6 and I'm wondering if I do not misunderstood the login process.

Under podman/pod

  • containers share a unique network addr (hostname=cscms-host=10.88.0.10)
  • containers share a unique config volume
  • this imposes minor change on config params/values

Provisioning a charger-id with manager/api works
I may provision and verify that charging station was created

curl http://csms-host:9410/api/v0/cs/Tux-Basic -H 'content-type: application/json' -d '{"securityProfile":0, "base64SHA256Password":"c25vb3B5Cg=="}}'
curl http://csms-host:9410/api/v0/cs/Tux-Basic/auth
 > {"base64SHA256Password":"c25vb3B5Cg==","securityProfile":0}

Then I try to log with ocpp-rpc client
I already use ocpp-rpc client with other server, also I known the protocol works. In fact checking here after wireshark image, we may see that the request/authen is clean. Even if the password encoding is probably wrong.

const { RPCClient } = require('ocpp-rpc');
const cli = new RPCClient({
    endpoint: 'ws://csms-host:9310/ws', // the OCPP endpoint URL
    identity: 'Tux-Basic',
    password: 'c25vb3B5Cg==',            // the OCPP identity
    protocols: ['ocpp1.6'],          // client understands ocpp1.6 subprotocol
    strictMode: true,                // enable strict validation of requests & responses
});

Question:

  • how should I encode my password. When I look to wireshark the encoding does not seems to match ?
  • would someone have a working sample with a charing-station provisioning and a wireshark dump to check what should be sent

Here after my logs & startup script

Gateway log

2023/10/12 18:12:54 ERROR GET /ws/{id} duration=445.212µs http.scheme=ws http.method=GET http.url=/ws/Tux-Basic http.route=/ws/{id} csId=Tux-Basic ocpp.security_profile=0 auth.failure_reason="invalid password" http.status_code=401

Manager log

time=2023-10-12T18:12:16.140Z level=INFO msg="GET /api/v0/cs/Tux-B/auth" remote_addr=10.88.0.10:55506 status=404 bytes=23 duration=16.174µs
time=2023-10-12T18:12:54.321Z level=INFO msg="GET /api/v0/cs/Tux-Basic/auth" remote_addr=10.88.0.10:47434 status=200 bytes=60 duration=15.514µs

My Podman startup script

#!/bin/bash

# Script to start maeve-cms inside a podman 'pod'
# author: Fulup Ar Foll (iot.bzh)
# Licence: Apache-v2

if test -z "$ROOTDIR"; then
    ROOTDIR=`dirname $0`
fi
echo "Container rootdir=$ROOTDIR"

if test -z "$PODIP"; then
    PODIP=10.88.0.10
fi
echo "Container POD IP=$PODIP"


# restart from stratch
podman pod rm -f csms-pod

# rebuild local-image
for DOCKERFILE in  $ROOTDIR/*/Dockerfile; do
   podman build -f $DOCKERFILE
   if test $? != 0; then
    echo "Fail to rebuild $DOCKERFILE"
   fi
done

#podman pod create --name=csms-pod --hostname=csms-host  -p 9410:9410 -p 9411:9411 -v $ROOTDIR/config:/config:Z   # unprivileged
podman pod create --name=csms-pod --hostname=csms-host --ip=$PODIP --network=podman  -v $ROOTDIR/config:/config:Z # privileged
podman create --pod csms-pod --name=csms_debug --interactive -u 10000:10000 alpine
podman create --pod csms-pod --name=csms_mqtt -u 10000:10000 eclipse-mosquitto:2 "/usr/sbin/mosquitto" "-c" "/config/mosquitto/mosquitto.conf"
podman create --pod csms-pod --name=csms_lb --net csms --network-alias lb envoyproxy/envoy:v1.26-latest
podman create --pod csms-pod  --name=csms_firestore google/cloud-sdk gcloud emulators firestore start --host-port=0.0.0.0:8080
podman create --pod csms-pod --name=csms_manager --requires=csms_mqtt -u 10000:10000 localhost/maeve-csms_manager serve -c /config/manager/config.toml
podman create --pod csms-pod --name=csms_gateway --requires=csms_mqtt,csms_manager localhost/maeve-csms_gateway serve --ws-addr :9310 --wss-addr :9311 --status-addr :9312 --tls-server-cert /config/certificates/csms.pem --tls-server-key /config/certificates/csms.key --tls-trust-cert /config/certificates/trust.pem --mqtt-addr mqtt://csms-host:1883 --manager-api-addr http://csms-host:9410

for CONTAINER in csms_debug csms_firestore csms_mqtt csms_manager csms_gateway; do
 echo starting: $CONTAINER
 podman start $CONTAINER
 if test $? != 0; then
   echo "fail to start container: $CONTAINER"
   exit
 fi
done

ocpp-login

Permission error when installing MaEve

I'm installing MaEve CSMS, my goal after installing is to connect it to Everest.

I am executing the run.sh script but I am faced with a permission error, I leave you a descriptive image below.
what is the solution to this problem?
someone to help me please.

Capture d'écran 2024-04-30 123316

Envoy Load Balancer: Connection reset by peer

Is anyone else having issues with the Envoy load balancer present in the Docker Compose deployment? I am not able to talk to the manager service's API on port 9410 (or any of the other services the load balancer is acting as a reverse proxy for) through the load balancer. The manager's API is not the problem since I can curl the API from the host if I map the manager's API port to a local port, and I can curl the API port from within the load balancer container.

I've tried debugging Envoy to see what the issue is but even with it's log level set to debug I'm not seeing anything obvious. Is there a reason why such a complex reverse proxy solution, or even a reverse proxy at all, is being used as part of the default Docker Compose config? I see the need for something like Envoy in a large-scale production deployment of MaEVe in Kubernetes for example, but not in a Docker Compose style deployment.

Understanding relation with open.plugncharge-test.hubject.com

I would be please to get some explanation on how/when 'hubject.com' enter in the process and how we may use it to test plug&charge.

Looks like manager/config.toml already have an authorization token.

  • is this token for anyone making test ?
  • should every one request a private token ? If then where ?
  • what the process to retrieve testing certificates to feed the ISO15118 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.