service-discovery

Prometheus dns service discovery in docker swarm relabel instance

那年仲夏 提交于 2019-12-06 09:50:39
My question is an addition to Prometheus dns service discovery in docker swarm . I define the prometheus scrape targets as follows: - job_name: 'node-exporter' dns_sd_configs: - names: - 'tasks.nodeexporter' type: 'A' port: 9100 This works fine but results in prometheus using the IP of the docker container as instance label. I tried to relabel the instance label as follows: relabel_configs: - source_labels: [__meta_dns_name] target_label: instance But doing so results in all instances of node-exporter having the same label "tasks.nodeexporter". Is it somehow possible to relabel the instance

Android network printers discovery: NullPointerException

女生的网名这么多〃 提交于 2019-12-05 16:48:15
This question does sound strange, but I never experienced this before. I'm working on network printer application and use NsdManager to discover printers in the WiFi network. It had been working fine for last two weeks, discovering and resolving printers in the same WiFi network. But all of a sudden I started getting the following exception every time I initiate discovery: 06-03 15:38:07.351: ERROR/AndroidRuntime(16849): FATAL EXCEPTION: NsdManager java.lang.NullPointerException at android.net.nsd.NsdManager$ServiceHandler.handleMessage(NsdManager.java:328) at android.os.Handler

List Of Controllers And Classes In Asp.NET Web API

会有一股神秘感。 提交于 2019-12-05 10:20:05
I want to access all of controllers in my web api. Let's say I have 2 controllers and 2 classes; Foo : string fooId string fooName Bar : string barId string barName Sample1Controller : Get(int fooId) Post([FromBody] Foo foo) Sample2Controller : Get(int barId) Post([FromBody] Bar bar) I want to list of my controllers, Foo and Bar class with properties. How can I do this ? Update : I want to create request and response classes for mobile apps. For example If I access these details remotely, I can create request and response classes for java or objective-c. You could use the ApiExplorer class

Microservice, amqp and service registry / discovery

百般思念 提交于 2019-12-05 08:15:39
I m studying Microservices architecture and I m actually wondering something. I m quite okay with the fact of using (back) service discovery to make request able on REST based microservices. I need to know where's the service (or at least the front of the server cluster) to make requests. So it make sense to be able to discover an ip:port in that case. But I was wondering what could be the aim of using service registry / discovery when dealing with AMQP (based only, without HTTP possible calls) ? I mean, using AMQP is just like "I need that, and I expect somebody to answer me", I dont have to

wifi-direct end connection to peer on Android?

一笑奈何 提交于 2019-12-05 08:03:44
Is there any way to end the connection to a peer over Wifi-Direct? I tried cancelConnect and removeGroup. Both of them returned Busy? thanks. this is the method I am using to disconnect from peer. I noticed from logs that the android built in app also uses the same method to disconnect the peers. public static void disconnect() { if (mManager != null && mChannel != null) { mManager.requestGroupInfo(mChannel, new GroupInfoListener() { @Override public void onGroupInfoAvailable(WifiP2pGroup group) { if (group != null && mManager != null && mChannel != null && group.isGroupOwner()) { mManager

consul first bootstrap with spring cloud config

随声附和 提交于 2019-12-04 17:28:23
Iam using spring-cloud-config for centralized configuration and consul for service discovery. Like eureka first bootstrap - does spring support consul first bootstrap i.e on booting up a client service - I should look up the config server through consul. The otherway round works perfectly fine i.e - in config client bootstrap.properties - I provide the spring.cloud.config.uri = http://localhost:8888 which located the config server and pulls config from it. And in the config repository for my client application - I provide the consul config like : spring.cloud.consul.host=localhost , spring

Get All Active Service Instances on Service Start

﹥>﹥吖頭↗ 提交于 2019-12-04 17:04:43
I'm creating a stateless service inside Azure Service Fabric. However, once service starts (or on start of custom communication listener) I need to get addresses of all other instances/partitions of that service. I'm doing so by creating new FabricClient and calling fabricClient.QueryManager.GetPartitionListAsync(serviceUri) . However I'm getting FabricServiceNotFoundException with message Service does not exist. when a first service instance starts running. I couldn't find that in documentation, so my question is: how can I get a list of listening endpoint addresses for all active instances

Android O issues with WiFi Peer Discovery

前提是你 提交于 2019-12-04 05:21:20
I am developing an Android Application that employs WiFi (Direct) for service discovery and P2P peer discovery/connection. My development enviromment is as follows:- Android Studio 3.0 Beta 4 Build #AI-171.4304935, built on August 29, 2017 JRE: 1.8.0_152-release-915-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 My Gradle build:- apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.research.wifi_direct" minSdkVersion 19 targetSdkVersion 26 versionCode 1

Listener already in use (Service Discovery)

人走茶凉 提交于 2019-12-03 15:52:02
问题 I can't resolve one service while another is being resolved? If that's what the error means... What is the way to wait until it is resolved? @Override public void onServiceFound(NsdServiceInfo service) { Log.d(TAG, "Service found. " + service); if (service.getServiceType().equals(SERVICE_TYPE)) { if (service.getServiceName().contains(mServiceName)) { mNsdManager.resolveService(service, mResolveListener); } } } java.lang.IllegalArgumentException: listener already in use at android.net.nsd

WCF Discovery finds endpoint but host is “localhost”

孤街浪徒 提交于 2019-12-03 09:22:15
I am trying to use the Discovery feature in WCF using http://msdn.microsoft.com/en-us/library/dd456783(v=VS.100).aspx as a starting point. It works fine on my machine, but then I wanted to run the service on a different machine. The service was discovered properly but the hostname of the found service is always "localhost" which is of course not much use. Service Endpoint: var endpointAddress = new EndpointAddress(new UriBuilder { Scheme = Uri.UriSchemeNetTcp, Port = port}.Uri); var endpoint = new ServiceEndpoint(ContractDescription.GetContract(typeof(IServiceInterface)), new NetTcpBinding (),