Code Monkey home page Code Monkey logo

node-red-contrib-cloudantplus's People

Contributors

dependabot[bot] avatar hammoaj avatar stwissel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

node-red-contrib-cloudantplus's Issues

Bulk API not being called on Array input.

Passing an array in msg.payload is not resulting in a bulk document insert. Instead a single document is inserted with properties '0', '1', '2', etc. The node is configured for the insert operation, and to only take the msg.payload. I have also tried passing the array as the msg and unchecked the payload only option with no luck.

Connection error handling

Currently an invalid database connection (either not found or invalid credentials) will crash Node-RED. This is due to the recursive way that connections are retried which sets a timer to re-call the connection request, and in doing so loses the Promise chain so the error is not trapped. If max retries is set to 1, then it does work as designed as the recursive call is never made and the Promise chain remains intact.

Investigating how to re-code to ensure that the retry attempts still return the correct Promise response back to the original call.

Problem code is in https://github.com/hammoaj/node-red-contrib-cloudantplus/blob/master/modules/shared/cloudantbase.js in the connecWithRetry function.

@Stwissel any ideas how this could be restructured to work?

Error at startup with docker-compose ("socket hang up")

I'd like to report an interesting issue while working in a Docker context. Although, it may be worth mentioning that I'm a Node-RED newbie so there may be an easy solution for my problem.

My Node-RED Dockerfile looks like this:

FROM nodered/node-red-docker
RUN npm install node-red-contrib-pdf-hummus
RUN npm install node-red-contrib-cloudantplus

My docker-compose.yml looks like this:

version: '3'

services:
  my-pipeline:
    build: .
    ports:
     - "1880:1880"
    volumes:
     - ./data/flows.json:/data/flows.json
    links:
     - cloudant-developer
  cloudant-developer:
    image: ibmcom/cloudant-developer:latest
    hostname: cloudant.dev
    ports:
      - "8080:80"
    volumes:
      - cloudant-developer:/srv

volumes:
  cloudant-developer:

When I run docker-compose up, I can see from the Node-RED logs the following issue:

my-pipeline_1 | 19 Nov 23:10:43 - [error] [cloudantplus out:insert] socket hang up

Now, there are few things I can't explain:

  1. my flow contains an inject node but the option for firing at startup is not ticked in the node configuration. So, why is the cloudantplus out node triggered at startup?
  2. after that, if I manually trigger the flow using the inject node I get the same issue reported during startup (i.e. "socket hang up") but if I make a non significant change (e.g. moving some node) in order to enable the Deploy button and then I actually re-deploy, everything works perfectly. Why a re-deploy of the exact same flow is required in order to fix the issue?

As a further note, I've tried to run the same images without docker-compose by starting first Cloudant Developer and then Node-RED, giving some time to Cloudant to startup and everything worked as expected.

Ultimately, it seems that the issue is caused by the cloudant out node trying to connect to Cloudant before the latter is actually up and running. But the worst thing is that, after the first attempt, the cloudant out node remains in a broken state until another deploy is triggered.

Is there something that can be "fixed" in the cloudant out node or the common approach is to ping some health endpoint of cloudant as suggested in the Docker documentation?

Credentials for IBM Cloud

I installed Node-RED v2.2.2 on macOS and the cloudantplus nodes.
Observations:

  • Node Cloudantplus does not appear in the palette

  • When I configure the properties I'm prompted for user and password. On IBM Cloud I only have username, apikey etc.

I saw this tutorial, maybe it is not up-to-date (IAM?). Is there a solution?

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.