Coder Social home page Coder Social logo

Comments (9)

cdesch avatar cdesch commented on August 11, 2024

More info:

Using:

quorum 2.6.0 

and

traefik.containo.us/v1alpha1 
kind: IngressRoute

I see in this commit of geth ethereum/go-ethereum@beabf95 that they are moving from using the params like rpccorsdomain to http.corsdomain, although I can see that in v2.6.0 in PR#960 that only geth 1.9.7 is currently supported.

How should k8s be configured?

from qubernetes.

bmcd avatar bmcd commented on August 11, 2024

It seems like that's usually related to not having the rpcvhosts value, like you thought originally. Are you sure that the geth start command was updated successfully and ran with the new flags you added?

Also, how are you connecting to the RPC endpoint?

from qubernetes.

cdesch avatar cdesch commented on August 11, 2024

thanks @bmcd

I'm 90% sure that the flags were applied as I did a kubectl delete and redeploy with kubectl apply after making the changes to the flags in the deployment.yaml. Maybe the args are being overwritten somewhere? Is there any way to check in the geth node, in the pod, if the flags have been applied? I know you can usually attach directly to geth nodes from inside the host (like this) but I'm not sure if that is the same in quorum.

from qubernetes.

cdesch avatar cdesch commented on August 11, 2024

@bmcd How is this supposed to be put in?

this is what I have:

           --permissioned \
           --nodiscover \
           --nat=none \
           --verbosity 9 \
           --networkid $NETWORK_ID \
           --unlock 0 \
           --emitcheckpoints \
           --rpc \
           --rpcaddr 0.0.0.0 \
           --rpcport 8545 \
           --rpcapi $RPC_APIS \
           --wsapi $RPC_APIS \
           --wsport 8546 \
           --port 30303 \
           --rpccorsdomain \"*\" \
           --rpcvhosts \"*\" \

from qubernetes.

cdesch avatar cdesch commented on August 11, 2024

@bmcd Adding vhosts and corsdomain crashes the containers every time and results in a k8s crashloop for the quorum container. How are these params formatted and where do they go in the deployment?

Here is the config:

- name: quorum
        image: quorumengineering/quorum:2.6.0
        readinessProbe:
          exec:
            command:
              - ls
              - $(QHOME)/dd/geth.ipc
          initialDelaySeconds: 20
          periodSeconds: 3
        command: [ "sh" ]
        # TODO: have to generate sed files
        #       PERM_NODE_JSON=$(echo $PERM_NODE_TMPL | sed \"s/%QUORUM-NODE01_SERVICE_HOST%/$QUORUM_NODE01_SERVICE_HOST/g\" | sed \"s/%QUORUM-NODE02_SERVICE_HOST%/$QUORUM_NODE02_SERVICE_HOST/g\");
        # sleep to give constellation some time to start up and discover the other nodes.
        #  --maxpeers 4
        args:
        - "-cx"
        - "
          export HTTP_PROXY=http://my.com:8000;
          export HTTPS_PROXY=http://my.com:8000;
          export NO_PROXY=localhost,127.0.0.1,*.my.com;

           apk add curl;
           apk add jq;

           sh $QHOME/permission-nodes/permissioned-update.sh;
           rm -r /etc/quorum/qdata/contracts-tmp;
           echo what in this dir;
           ls  $QUORUM_DATA_DIR;
           cat /etc/quorum/genesis/genesis-geth.json;

           chmod 644 $QUORUM_DATA_DIR/keystore/key;
  
           until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:9001/upcheck); do echo 'waiting for transaction manager to start...'; sleep 5; done;
           echo transaction manager is up;


           touch $QUORUM_DATA_DIR/password.txt;
           NETWORK_ID=1101
           RPC_APIS=admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum
           args=\" --gcmode archive --istanbul.blockperiod 3 --syncmode full --mine --minerthreads 1 \";
           RPC_APIS=\"$RPC_APIS,istanbul\";
           args=\"$args --allow-insecure-unlock \";
           /usr/local/bin/geth \
           --datadir $QUORUM_DATA_DIR \
           $args \
           --permissioned \
           --nodiscover \
           --nat=none \
           --verbosity 9 \
           --networkid $NETWORK_ID \
           --unlock 0 \
           --emitcheckpoints \
           --rpc \
           --rpcaddr 0.0.0.0 \
           --rpcport 8545 \
           --rpcapi $RPC_APIS \
           --wsapi $RPC_APIS \
           --wsport 8546 \
           --port 30303 \
            \
           --password $QUORUM_DATA_DIR/password.txt 2>&1 | tee -a /etc/quorum/qdata/logs/quorum.log;"
        ports:
          - containerPort: 50401
          - containerPort: 8545
          - containerPort: 8546
          - containerPort: 30303

I've tried variations below and more and have not had any success:

       --rpccorsdomain='*' \
       --rpcvhosts='*' \

      --rpccorsdomain \"*\" \
      --rpcvhosts \"*\" \

      --rpccorsdomain=\"*\" \
      --rpcvhosts=\"*\" \

      --rpccorsdomain * \
      --rpcvhosts * \

      --rpccorsdomain=* \
      --rpcvhosts=* \

      --rpccorsdomain='*' \
      --rpcvhosts='*' \

from qubernetes.

bmcd avatar bmcd commented on August 11, 2024

Hmm, not sure. When I use wizard to generate a qubernetes project it looks like:

           /usr/local/bin/geth \
           --datadir $QUORUM_DATA_DIR \
           $args \
           --permissioned \
           --nodiscover \
           --nat=none \
           --verbosity 9 \
           --networkid $NETWORK_ID \
           --unlock 0 \
           --emitcheckpoints \
           --rpc \
           --rpcaddr 0.0.0.0 \
           --rpcport 8545 \
           --rpcapi $RPC_APIS \
           --wsapi $RPC_APIS \
           --wsport 8546 \
           --port 30303 \
           --rpccorsdomain=\"*\" --rpcvhosts=\"*\" --wsorigins=\"*\" \
           --password $QUORUM_DATA_DIR/password.txt 2>&1 | tee -a /etc/quorum/qdata/logs/quorum.log;"

There are no errors in the logs from when it crashes?

from qubernetes.

cdesch avatar cdesch commented on August 11, 2024

hmm... The order seems to matter. This works:

           $args \
           --permissioned \
           --nodiscover \
           --nat=none \
           --verbosity 9 \
           --networkid $NETWORK_ID \
           --unlock 0 \
           --emitcheckpoints \
           --rpc \
           --rpcaddr 0.0.0.0 \
           --rpcport 8545 \
           --rpcapi $RPC_APIS \
           --rpccorsdomain=\"*\" \
           --rpcvhosts=\"*\" \
           --wsapi $RPC_APIS \
           --wsport 8546 \
           --port 30303 \
            \
           --password $QUORUM_DATA_DIR/password.txt 2>&1 | tee -a /etc/quorum/qdata/logs/quorum.log;"

our config also has that trailing \ before the --password... I wonder if that was messing it up.

I take it websockets are the same?

from qubernetes.

bmcd avatar bmcd commented on August 11, 2024

it looks like that line is where qubernetes puts the Geth_Startup_Params value from the qubernetes.yaml file. So since it's empty in your config it just puts the \. You can delete that line.

When you say it works, you mean it doesn't crash anymore? Or the rpc endpoint also no longer shows the invalid host error?

websockets use the --wsorigins="*" flag instead of corsdomain and vhosts.

from qubernetes.

cdesch avatar cdesch commented on August 11, 2024

Thanks! Nice to have it working a little. I'll close the issue.

from qubernetes.

Related Issues (19)

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.