Giter Site home page Giter Site logo

steeltoeoss / samples Goto Github PK

View Code? Open in Web Editor NEW
640.0 45.0 247.0 11.17 MB

Steeltoe samples and reference application collection

Home Page: https://steeltoe.io/

License: Apache License 2.0

C# 65.16% HTML 20.05% JavaScript 3.02% CSS 2.41% Batchfile 0.92% Shell 1.39% Gherkin 1.06% Python 3.08% PowerShell 1.92% Dockerfile 0.57% TypeScript 0.43%
microservice discovery steeltoe-connectors cloud-foundry connector steeltoe-components music-store asp circuit-breaker service-discovery

samples's People

Contributors

ahmedanwar100 avatar arnaudmaichac avatar bart-vmware avatar bottkars avatar ccheetham avatar conradcreel avatar ddieruf avatar dependabot[bot] avatar dgodd avatar drnic avatar dtillman avatar everythingeverywhere avatar hananiel avatar jkonicki avatar kenswan avatar korser1 avatar macsux avatar mavenraven avatar mhoran avatar spring-operator avatar tillig avatar timhess avatar tscrypter 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samples's Issues

Is there any stepbystep or video tutorial on (Service Discovery ) what exact changes we need to do in order to register a service in to spring cloud eureka and also to write a client to consume this service ??

This samples are great, but is there any tutorial available to start from scratch. There is code related to service discovery and client that needs to be written in many files like program.cs, startup.cs, appsettings.json, package.json and manifest.yml.

I am able to write services but i am not sure what are all the changes i need to make in my code in order to register it into Spring Cloud Eureka Server.

CI cf space cleanup fails if the setup of the space failed due to timeouts

In the Sample CI pipeline, steps to setup services are associated with timeouts. If a timeout is exceeded, the setup is considered to have failed. The intent of the implementation was to prevent a step for running ad infinitum.

The cleanup phase assumes that any services that are found are in a "started" state. In the scenario, described above, the service will likely be in a "setting up" state. The cleanup phase does not handle such states and fails, thus leaving the service and its space behind, forcing manual cleanup.

DiscoveryClient example won't start on a Mac

