pszymczyk / embedded-consul Goto Github PK
View Code? Open in Web Editor NEWEmbedded Consul provides easy way to run Consul in integration tests.
License: Apache License 2.0
Embedded Consul provides easy way to run Consul in integration tests.
License: Apache License 2.0
Hello,
In current version, This library provides the ability to manage the level of the log. However, since all logs of consul are write to stdout, it is difficult to manage logs as the file, and it is hard to see through IDE console.
I want to manage the log of consul with slf4j Logger
. It will probably be possible by modifying the Process
options.
How about this? I'll make pull request for this.
Seems like 0.3.5 is incompatible with Consul 1.0.0
Since 1.0.0 considered to be major and first release it would be really nice to align with Consul 1.0.0
At the moment I get
10:04:23.715 [main] INFO com.pszymczyk.consul.ConsulStarter - Starting new Consul process.
10:04:23.730 [main] INFO com.pszymczyk.consul.ConsulStarter - Creating ports configuration file: /var/folders/2s/wvgn1t095wjbsc8sbby6m2zh0000gn/T/embedded-consul-config-dir702655073261408839/basic_config.json
==> Error parsing /var/folders/2s/wvgn1t095wjbsc8sbby6m2zh0000gn/T/embedded-consul-config-dir702655073261408839/basic_config.json: 1 error(s) occurred:
* invalid config key ports.rpc
As mentioned here:
Removed Option | Equivalent |
---|---|
ports.rpc | None, the RPC server for CLI commands is no longer supported. |
The use of embedded-consul 2.0.0 causes third-party threat analyzers (such as dependency-track) to generate threat alerts due to CVE threats in dependencies and transitive dependencies. slf4j-api and groovy-all should be trivial to update.
Note that one or more of the identified might not actually be relevent to embedded-consul.... but they still give rise to alerts!
Update to 1.7.26 to resolve critical threat CVE-2018-8088
CVSS 3.0 score = 9.8
Update to a version after 2.4.7 (the version currently used) to resolve CVE-2016-6814
CVSS 3.0 score = 9.8
The version used (0.7.1) introduces threats transitively:
commons-collections 3.2.1 CVE-2017-15708
xercesimpl 2.9.1 CVE-2013-4002
It looks like http-builder is no longer maintained. I am not a developer, but would HttpBuilder-NG be a suitable alternative?
To be sure that at least basic paths work in the range of Consult version that the project supports.
To determine how to distinguish those tests and run them only on demand (it can take some time).
Consul 0.7.1 has been released. Making embedded-consul use that, should fix #22
After calling ConsulProcess#stop() the consul process is stopped but the ConsulLogHandler's executor is still running. This holds the JVM from terminate as it is a non-daemon. There is a close() method in ConsulLogHandler but not getting invoked from ConsulProcess#stop(). Any way to call ConsulLogHandler#close explicitly to shutdown logExecutor?
These threads are getting added for each start of ConsulProcess.
2018-12-04 10:41:00
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode):
"Attach Listener" #16 daemon prio=9 os_prio=0 tid=0x00007f88ec001000 nid=0x2f84 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x00007f892c00f000 nid=0x2ee1 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"embedded-consul" #14 prio=5 os_prio=0 tid=0x00007f892cc92000 nid=0x2f36 waiting on condition [0x00007f88f41a9000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000076f6b3970> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Locked ownable synchronizers:
- None
"embedded-consul" #12 prio=5 os_prio=0 tid=0x00007f892c9af000 nid=0x2f1c waiting on condition [0x00007f88f42c5000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006ca16dff8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Locked ownable synchronizers:
- None
"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f892c53f000 nid=0x2efb runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C1 CompilerThread2" #8 daemon prio=9 os_prio=0 tid=0x00007f892c539800 nid=0x2efa waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread1" #7 daemon prio=9 os_prio=0 tid=0x00007f892c537800 nid=0x2ef9 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f892c536000 nid=0x2ef8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Monitor Ctrl-Break" #5 daemon prio=5 os_prio=0 tid=0x00007f892c53a800 nid=0x2ef7 runnable [0x00007f8913e4d000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
- locked <0x00000006ca246940> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
- locked <0x00000006ca246940> (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at com.intellij.rt.execution.application.AppMainV2$1.run(AppMainV2.java:64)
Locked ownable synchronizers:
- None
"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f892c184000 nid=0x2ef6 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f892c150800 nid=0x2eef in Object.wait() [0x00007f89185d2000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000006ca247390> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
- locked <0x00000006ca247390> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
Locked ownable synchronizers:
- None
"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f892c14e000 nid=0x2eee in Object.wait() [0x00007f89186d3000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000006ca2475c0> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x00000006ca2475c0> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
Locked ownable synchronizers:
- None
"VM Thread" os_prio=0 tid=0x00007f892c144800 nid=0x2eea runnable
"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f892c024800 nid=0x2ee3 runnable
"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f892c026000 nid=0x2ee4 runnable
"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f892c028000 nid=0x2ee6 runnable
"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f892c029800 nid=0x2ee8 runnable
"VM Periodic Task Thread" os_prio=0 tid=0x00007f892c544000 nid=0x2efc waiting on condition
JNI global references: 253
It will be grate if there is cleanup method that will delete all data from consul and leave it in state that it's after startup. This could speedup tests because will not require to start/stop consul every time.
When using embedded-consul behind a corporate http proxy, I'm getting next error:
16:05:02.403 [main] INFO com.pszymczyk.consul.ConsulStarter - Starting new Consul process.
16:05:03.419 [main] INFO com.pszymczyk.consul.ConsulStarter - Downloading archives into: C:\Users\smv\AppData\Local\Temp\embedded-consul\consul.zip
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.025 sec <<< FAILURE! - in com.litmusloop.loopmq.auth.SuperuserControllerTest
com.litmusloop.loopmq.auth.SuperuserControllerTest Time elapsed: 2.025 sec <<< ERROR!
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
...
First of all thanks for a brilliant lib!
Working behind a proxy makes downloading the consul-binary impossible.
It would be nice to be able to pass some information, so that a proxy is configured.
Either by environment variables as with the CONSUL_BINARY_CDN, or by adding a constructor with the extra fields.
Thanks again!
It's hard to find what has changed between two releases. I assume we should use latest version but I would love to see what has changed.
With Dependabot, natively provided by GitHub. To make it easier to regularly update project dependencies.
Currenlty project is not linked with travis CI :( https://travis-ci.org/pszymczyk/embedded-consul
On the first run embedded consul downloads a consul binary in a given version into a temporary directory. On subsequent runs it doesn't attempt to download the binary again if it's already present. This means that embedded consul always uses the consul version that was configured for its first run, regardless of later changes to the consul version configured.
Solution: embedded consul should cache consul binaries in its temporary directory by version.
Sorry to open two issues, please close if I'm off base.
Using the consul CLI, I can run two agents locally as long as they are bound to different addresses.
consul agent -server -bind=127.0.0.1 -client=127.0.0.1 -datacenter=tpc
consul agent -server -bind=127.0.0.2 -client=127.0.0.2 -datacenter=cnj
However, a corresponding consulConfig will get trapped on the above line. It seems like it only checks ports of the agent, instead of the socket address. Thus agents running on 127.0.0.1 and 127.0.0.2 cannot co-exist.
com.pszymczyk.consul.EmbeddedConsulException: Port 8500 is not available, cannot start Consul process.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at com.pszymczyk.consul.ConsulStarter$_checkInitialState_closure2.doCall(ConsulStarter.groovy:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.codehaus.groovy.runtime.IOGroovyMethods.withCloseable(IOGroovyMethods.java:1622)
at org.codehaus.groovy.runtime.IOGroovyMethods$withCloseable.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at com.pszymczyk.consul.ConsulStarter.checkInitialState(ConsulStarter.groovy:155)
at com.pszymczyk.consul.ConsulStarter.start(ConsulStarter.groovy:94)
at com.bnymellon.tsg.discovery.tests.cucumber.consul.EmbeddedConsulAgent.start(EmbeddedConsulAgent.java:40)
at com.bnymellon.tsg.discovery.tests.cucumber.consul.ConsulAgentManager.setup(ConsulAgentManager.java:31)
at com.bnymellon.tsg.discovery.tests.cucumber.consul.ConsulIntegrationStepDefs.setupConsulFromFile(ConsulIntegrationStepDefs.java:81)
at โฝ.consul agents two-datacenters-wan.json(src/test/resources/TestRegistration.feature:8)
E.g. When consul port is already used start()
should throw exception or somehow inform user that his configuration does not work.
==> Starting Consul agent...
==> Starting Consul agent RPC...
==> Error starting http servers: Failed to get Listen on 127.0.0.1:8500: listen tcp 127.0.0.1:8500: bind: address already in use
This is related to #1
I would find really useful atm to have the feature to customize consul configuration.
I see you have added it after last release.
Could you make a new release including it?
Hi,
This library is great and thank you! Just noticed some behavior that may constitute a bug, or at least a case that needs special handling. I'm configuring an agent from the following custom configuration json:
{
"datacenter": "tpc",
"server": true,
"bind_addr": "127.0.0.2",
"client_addr": "127.0.0.2",
"ports": {
"dns":8600,
"http":8500,
"serf_lan":8301,
"serf_wan":8302,
"server":8300
}
}
Most of these properties are obeyed; however, the ConsulStarter's advertise
and client
fields are not set from the bind_addr
and client_addr
fields specified by the Consul Config docs. From my config, these should be 127.0.0.2, but in fact they are defaulting to 127.0.0.1.
consulStarter = ConsulStarterBuilder.consulStarter().withCustomConfig(consulConfiguration).build();
ConsulStarter.start()
should wait for consul to be fully operational.
I am getting the following error when attempting to download the Consul client for embedded use. I am not sure if this is a proxy related issue. I can download the artifact despite this fact but when I specify a binary directory, the code tries to overwrite it anyway. W
@Before
public void setUp() throws Exception {
consul = ConsulStarterBuilder.consulStarter()
.withHttpPort(8080)
.build()
.start();
client = Consul.builder().build();
}
2016-11-14T16:08:46.702+0000 INFO [Seq=1,Log=Thread=main] org.slf4j.Logger$info:? Starting new Consul process.
2016-11-14T16:08:46.724+0000 INFO [Seq=2,Log=,Thread=main] org.slf4j.Logger$info$0:? Downloading archives into: /var/folders/q2/5pyc9lwx77v80zk351v6lns0w8pvsj/T/embedded-consul/consul.zip
Disconnected from the target VM, address: '127.0.0.1:56162', transport: 'socket'
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at java.net.URL.openStream(URL.java:1045)
at java_net_URL$openStream.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at com.pszymczyk.consul.infrastructure.HttpBinaryRepository.getConsulBinaryArchive(HttpBinaryRepository.groovy:9)
at com.pszymczyk.consul.infrastructure.HttpBinaryRepository$getConsulBinaryArchive.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at com.pszymczyk.consul.ConsulStarter.downloadAndUnpackBinary(ConsulStarter.groovy:135)
at com.pszymczyk.consul.ConsulStarter.start(ConsulStarter.groovy:82)`
We can add some configuration property which would tell ConsulStarter to clean old files:
My project is using Spring boot, and I am using Embedded consul in test and local environment. When I modified my code to test other consul options, I found that it doesn't applied.
So, I opened last extra_config.json
file and I could see something like this:
{"ui":true,"enable_debug":true,"node_name":"test_local_node"}{"server":true,"ui":true,"enable_debug":true,"node_name":"test_local_node"}{"server":true,"ui":true,"enable_debug":true,"node_name":"test_local_node"}{"server":true,"ui":true,"dev":true,"enable_debug":true,"node_name":"test_local_node"}{"server":true,"ui":true,"dev":true,"enable_debug":true,"node_name":"test_local_node"}
In the default options, each process starting creates each temp directories, so it doesn't cause problem. But in my case, a problem occurred because I set a specific config directory.
So It seems that we need to change ResourceGroovyMethods.leftShift()
to ResourceGroovyMethods.setText()
.
Currently, if I want to use a embedded Consul listening on random port in Spring Boot tests (with full context initialised) I have to implement some kind of dynamic property configuration for Consul client - to pass the random port. Could you add some kind of integration for Spring Boot testing?
To verify that CI is up and running, ready for new commit and potentially a new release.
Weekly builds could detect issues with the CI environment, such as too old Java version with unsupported TLS certificates for Nexus (or anything else). The job would run even there were no commits in the previous week.
It would be great if it was possible to manually register a service to the embedded consul, as a method in either consulresource or consulstarter.
Thanks in advance!
Hi,
The func isBinaryDownloaded() currently only check the file 'consul' whether there, but it looks only valid for *nix OS. But for windows, the file is 'consul.exe'.
Currently work around for me is to touch a file named 'consul' in the download temp dir.
For Windows (not *nix) - the check for existence of Consul in the specified (or unspecified) download directory does not work. It is re-downloaded every time.
This is because the code looks for the *nix filename 'consul':
private boolean isBinaryDownloaded() {
return new File(downloadDir.toString(), "consul").exists()
}
I think this needs to be changed to:
private boolean isBinaryDownloaded() {
String binaryName = 'consul';
if ('windows' == OsResolver.resolve()) {
binaryName = 'consul.exe';
}
return new File(downloadDir.toString(), binaryName).exists()
}
A workround for the moment is to place a file (I copied consul.exe) called 'consul' (no extension) and everything is good to go. Windows only of-course.
~/D/r/embedded-consul (master=) ./gradlew clean build
> Task :groovydoc
Trying to override old definition of task fileScanner
> Task :test
==> Error starting agent: Failed to start Consul server: Failed to start RPC layer: listen tcp 127.0.0.10:65103: bind: can't assign requested address
com.pszymczyk.consul.MultipleProcessesTest > should run multiple Consul processes with same port simultaneously FAILED
java.lang.NullPointerException: Cannot invoke method close() on null object
at com.pszymczyk.consul.MultipleProcessesTest.should run multiple Consul processes with same port simultaneously(MultipleProcessesTest.groovy:63)
2018/12/04 22:09:47 [DEBUG] raft-net: 127.0.0.1:65346 accepted connection from: 127.0.0.1:65353
2018/12/04 22:09:47 [DEBUG] raft-net: 127.0.0.1:65346 accepted connection from: 127.0.0.1:65356
32 tests completed, 1 failed, 1 skipped
> Task :test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///Users/pszymczyk/Dev/repo/embedded-consul/build/reports/tests/test/index.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 44s
8 actionable tasks: 8 executed
~/D/r/embedded-consul (master=)
Hi there,
it seems to me, as if embedded consul would be fixed to 127.0.0.1 as listening ip addr (see ConsulStarter.groovy).
Please provide a possibility, to bind embedded-consul to another IP (or 0.0.0.0).
Hello,
first of all many thanks for this great project.
We are developing/maintaining DistributeMe project: http://www.distributeme.org. DistributeMe is a code generation framework for microservices communication over rmi. Usually DistributeMe uses its own registry to exchange information about services. However we recently added a new module that allows to use consul as service registry.
To unit-test our code we are using your project in a unit-test:
https://github.com/parship/distributeme/blob/master/distributeme-consul-registry-connector/src/test/java/org/distributeme/consulintegration/ConsulRegistryConnectorIntegrationTest.java
First of all: it works great. However, the execution duration of own two-test testrun is 22 seconds. Now the question: is there any option/way to speed up start of the consul registry in the unit-test mode, to reduce the execution time to an acceptable amount for a unit-test?
Thank you for your time!
Currently, after a few build executions there is a number of embedded-consul-data-dir10469441091985931102
files left in /tmp/. They could be automatically removed after tests.
Hi,
we develop a library with a sort of high level utils for Consul like leader election, consul watcher, datacenter reading etc. It is not open-sourced yet, but I hope it will be soon.
It turned out that we need a cluster of consul agents in integration tests for example 2 agents connected in one datacenter or even 2 datacenters. This may seem like a crazy idea, but it works just fine, because Consul starts and connect with other agent really fast.
I came up with the solution called ConsulCluster which I use like this
@Shared
@ClassRule
ConsulCluster consulCluster = new ConsulCluster.Builder()
.withNode("dc1", "node1-dc1")
.withNode("dc2", "node1-dc2")
.withNode("dc2", "node2-dc2")
.build()
Then I can connect to any agent by retrieving its HTTP port
consulCluster.getHttpPort("dc1", "node1-dc1")
I can also register/deregister healthy/unhealthy service instances (but this probably should be done in #65 )
consulCluster.registerHealthyServiceInstance("my-service", "dc1", "node1-dc1")
consulCluster.registerUnhealthyServiceInstance("my-service", "dc2", "node1-dc2")
consulCluster.deregisterService(serviceId, "dc1", "node1-dc1")
Of course I coded it for our case. I would need to think of more universal API.
Do you find this feature useful? :)
The platform is amd64 without judgement. Will it be updated to support other platform.
String url = "${cdn}${version}/consul_${version}_${os}_amd64.zip"
package com.pszymczyk.consul.infrastructure
class HttpBinaryRepository {
public static final String CONSUL_BINARY_CDN = "CONSUL_BINARY_CDN"
public static final String CONSUL_DEFAULT_CDN = "https://releases.hashicorp.com/consul/"
private HttpsProtocolsSetter httpsProtocolsSetter
HttpBinaryRepository() {
this.httpsProtocolsSetter = new HttpsProtocolsSetter(new HttpsProtocolsSetter.SystemPropertiesStorage())
}
File getConsulBinaryArchive(String version, File file) {
httpsProtocolsSetter.setRequiredTls(System.getProperty("java.version"), System.getProperty("https.protocols"))
String os = OsResolver.resolve()
String cdn = System.getenv(CONSUL_BINARY_CDN) != null ? System.getenv(CONSUL_BINARY_CDN)
: System.getProperty(CONSUL_BINARY_CDN) != null ? System.getProperty(CONSUL_BINARY_CDN) : CONSUL_DEFAULT_CDN;
String url = "${cdn}${version}/consul_${version}_${os}_amd64.zip"
OutputStream outputStream = file.newOutputStream()
outputStream << new URL(url).openStream()
outputStream.close()
file
}
}
The javadoc and source for version 2.1.2 from Maven central are empty.
Would you mind adding a license so I know if I can use this legally?
It seems that every time I run my tests the embedded consul will be downloaded. Log as follows:
2019-10-08 15:00:55,751 [Test worker] [] INFO com.pszymczyk.consul.ConsulStarter.start - Starting new Consul process.
2019-10-08 15:00:55,777 [Test worker] [] INFO com.pszymczyk.consul.BinariesManager.downloadAndUnpackBinary - Downloading archives into: /var/folders/32/2n4ht3pj0g97s50v8mhlds340000gn/T/embedded-consul-1.4.2/consul.zip
Is there any solution to avoid the unnecessary downloading, such as the zip file is already existed?
Hello @pszymczyk ,
Is there any interest in creating an Embedded Nomad?
It looks like the latest release hasn't been pushed to maven central. Would it be possible to get it pushed up? 2.0.0 doesn't work isolated very well with the latest consul agents since they will collide on grpc ports. It looks like this is all handled on master/the 2.1.0 release tag so would love if it could be pushed out.
Thanks!
To provide an easy way to create Consul's cluster we could add a new method to ConsulStarterBuilder
, say withAttachedTo(ConsulProcess)
, and I have a working prototype(see ruslansennov/embedded-consul@132da6b). It seems it can't be pulled right now, so I propose follow preliminary steps:
ConsulProcess
instance for setting joint
option in the added Consul agent. The SerfLanPort is already saved.ConsulProcess
because they must be different in the Consul cluster. User must be able to change it, if neededWe can avoid the last two steps, because the user can do this manually using a custom config, but I believe that this can be done by default. On the other hand, this complicates the code because it is necessary to check (and merge if needed) the user's settings
Just fyi I tried to update to the latest version, and the latest available in mvn central is 0.1.9
Hello,
I am dealing with dependency versions upgrade on a project. I previously used consul-embedded 2.1.4 and it worked like a charm.
After updating to 2.2.0 I have the following error when I run Integration tests:
java.lang.NoClassDefFoundError: groovy/util/slurpersupport/GPathResult
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3191)
at java.base/java.lang.Class.getMethods(Class.java:1904)
at java.desktop/com.sun.beans.introspect.MethodInfo.get(MethodInfo.java:71)
at java.desktop/com.sun.beans.introspect.ClassInfo.getMethods(ClassInfo.java:71)
at java.desktop/java.beans.Introspector.getTargetMethodInfo(Introspector.java:1046)
at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:462)
at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:205)
at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:3356)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3354)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3331)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:287)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:329)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:272)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:969)
at org.codehaus.groovy.runtime.MethodClosure.<init>(MethodClosure.java:48)
at groovyx.net.http.ParserRegistry.<init>(ParserRegistry.java:87)
at groovyx.net.http.HTTPBuilder.<init>(HTTPBuilder.java:194)
at groovyx.net.http.RESTClient.<init>(RESTClient.java:90)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:257)
at com.pszymczyk.consul.infrastructure.client.ConsulClientFactory.newClient(ConsulClientFactory.groovy:11)
at com.pszymczyk.consul.infrastructure.client.ConsulClientFactory$newClient.call(Unknown Source)
at com.pszymczyk.consul.ConsulStarter.start(ConsulStarter.groovy:58)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeEachMethod(TimeoutExtension.java:76)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:490)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeBeforeEachMethodAdapter$19(ClassBasedTestDescriptor.java:475)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachMethods$2(TestMethodTestDescriptor.java:167)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$5(TestMethodTestDescriptor.java:195)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:195)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachMethods(TestMethodTestDescriptor.java:164)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:127)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
Suppressed: java.lang.NullPointerException
at com.doxee.commons.adapter.config.ConsulConfigServiceITest.tearDown(ConsulConfigServiceITest.java:75)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:108)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:490)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$20(ClassBasedTestDescriptor.java:480)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$9(TestMethodTestDescriptor.java:236)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:269)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:269)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:268)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachMethods(TestMethodTestDescriptor.java:234)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
... 43 more
Caused by: java.lang.ClassNotFoundException: groovy.util.slurpersupport.GPathResult
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 101 more
Bump from 0.1.* to 0.2.* does not affect my application during
$ rm -rf ~/tmp/embedded-consul*
It appears current master branch is newer than the released versions.
With proper CI/CD release processes, this shouldn't happen.
Commits to master tag a new version release and push to Maven Central
I need to test consul ACL. Does the project support it ?
I tried to build the project with Java 11, but it failed:
> Task :compileGroovy FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> BUG! exception in phase 'class generation' in source unit '/home/foobar/Code/embedded-consul/src/main/groovy/com/pszymczyk/consul/ConsulStarter.groovy' unsupported Target MODULE
Most likely it is due to too old Groovy version (2.4.7). It would be good to upgrade some dependencies to make it work.
P.S. I use Java 14 by default in my system, but due to too old Gradle version I wasn't able to run the build at all. It could be the next point, while still keeping Java 8 compatibility for "late adopters".
New version released.
Do you plan to bump it?
We are seeing the following issue on shutdown, seems like either API incompatibility or no REST service available on embedded consul?
Spring-consul v1.2.1
embeded-consul v1.0.0
2017/10/30 13:53:36 [ERR] http: Request GET /v1/agent/service/deregister/ourapp-ut-0, error: method GET not allowed from=127.0.0.1:54805
2017-10-30 13:53:36.387 ERROR 25876 --- [ Thread-21] o.s.c.c.d.AbstractDiscoveryLifecycle : A problem occurred attempting to stop discovery lifecycle
com.ecwid.consul.v1.OperationException: OperationException(statusCode=405, statusMessage='Method Not Allowed', statusContent='method GET not allowed')
at com.ecwid.consul.v1.agent.AgentConsulClient.agentServiceDeregister(AgentConsulClient.java:254)
at com.ecwid.consul.v1.ConsulClient.agentServiceDeregister(ConsulClient.java:282)
at org.springframework.cloud.consul.serviceregistry.ConsulServiceRegistry.deregister(ConsulServiceRegistry.java:86)
at org.springframework.cloud.consul.serviceregistry.ConsulServiceRegistry.deregister(ConsulServiceRegistry.java:41)
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.deregister(AbstractAutoServiceRegistration.java:55)
at org.springframework.cloud.consul.serviceregistry.ConsulAutoServiceRegistration.deregister(ConsulAutoServiceRegistration.java:105)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.