0

I have been following a tutorial to create a stream with spring-cloud-dataflow. It creates the following stream -

http --port=7171 | transform --expression=payload.toUpperCase() | file --directory=c:/dataflow-output

All three applications start up fine. I am using rabbitMQ and if I log in to the rabbit UI I can see that two queues get created for the stream. The tutorial said that I should be able to POST a message to http://localhost:7171 using postman. When I do this nothing happens. I do not get a response, I do not see anything in the queues, and no file is created. In my dataflow logs I can see this being listed.

local: [{"targets":["skipper-server:20060","skipper-server:20052","skipper-server:7171"],"labels":{"job":"scdf"}}]

The tutorial was using an older version of dataflow that I do not believe made use of skipper. Since I am using skipper, does that change the url? I tried http://skipper-server:7171 and http://localhost:7171 but neither of these seem to be reaching the endpoint. I did turn off SSL cert verification in the postman settings.

Sorry for asking so many dataflow questions this week. Thanks in advance.

Kachopsticks
  • 125
  • 1
  • 13

1 Answers1

0

I found that the port I was trying to hit (7171) which was on my skipper server was not exposed. I had to add and expose the port on the skipper server configuration in my .yml file. I found this post which clued me in.

How to send HTTP requests to my server running in a docker container?

skipper-server:
    image: springcloud/spring-cloud-skipper-server:2.1.2.RELEASE
    container_name: skipper
    expose:
      - "7171"
    ports:
      - "7577:7577"
      - "9000-9010:9000-9010"
      - "20000-20105:20000-20105"
      - "7171:7171"
    environment:
      - SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_PORTRANGE_LOW=20000
      - SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_LOCAL_ACCOUNTS_DEFAULT_PORTRANGE_HIGH=20100
      - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:1111/dataflow
      - SPRING_DATASOURCE_USERNAME=xxxxx
      - SPRING_DATASOURCE_PASSWORD=xxxxx
      - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.mariadb.jdbc.Driver
      - SPRING_RABBITMQ_HOST=127.0.0.1
      - SPRING_RABBITMQ_PORT=xxxx
      - SPRING_RABBITMQ_USERNAME=xxxxx
      - SPRING_RABBITMQ_PASSWORD=xxxxx
    entrypoint: "./wait-for-it.sh mysql:1111-- java -Djava.security.egd=file:/dev/./urandom -jar /spring-cloud-skipper-server.jar"
Kachopsticks
  • 125
  • 1
  • 13