Getting this error on startup:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (Device not configured) ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: Device not configured
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
   at System.Net.Dns.<>c.<GetHostAddressesAsync>b__25_1(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Steeltoe.Discovery.Eureka.EurekaInstanceConfig.GetHostAddress(Boolean refresh)
   at Steeltoe.Discovery.Eureka.EurekaInstanceConfig..ctor()

I did the investigation and tracked it down to https://github.com/dotnet/corefx/issues/13309 .

Workaround
Get current hostname and add it to the /etc/hosts file.
Posted an issue here to check if this call can be removed from eureka client.

not properly registering 2 instances

Hi

When I run two instances of fortuneteller service. it keeps registring port 5000 (from appsettings) instead of the port mentioned in server.urls on run. any ideas?

windows2012R2 stack is missing

I am trying to push the application using pushShoppingCartService.cmd win7-x64 netcoreapp1.1, but I get the following error: 'Stack windows2012R2 not found'. How do I add this stack?

Configuration/AspDotNetCore/CloudFoundry does not push

GIVEN

This version of the Samples repository

Samples/Configuration/src/AspDotNetCore/CloudFoundry master ✓ git --no-pager log -n1
commit f039eedf737beecfe0e784bde8d4e207cf9eed58 (HEAD -> master, origin/master)
Author: Chris Cheetham <[email protected]>
Date:   Mon Jul 8 14:45:35 2019 -0400

    fix behave arg

WHEN

I cf push cloud-test --random-route in the Configuration/src/AspDotNetCore/CloudFoundry directory

USING

The dotnet-core_buildpack-cflinuxfs3-v2.2.12.zip buildpack from upstream cf and this cf version:

$ cf api
api endpoint:   https://api.fr.cloud.gov
api version:    2.138.0

THEN

I see these errors

Pushing from manifest to org <redacted> / space <redacted> as [email protected]...
Using manifest file /Users/<redacted>/Development/dotnet/Samples/Configuration/src/AspDotNetCore/CloudFoundry/manifest.yml
Getting app info...
Updating app with these attributes...
  name:                cloud-test
  path:                /Users/<redacted>/Development/dotnet/Samples/Configuration/src/AspDotNetCore/CloudFoundry
  buildpacks:
    dotnet_core_buildpack
  disk quota:          1G
  health check type:   port
  instances:           1
  memory:              512M
  stack:               cflinuxfs3
  env:
    ASPNETCORE_ENVIRONMENT
  routes:
    <redacted>

Updating app cloud-test...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 201.22 KiB / 201.22 KiB [=============================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading dotnet_core_buildpack...
   Downloaded dotnet_core_buildpack
   Cell 5141b1ca-9fb7-4cfd-bc81-1661301ce2b7 creating container for instance 95b3650f-ad5a-4f37-b5ab-6b8a7e8acc07
   Cell 5141b1ca-9fb7-4cfd-bc81-1661301ce2b7 successfully created container for instance 95b3650f-ad5a-4f37-b5ab-6b8a7e8acc07
   Downloading app package...
   Downloaded app package (606.5K)
   -----> Dotnet-Core Buildpack version 2.2.12
   -----> Supplying Dotnet Core
   -----> Installing libunwind 1.3.1
          Download [https://buildpacks.cloudfoundry.org/dependencies/libunwind/libunwind-1.3.1-cflinuxfs3-96d2f3d0.tar.gz]
          using the default SDK
   -----> Installing dotnet-sdk 2.2.204
          Download [https://buildpacks.cloudfoundry.org/dependencies/dotnet-sdk/dotnet-sdk.2.2.204.linux-amd64-cflinuxfs3-3278b7aa.tar.xz]
   -----> Installing dotnet-runtime 2.2.5
          Download [https://buildpacks.cloudfoundry.org/dependencies/dotnet-runtime/dotnet-runtime.2.2.5.linux-amd64-cflinuxfs3-45a01508.tar.xz]
   -----> Finalizing Dotnet Core
          **ERROR** Unable to install dotnet-runtime: could not find a version of dotnet-runtime to install
   Failed to compile droplet: Failed to run finalize script: exit status 12
   Exit status 223
   Cell 5141b1ca-9fb7-4cfd-bc81-1661301ce2b7 stopping instance 95b3650f-ad5a-4f37-b5ab-6b8a7e8acc07
   Cell 5141b1ca-9fb7-4cfd-bc81-1661301ce2b7 destroying container for instance 95b3650f-ad5a-4f37-b5ab-6b8a7e8acc07
Error staging application: App staging failed in the buildpack compile phase
FAILED

Ribbon client side load balancer with .NET core

Hi,
We are planning to use the new container to container network feature of cloud foundry. Our Back end services has more than one instance and we need a way to load balance between these containers from the front end application. Spring cloud has the capability of Ribbon load balancer. However I could not see a sample where the same could be used with asp.net core application. So could you please let me know how to use Ribbon load balancer (or equivalent) with .NET core

Opens a json file when at Oracle connection.Open() line

Hi I'm trying to integrate Steeltoe to my .netcore application. The application connects to an Oracle db and fetches a few records for processing. While debugging locally, my app is opening the below json file when i execute the connection.Open() line. Once I open the json file, the debugging in VS gets stopped while the app continues to run.

I'm using the below packages:

<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="2.1.1" />
<PackageReference Include="Steeltoe.Management.CloudFoundryCore" Version="2.1.1" />
<PackageReference Include="steeltoe.management.tracingcore" Version="2.1.1" />

What am I missing?
S04W8QRC.txt

Program.cs file:

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
    WebHost.CreateDefaultBuilder(args)
        .UseHealthChecks("/health") // Healthcheck route
        .UseStartup<Startup>()
        .UseSerilog()
        .UseCloudFoundryHosting()
        .ConfigureAppConfiguration((builderContext, config) =>
        {
            config.AddCloudFoundry()
                  .AddEnvironmentVariables();
        })
        .ConfigureLogging((builderContext, logging) =>
        {
            logging.AddDynamicConsole();
        });

Startup.cs:

public void ConfigureServices(IServiceCollection services)
{
    AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false);

    //Zipkin integration using Steeltoe
    services.AddCloudFoundryActuators(Configuration);
    services.AddDistributedTracing(Configuration);
    // Add Steeltoe Cloud Foundry Options to service container
    services.ConfigureCloudFoundryOptions(Configuration);

    services.AddCors();
    ....
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{

    var configSettings = app.ApplicationServices.GetRequiredService<IConfigSettings>();

    // if its in PCF forward it.
    if (configSettings.EnvironmentName != "Development")
    {
        app.UseForwardedHeaders(new ForwardedHeadersOptions()
        {
            ForwardedHeaders = ForwardedHeaders.XForwardedProto
        });
    }

    app.UseCloudFoundryActuators();

    app.UseCors(
        options => options
            .AllowAnyMethod()
            .AllowAnyHeader()
            .AllowAnyOrigin()
    );
    ...

Hystrix Dashboard can't connect to Fortune-Teller-UI

Hello all,

I followed the document to run circuit breaker sample. When I input the url http://localhost:5555/hystrix/hystrix.steeam and click Monitor Stream, the dashboard show "Unable to connect to Command Metric Stream."

day21_2

some messages show in the log

in Fortune-Teller-UI:

  • error about RabbitMQ
fail: Steeltoe.CircuitBreaker.Hystrix.MetricsStream.HystrixMetricsStreamPublisher[0]
      Error sending metrics to Hystrix dashboard, metrics streaming disabled: RabbitMQ.Client.Exceptions.AlreadyClosedException: Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=404, text="NOT_FOUND - no exchange 'spring.cloud.hystrix.stream' in vhost '/'", classId=60, methodId=40, cause=
         at RabbitMQ.Client.Impl.SessionBase.Transmit(Command cmd)
         at RabbitMQ.Client.Impl.ModelBase.ModelSend(MethodBase method, ContentHeaderBase header, Byte[] body)
         at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String routingKey, Boolean mandatory, IBasicProperties basicProperties, Byte[] body)
         at Steeltoe.CircuitBreaker.Hystrix.MetricsStream.HystrixMetricsStreamPublisher.<StartMetricsPublishing>b__11_0(List`1 jsonList)
  • 404: Endpoint is not founded
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5555/hystrix/hystrix.stream
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 253.0019ms 404

In Hystrix Dashboard log

Proxy opening connection to: http://localhost:5555/hystrix/hystrix.stream

2018-01-09 16:10:03.667  WARN 22780 --- [nio-7979-exec-3] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:5555/hystrix/hystrix.stream : 404 : HTTP/1.1 404 Not Found
2018-01-09 16:10:03.667  WARN 22780 --- [nio-7979-exec-2] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:5555/hystrix/hystrix.stream : 404 : HTTP/1.1 404 Not Found

It seems dashboard can't find endpoint in the Fortune-Teller-UI.
How could I solve it?

Thanks!

Cloud Configuration -Issue

Not able to get data from Repository. (Using Asp.Net.core) I have create the
Service Config
Push to PCF.

Able to browse the page but not getting any value from Repository. Please help us
Or
There have any way to do locally ?

preferredNetworks

spring.cloud.inetutils.preferredNetworks[0]=^192.168
spring.cloud.inetutils.ignored-interfaces[0]=eth0
or
"cloud": {
"inetutils": {
"preferredNetworks": [ "^192" ]
}
}

The above some lines did not worded
Can you help for it ?

Not able to get data from config server when updated my app from 2.0 -> 2.1

Hello,
I have an existing web api project(dotnet core 2.0.7) which connects to Config Server and fetches data. I updated my project (dotnet core 2.1.0), and since then i am unable to fetch data from config server.
I only did the following changes to my project

.csproj
Earlier
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
<PackageReference Include="Pivotal.Extensions.Configuration.ConfigServerCore" Version="2.0.0" />
</ItemGroup>

Now
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
<PackageReference Include="Pivotal.Extensions.Configuration.ConfigServerCore" Version="2.1.0" />
</ItemGroup>

Can you please help

Actuator endpoints throwing security error

When running Management sample or using Steeltoe.Management.CloudFoundry to enable Actuator endpoints Server returns the following error.

{
"security_error": "Application id is not available"
}

I think the reason is when running locally ICloudFoundryOptions.ApplicationId is set to null. Not sure how to set it correctly.

Better describe the appconfig.json options

Hi,

The security samples shows that one could configure CloudFoundryAuthentication options within the appsettings.json, however all examples only show a small snippet of what it is supposed to look like. I tried adding a few other options but doesn't seem to work since the schema doesn't closely match CloudFoundryOptions class and i couldn't find the piece of code that applies those settings from the source code.

"security": {
  "oauth2": {
    "client": {
      "validate_certificates": false
    }
  }
},

Could you please better document the full set of settings options available or point me to how you actually load these settings?

I can't see mongodb credentials uri

When I access to Vcap Services in my dotnet core app using your Samples/Configuration/src/AspDotNetCore/CloudFoundry, I see mongodb key and I can navigate to credentials subkey, but uri is empty.

{
"mongodb": [
{
"credentials": {
"uri"
},
"label": "mongodb",
"name": "app_name",
"plan": "default",
"tags": [
"mongodb",
"document"
]
}
]
}

If I run "cf env app_name" the uri has content.
Thank you

ETA for ASP.NET Core 2.0 support?

Hi,

Do you guys have an ETA for ASP.NET Core 2.0 support?

I've been able to get some of the Steeltoe components to work, but it seems 2.0 has introduced a few breaking changes...

Thanks,
René

how to config appsettings to use username and password

hi:
i have a eureka service ,and It uses a security policy for username/password,my appsettings is like this
001
but it does not work, i can not register my service in it
so could you please teach me how to config,thanks very much

CloudFoundrySingleSignon sample credentials.json?

Hi,

Forgive me for what may sound like a newbie question, venturing off into unknown territory...

I need to get SSO working at my org and am going through the CloudFoundrySingleSignon sample. This looks odd: (credentials.json file)
{
"client_id": "myTestApp",
"client_secret": "myTestApp",
"uri": "uaa://login."
}
Storing credentials is source control is a big no no... any alternate way to do this?

Thanks,

Rene

Question : using HystrixCommand without inheriting from it ?

I'm new to hystrix and all examples i see use a service interface and implementation where the implementation inherits from the HystrixCommand class.

From what i see it's also possible to instantiate the command when needed and pass an anonymous method to it.
Is it considered a bad practice to use it this way ? Or is this just because most examples are implemented using the inheritance way ?

Thanks.

Adding multiple eureka serviceurl instances

I am integrating Steeltoe Eureka in our project and for creating high availability servers I need to have multiple Serviceurl keys (eureka endpoints) in my configuration. Could you please help me to solve thing thing out.

Add a Sample for Microsoft "eShopOnContainers" that utilize Steeltoe Features

Need

eShopOnContainers GitHub stars GitHub forks is Great Sample Code reference for working with Microservices and Containers with .Net Core Created by Microsoft , that a lot of .Net developers consider as the Only mature reference for working with Microservices and containers in .Net Core.

I Think it will be a Great idea to Fork this Repo and Create based on it a Sample that Utilize all Steeltoe Great Features in one Project and even Replace the "musicStore" Sample with this eShopOnContainers.

Value

Most of .Net developers now consider eShopOnContainers a Reference for Microservices, and it will be much easier for them to take a look at Steeltoe features and take a look and even compare them with the original project.

AspDotNet4 Simple Config Sample does not work without modifications

From the README at: https://github.com/SteeltoeOSS/Samples/blob/master/Configuration/src/AspDotNet4/Simple/README.md

Step 5 in the Pre-Requisites section (mvn spring-boot:run) does not work for me. When executing that step I was getting the following exception:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.7.RELEASE:run (default-cli) on proj ect spring-cloud-config-server: An exception occurred while running. null: InvocationTargetException: Error creating bea n with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfigura tion$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInst antiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw ex ception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationExce ption: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please p ut a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need t o active it (no profiles are currently active). -> [Help 1]

I was able to get it working by commenting out lines 25-29 from the pom.xml file at: https://github.com/spring-cloud/spring-cloud-config/tree/master/spring-cloud-config-server
<!--<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> <optional>true</optional> </dependency>-->

Once I did this, the mvn spring-boot:run command completed successfully.

Working example of console application performing Service Discovery

Hi. I have been trying to create a working example of a .NET console application that will perform service discovery to a Service Registry (Eureka) deployed in PCF. We are architecting a solution that has "processors" that need to discover services. These processors are console applications.

I was leveraging an existing example found at
https://github.com/SteeltoeOSS/Samples/tree/dev/Discovery/src/Console

However I can't get it working in PCF.

The binding of the configuration to the EurkaClientConfig does not seen to fully work.
var clientConfig = new EurekaClientConfig();
ConfigurationBinder.Bind(configuration.GetSection("eureka:client"), clientConfig);

The appsettings.json in the sample app has a setting called eureka:client:serviceUrl. The ErrekaClientConfig class has a setting called EurekaServerServiceUrls. So the service URL does not get populated from appsettings.json. From the sample, it is a coincidence that they are the same URL ("http://localhost:8761/eureka/") after the configuration binding. So this sample may work with a locally running Eureka Discovery Sevrice, but not on PCF using the configuration in appsettings.json.

Even when I manually set the EurekaServerServiceUrls with the URL of the deployed Service Registry, it does not work despite having a registered application. I wonder if I need to use Service Key Credentials such as eureka:client:clientId, and eureka:client:clientSecret which I have set up in PCF for the Service Registry. However I have no idea to get these credentials into the ErrekaClientConfig in the sample console application.

Can't connect to Eureka for service registry

I have a running instance of Eureka 1.7.0 running on Tomcat 8.5, when I surf to Eureka the management screen is working fine. I downloaded the Eureka directly from Netflix OSS.

When I try to connect with a simple ASP.NET Core Web API project it does not work. I get the following error in the output screen: "Steeltoe.Discovery.Eureka.DiscoveryClient:Error: HeartBeat failed"

Is there a way to get more info about why the heartbeat failed? or is steeltoe not compatible with Eureka 1.7.0?

This is my appsettings.json:

{ "Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Information", "Pivotal": "Debug", "Steeltoe": "Information" } }, "spring": { "application": { "name": "EurekaDiscoveryService" } }, "eureka": { "client": { "serviceUrl": "http://localhost:8080/", "shouldFetchRegistry": false }, "instance": { "port": 50612 } } }

Cannot execute "dotnet publish" command on MySqlEfCore project

I get an error when I execute this command. I have tested on .netcoreapp 2.0 as well as 1.1. Is this a kind of VS error? I cannot even build the project using VS 2017. I have pulled out the dev branch for this development.
image

Without building the project I have tried out to push to the cloud foundry by using "cf push" and still get the common error as BuildpackCompileFailed.

image

What is the best platform for the RabbitMQ customer, console application or web application?

The provided example use an MVC action to handle the RabbitMQ messages, it can only deal with one message when the action is invoked.
I think I need a service like window service to handle the messages in schedule, but there is not window service in .net core.
If I use the console application, maybe I can not use the services or middleware as there is no startup class, that means I can not use the steeltoe interfaces.
If I use the web application, I am not sure when or where to start listening.
Could you please provide some solutions or samples?

Not able to link groups in SAML response to Group Membership user attribute

Hi,

Using Pivotal SSO Service for authenticating and authorizing the users in .NET App. SSO Service is configured with external Ping Identity provider and SAML metadata is configured to make SSO service work. Authentication is working fine as expected using Authorization code from Steeltoe sample, but somehow group membership from SAML attributes are not getting properly mapped to scopes and hence policy claim is failing in .NET App.

Could someone help me in mapping ping identity groups to UAA scopes and additional configuration that needs to be configured in p-identity in order to authorize using [Authorize(Policy = "xyz")] in .NET App.

Regards
Mahesh

LookupService not returning the actual route (Fortune Teller Sample)

I am using the unmodified sample and it works locally but when I push to PCF the service lookup doesn't return the actual route. It's looking up https://fortuneservice/api/fortunes/random which the service lookup should return https://fortuneservice.apps.cloud.wonderboxsystem.com/api/fortunes/random.

Any ideas what could be wrong??

2018-05-11T07:46:28.785-05:00 [APP/PROC/WEB/0] [OUT] dbug: Steeltoe.Common.Discovery.DiscoveryHttpClientHandler[0]
2018-05-11T07:46:28.785-05:00 [APP/PROC/WEB/0] [OUT] LookupService(https://fortuneservice/api/fortunes/random)
2018-05-11T07:46:28.785-05:00 [APP/PROC/WEB/0] [OUT] LookupService() returning https://fortuneservice/api/fortunes/random

Steeltoe Config server provider as Github

In the process of understanding Cloud Foundry ConfigServer provider as github, We are following configuration example the problem here is we are not able to see the values for 'Config Server Data' section.
All the values under that particular section has ;Not Returned' value.
Can you help us what we are doing wrong/going wrong. And what are the steps we can check to make it work.

Note: I deployed to PCF with 'configserviceapp' name.

Example followed: samples/Configuration

image

Discovery:

How do I use "UseDiscoveryClient()" in a .net core console application?

A console application does not have IApplicationBuilder or middleware to call this method directly.

SSL problem trying to run eureka client against public docker image

I get the following error when attempting to start up a simple Steeltoe client:

fail: Steeltoe.Discovery.Eureka.Transport.EurekaHttpClient[0]
      RegisterAsync Exception:
fail: Steeltoe.Discovery.Eureka.DiscoveryClient[0]
      Register failed, Exception: System.PlatformNotSupportedException: The libcurl library in use (7.51.0) and its SSL backend ("SecureTransport") do not support custom handling of certificates. A libcurl built with OpenSSL is required.

I am using .NET 1.0.1 tools and .NET 1.1 runtime.

Error on pull docker image

Guys, I really don't know if this is the right place to open this issue, but, when I was trying to pull the docker image, docker cli threws an exception telling that manifest for tag "latest" was not found. Can anyone help me? Thanks.

Suggest to use HttpClientFactory and about the design of HystrixCommand

  1. HttpClientFactory is a great design in .NET Core 2.1, I see it is used in Discovery Sample but no in CircuitBreaker Sample (Fortune-Teller-UI).
    Therefore, suggest to use it in CircuitBreaker Sample too because it can help us create and manage HttpClient well so we no need to care the lifecycle of HttpClient.
  2. In CircuitBreaker Doc and Sample, I never see a HystrixCommand sample code on calling another API with parameter(s) like the dest API Uri like http://xxxx/api/values/1000, the 1000 is a parameter. Is there any plan to override one method for ExecuteAsync with one parameter (eg.object userState) in HystrixCommand or HystrixCommand? And it is better to pass it to RunAsync and RunFallbackAsync method.
    If no this design, we only can put the parameter in class level like below, and it might be possible that some multi-thread problems happens in some special scenario.
    public class ClientServiceCommand : HystrixCommand<string>
    {
        IClientService _clientService;
        ILogger<ClientServiceCommand> _logger;
        private int _clientId;

        public ClientServiceCommand(IHystrixCommandOptions options, IClientService clientService, 
            ILogger<ClientServiceCommand> logger) : base(options)
        {
            _clientService = clientService;
            _logger = logger;
            IsFallbackUserDefined = true;
        }

        public async Task<string> GetClientName(int clientId)
        {
            _clientId = clientId;
            return await ExecuteAsync();
        }

        protected override async Task<string> RunAsync()
        {
            var result = await _clientService.GetClientName(_clientId);
            _logger.LogInformation("Run: {0}", result);
            return result;
        }

        protected override async Task<string> RunFallbackAsync()
        {
            _logger.LogInformation("RunFallback");
            return await Task.FromResult("Sorry, the service is unavaliable now. Please try again later.");
        }
}

Can you please help to advise?

IPv6 should be absent but is instead null

I've been testing out /Samples/Management/src/AspDotNetCore/Tracing/Fortune* project and Steeltoe has some pretty slick features. I was using the Zipkin Trace Exporter to send spans to a Zipkin server and everything worked as described (Awesome). However, I have a need to export these spans to a Jaeger server now (Written in Golang). Jaeger is supposed to be backwards compatible with Zipkin so this should not be a problem. But when I send traces to my Jaeger server I consistently receive a 400 Bad Request.

After digging a little deeper, it appears to happen when the Jaeger server is trying to parse the json body of trace information. Specifically, it looks like it is having trouble parsing "IPv6":null. According to the Zipkin documentation, IPv6 should be absent if unknown. So I tried sending an identical trace, but instead of IPv6 equaling null, IPv6 was absent. This seems to work.

Should IPv6 be present at all- if unkown? Does this sound like a Steeltoe problem? Is there a way to control the trace JSON that is sent when exporting traces?

When run Fortune-Teller-UI throw exception RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed

Fortune-Teller-UI> fail: Steeltoe.CircuitBreaker.Hystrix.MetricsStream.HystrixMetricsStreamPublisher[0] Fortune-Teller-UI> Error creating connection/channel, metrics streaming disabled: RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:5672 Fortune-Teller-UI> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Fortune-Teller-UI> at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) Fortune-Teller-UI> at System.Net.Sockets.Socket.<>c.<ConnectAsync>b__267_0(IAsyncResult iar) Fortune-Teller-UI> --- End of stack trace from previous location where exception was thrown --- Fortune-Teller-UI> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Fortune-Teller-UI> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Fortune-Teller-UI> at RabbitMQ.Client.TcpClientAdapter.<ConnectAsync>d__2.MoveNext() Fortune-Teller-UI> --- End of stack trace from previous location where exception was thrown --- Fortune-Teller-UI> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Fortune-Teller-UI> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Fortune-Teller-UI> at RabbitMQ.Client.Impl.TaskExtensions.<TimeoutAfter>d__0.MoveNext() Fortune-Teller-UI> --- End of stack trace from previous location where exception was thrown --- Fortune-Teller-UI> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Fortune-Teller-UI> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Fortune-Teller-UI> at RabbitMQ.Client.Impl.SocketFrameHandler.Connect(ITcpClient socket, AmqpTcpEndpoint endpoint, Int32 timeout) Fortune-Teller-UI> --- End of inner exception stack trace --- Fortune-Teller-UI> at RabbitMQ.Client.EndpointResolverExtensions.SelectOne[T](IEndpointResolver resolver, Func2 selector)
Fortune-Teller-UI> at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
Fortune-Teller-UI> --- End of inner exception stack trace ---
Fortune-Teller-UI> at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
Fortune-Teller-UI> at Steeltoe.CircuitBreaker.Hystrix.MetricsStream.HystrixMetricsStreamPublisher.SetupConnection()`

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.