text:
Vamp Router does not start

I try out vamp 0.7.9 and installed vamp like you have defined it in the guide (http://vamp.io/installation/ubuntu/). But the Vamp Router does not start, i got an endless loop in the log file (/var/log/vamp-router/vamp-router.log ) of the following message.
I could not find a log file of the haproxy to see what is wrong.
██╗   ██╗ █████╗ ███╗   ███╗██████╗
██║   ██║██╔══██╗████╗ ████║██╔══██╗
██║   ██║███████║██╔████╔██║██████╔╝
╚██╗ ██╔╝██╔══██║██║╚██╔╝██║██╔═══╝
 ╚████╔╝ ██║  ██║██║ ╚═╝ ██║██║
  ╚═══╝  ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝
                       router
                       version 0.7.9
                       by magnetic.io

08:13:53.615 main NOTI ==>  Attempting to load config at /usr/share/vamp-router/configuration
08:13:53.615 main NOTI ==>  Did not find a config...initializing empty config
08:13:53.616 main CRIT ==>  Could not render initial config, exiting...
08:13:53.649 main INFO ==>
██╗   ██╗ █████╗ ███╗   ███╗██████╗
██║   ██║██╔══██╗████╗ ████║██╔══██╗
██║   ██║███████║██╔████╔██║██████╔╝
╚██╗ ██╔╝██╔══██║██║╚██╔╝██║██╔═══╝
 ╚████╔╝ ██║  ██║██║ ╚═╝ ██║██║
  ╚═══╝  ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝
                       router
                       version 0.7.9
                       by magnetic.io

08:13:53.650 main NOTI ==>  Attempting to load config at /usr/share/vamp-router/configuration
08:13:53.650 main NOTI ==>  Did not find a config...initializing empty config
08:13:53.651 main CRIT ==>  Could not render initial config, exiting...
08:13:53.670 main INFO ==>

@zutherb Which version of Ubuntu are you using?
Did you notice the issue reported in the documentation regarding vamp-router?
http://vamp.io/installation/ubuntu/#install-router

@plamola
I'm using:
Linux master1 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Yes notice the issue.

I'm able to reproduce this issue, when I install an old version of haproxy.
The haproxy version in the default Ubuntu repo is 1.4.x; vamp-router required haproxy 1.5+
Could you check which version of haproxy you got installed?
haproxy -v
See the instructions for adding the haproxy repo in our docs:
http://vamp.io/installation/ubuntu/#haproxy-1-5-x

Hi @plamola,
i'm using HA-Proxy version 1.5.14
HA-Proxy version 1.5.14 2015/07/02
Copyright 2000-2015 Willy Tarreau <willy@haproxy.org>```

Can you check the privileges on the /usr/share/vamp-router/data &  /usr/share/vamp-router/configuration directories?
The vamp-router user needs read/write access on both directories.
I've done a clean install on an Ubuntu 14.04 machine and this is what is been setup:
$ ls -al /usr/share/vamp-router
total 10168
drwxr-xr-x   6 root        root            4096 Aug 10 09:54 .
drwxr-xr-x 105 root        root            4096 Aug 10 09:54 ..
drwxrwxr-x   2 root        root            4096 Aug 10 09:54 bin
drwxr-xr-x   4 vamp-router vamp-router     4096 Aug 10 09:54 configuration
drwxr-xr-x   2 vamp-router vamp-router     4096 Aug 10 11:02 data
drwxrwxr-x   2 root        root            4096 Aug 10 09:54 examples
lrwxrwxrwx   1 root        root              20 Aug  3 09:12 logs -> /var/log/vamp-router
-rwxr-xr-x   1 root        root        10383392 Jul 31 14:14 vamp-router

Looks good
vagrant@master1:~$ ls -al /usr/share/vamp-router
total 10168
drwxr-xr-x   6 root        root            4096 Aug  7 06:04 .
drwxr-xr-x 118 root        root            4096 Aug  7 06:06 ..
drwxrwxr-x   2 root        root            4096 Aug  7 06:04 bin
drwxr-xr-x   2 vamp-router vamp-router     4096 Aug  7 07:27 configuration
drwxr-xr-x   2 vamp-router vamp-router     4096 Aug  7 07:27 data
drwxrwxr-x   2 root        root            4096 Aug  7 06:04 examples
lrwxrwxrwx   1 root        root              20 Aug  3 02:12 logs -> /var/log/vamp-router
-rwxr-xr-x   1 root        root        10383392 Jul 31 07:14 vamp-router

I will try a clean installation of ubuntu as well.

Hi @plamola,
the fresh installation doesn't work. Here is what i did:
#!/usr/bin/env bash
sudo apt-get install -y openjdk-8

sudo add-apt-repository -y ppa:vbernat/haproxy-1.5
sudo apt-get update
sudo apt-get install -y haproxy

echo "deb https://dl.bintray.com/magnetic-io/upstart trusty main" | sudo tee -a /etc/apt/sources.list
curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
sudo apt-get update

sudo apt-get install -y vamp-core
cp -vf /vagrant/scripts/vamp/core-application.conf /usr/share/vamp-core/conf/application.conf
sudo service vamp-core restart

sudo apt-get install -y vamp-pulse
cp -vf /vagrant/scripts/vamp/pulse-application.conf /usr/share/vamp-pulse/conf/application.conf
sudo service vamp-pulse restart

sudo apt-get install -y vamp-router
/usr/share/vamp-router/vamp-router --binary=/usr/sbin/haproxy

sudo apt-get install -y vamp-cli

@zutherb  Hi Bernd, we're checking this right now in a fresh Ubuntu 14.04 instance. We noticed a couple of things:

Openjdk 1.8 is not available on this version. We used the Oracle JDK. This is beside this issue of course.

When installing vamp-router, it should automatically start correctly. A ps tells me the following:

root     32259     1  0 09:27 ?        00:00:00 sudo -u vamp-router bin/vamp-router
vamp-ro+ 32261 32259  0 09:27 ?        00:00:00 bash bin/vamp-router
vamp-ro+ 32263 32261  0 09:27 ?        00:00:00 ./vamp-router
vamp-ro+ 32268     1  0 09:27 ?        00:00:00 /usr/sbin/haproxy -f /usr/share/vamp-router/configuration/haproxy_new.cfg -p /usr/share/vamp-router/data/haproxy-private.pid -D

a => root does a sudo -u preserving the user and starting our little bash script to kick off router.
b => vamp-router user runs bin/vamp-router bash script.
c => vamp-router user runs the actual vamp-router binary.
d => vamp-router user runs haproxy with the correct initialisation parameters.
For now, all is fine...a simple curl confirms its running:
tim@ubuntu-14-4-real:~$ curl localhost:10001/v1/info
{"Message":"Hi, I'm Vamp Router! How are you?","Version":"0.7.9","Status":{"Name":"HAProxy","Version":"1.5.14","Release_date":"2015/07/02","Nbproc":"1","Process_num":"1","Pid":"32268","Uptime":"0d 0h04m29s","Uptime_sec":"269","Memmax_MB":"0","Ulimit-n":"8223","Maxsock":"8223","Maxconn":"4096","Hard_maxconn":"4096","CurrConns":"0","CumConns":"92","CumReq":"92","MaxSslConns":"0","CurrSslConns":"0","CumSslConns":"0","Maxpipes":"0","PipesUsed":"0","PipesFree":"0","ConnRate":"0","ConnRateLimit":"0","MaxConnRate":"0","SessRate":"0","SessRateLimit":"0","MaxSessRate":"0","SslRate":"0","SslRateLimit":"0","MaxSslRate":"0","SslFrontendKeyRate":"0","SslFrontendMaxKeyRate":"0","SslFrontendSessionReuse_pct":"0","SslBackendKeyRate":"0","SslBackendMaxKeyRate":"0","SslCacheLookups":"0","SslCacheMisses":"0","CompressBpsIn":"0","CompressBpsOut":"0","CompressBpsRateLim":"0","ZlibMemUsage":"0","MaxZlibMemUsage":"0","Tasks":"5","Run_queue":"1","Idle_pct":"100"}}

Things start going wrong once we start/stop the processes directly using root or sudo. This will work once...but then all pid files, logs, haproxy socket files etc. are written under root. From that moment on, everything should be started under root, otherwise vamp-router cannot communicate with haproxy.

Hi Tim,
thx for your quick help.

i am using the Oracle JDK.

vagrant@master1:~$ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

The ps tells me. And i can't see a running haproxy-

root      1035  0.0  0.4  62108  3172 ?        Ss   09:51   0:00 sudo -u vamp-core bin/vamp-core
vamp-co+  1040 20.0 22.7 2150740 172460 ?      Sl   09:51   1:24 java -Dlogback.configurationFile=/usr/share/vamp-core/bin/../conf/logback.xml -Dconfig.file=/usr/share/vamp-core/bin/../conf/application.conf -cp /usr/share/vamp-core/lib/vamp-core.jar Main
root      1045  0.0  0.4  62108  3116 ?        Ss   09:51   0:00 sudo -u vamp-pulse bin/vamp-pulse
vamp-pu+  1052  5.8 23.7 2189576 180060 ?      Sl   09:51   0:24 java -Dlogback.configurationFile=/usr/share/vamp-pulse/bin/../conf/logback.xml -Dconfig.file=/usr/share/vamp-pulse/bin/../conf/application.conf -cp /usr/share/vamp-pulse/lib/vamp-pulse.jar Boot
root     12647  0.0  0.4  62108  3512 ?        Ss   09:58   0:00 sudo -u vamp-router bin/vamp-router
vamp-ro+ 12649  0.0  0.2   9520  2204 ?        S    09:58   0:00 bash bin/vamp-router
vamp-ro+ 12650  0.0  0.8  11300  6668 ?        Sl   09:58   0:00 ./vamp-router
vagrant  12653  0.0  0.2  11728  1944 pts/3    S+   09:58   0:00 grep --color=auto vamp

The curl doesn't work as well.
vagrant@master1:~$ curl localhost:10001/v1/info
curl: (7) Failed to connect to localhost port 10001: Connection refused

The vamp-core logfile (/var/log/vamp-core/application.log) show that it can connect to the proxy.
09:55:30.467 | ERROR | io.vamp.common.notification.Notification |                                          | Router response error.
09:55:30.467 | ERROR | io.vamp.common.notification.Notification |                                          | java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/routes
java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/routes
	at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:342) ~[vamp-core.jar:0.7.9.1]
	at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:107) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:431) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:422) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:384) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:109) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[vamp-core.jar:0.7.9.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_51]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_51]
Caused by: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/routes
	at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[vamp-core.jar:0.7.9.1]
	... 12 common frames omitted
Caused by: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_51]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_51]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[vamp-core.jar:0.7.9.1]
	... 8 common frames omitted
09:55:30.470 | ERROR | akka.actor.OneForOneStrategy             | e/user/deployment-synchronization-actor$ | io.vamp.common.notification.NotificationErrorException cannot be cast to io.vamp.core.router_driver.DeploymentRoutes
java.lang.ClassCastException: io.vamp.common.notification.NotificationErrorException cannot be cast to io.vamp.core.router_driver.DeploymentRoutes
	at io.vamp.core.operation.deployment.DeploymentSynchronizationActor.io$vamp$core$operation$deployment$DeploymentSynchronizationActor$$synchronize(DeploymentSynchronizationActor.scala:84) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.core.operation.deployment.DeploymentSynchronizationActor$$anonfun$receive$1.applyOrElse(DeploymentSynchronizationActor.scala:72) ~[vamp-core.jar:0.7.9.1]
	at akka.actor.Actor$class.aroundReceive(Actor.scala:467) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.core.operation.deployment.DeploymentSynchronizationActor.aroundReceive(DeploymentSynchronizationActor.scala:43) ~[vamp-core.jar:0.7.9.1]
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) [vamp-core.jar:0.7.9.1]
	at akka.actor.ActorCell.invoke(ActorCell.scala:487) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.Mailbox.run(Mailbox.scala:220) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [vamp-core.jar:0.7.9.1]
09:55:30.562 | ERROR | io.vamp.common.notification.Notification |                                          | Router response error.
09:55:30.563 | ERROR | io.vamp.common.notification.Notification |                                          | java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/info
java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/info
	at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:342) ~[vamp-core.jar:0.7.9.1]
	at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:107) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:431) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:145) ~[vamp-core.jar:0.7.9.1]
	at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1138) ~[vamp-core.jar:0.7.9.1]
	at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:935) ~[vamp-core.jar:0.7.9.1]
	at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:499) ~[vamp-core.jar:0.7.9.1]
	at dispatch.HttpExecutor$class.apply(execution.scala:47) ~[vamp-core.jar:0.7.9.1]
	at dispatch.Http.apply(execution.scala:12) ~[vamp-core.jar:0.7.9.1]
	at dispatch.HttpExecutor$class.apply(execution.scala:42) ~[vamp-core.jar:0.7.9.1]
	at dispatch.Http.apply(execution.scala:12) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.common.http.RestClient$.http(RestClient.scala:69) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.common.http.RestClient$.get(RestClient.scala:27) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.core.router_driver.DefaultRouterDriver.info(DefaultRouterDriver.scala:20) ~[vamp-core.jar:0.7.9.1]
	at io.vamp.core.router_driver.RouterDriverActor.reply(RouterDriverActor.scala:45) [vamp-core.jar:0.7.9.1]
	at io.vamp.common.akka.ReplyActor$$anonfun$receive$1.applyOrElse(ReplyActor.scala:19) [vamp-core.jar:0.7.9.1]
	at akka.actor.Actor$class.aroundReceive(Actor.scala:467) [vamp-core.jar:0.7.9.1]
	at io.vamp.core.router_driver.RouterDriverActor.aroundReceive(RouterDriverActor.scala:33) [vamp-core.jar:0.7.9.1]
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) [vamp-core.jar:0.7.9.1]
	at akka.actor.ActorCell.invoke(ActorCell.scala:487) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.Mailbox.run(Mailbox.scala:220) [vamp-core.jar:0.7.9.1]
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [vamp-core.jar:0.7.9.1]
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [vamp-core.jar:0.7.9.1]
Caused by: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001 to http://localhost:10001/v1/info
	at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[vamp-core.jar:0.7.9.1]
	... 25 common frames omitted
Caused by: java.net.ConnectException: Connection refused: localhost/127.0.0.1:10001
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_51]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_51]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[vamp-core.jar:0.7.9.1]
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[vamp-core.jar:0.7.9.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_51]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_51]

The vamp-router logfile (/var/log/vamp-router/vamp-router.log) show that vamp-router starts again and again.
10:05:41.922 main INFO ==>
██╗   ██╗ █████╗ ███╗   ███╗██████╗
██║   ██║██╔══██╗████╗ ████║██╔══██╗
██║   ██║███████║██╔████╔██║██████╔╝
╚██╗ ██╔╝██╔══██║██║╚██╔╝██║██╔═══╝
 ╚████╔╝ ██║  ██║██║ ╚═╝ ██║██║
  ╚═══╝  ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝
                       router
                       version 0.7.9
                       by magnetic.io

10:05:41.923 main NOTI ==>  Attempting to load config at /usr/share/vamp-router/configuration
10:05:41.925 main NOTI ==>  Pidfile exists at /usr/share/vamp-router/data/haproxy-private.pid, proceeding...
10:05:41.928 main CRIT ==>  Error while reloading haproxy: exit status 1
10:05:41.948 main INFO ==>
██╗   ██╗ █████╗ ███╗   ███╗██████╗
██║   ██║██╔══██╗████╗ ████║██╔══██╗
██║   ██║███████║██╔████╔██║██████╔╝
╚██╗ ██╔╝██╔══██║██║╚██╔╝██║██╔═══╝
 ╚████╔╝ ██║  ██║██║ ╚═╝ ██║██║
  ╚═══╝  ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝
                       router
                       version 0.7.9
                       by magnetic.io

10:05:41.949 main NOTI ==>  Attempting to load config at /usr/share/vamp-router/configuration
10:05:41.953 main NOTI ==>  Pidfile exists at /usr/share/vamp-router/data/h

@zutherb
The problem of the constant restarting is due to the service scripts that continuously tries to start Vamp Router after it fails. I think Vamp Router fails because either Router or Haproxy cannot write the necessary files to disk.
What we can do to pinpoint the problem is the following:

Stop the vamp router service script: sudo service vamp-router stop
Now start it by hand and see what happens

sudo /usr/share/vamp-router/vamp-router

If that doesn't help, remove these files:

rm /usr/share/vamp-router/configuration/haproxy_new.cfg
rm /usr/share/vamp-router/data/haproxy.stats.sock
rm /usr/share/vamp-router/data/haproxy-private.pid
``

thx @tnolet that works, but when i'm using sudo service vamp-router stop to start the vamp-router again i have the same behaviour again.

@zutherb this is due to the fact that now some files are owned by root and the 'service' command tries to use the vamp-router user. This user cannot read/write the files owned by root so it fails. I'm not sure how we can dodge this in an elegant manner. Once files are owned by root it is hard to switch back.

Hi @zutherb I heard this was still an issue.
1 .You can easily configure logging for Haproxy by just putting an extra line in the Haproxy template Vamp Router uses. Haproxy uses syslog or rsyslog for logging. Just put this in the global section of the haproxy_config.template file that ships with Vamp Router. The file should be at /usr/share/vamp-router/configuration/templates/. You should have a syslog or rsyslog daemon on port 514 on 127.0.0.1
 log 127.0.0.1 local0

I have a hard time debugging it from here. Is there a way you can snaphot your VM and upload somewhere so I can see what's happening?

Hi Tim,
I try to upload the vm to google drive. I will send you an invention when the upload is done.
I did the following steps to active the logging:
https://www.percona.com/blog/2014/10/03/haproxy-give-me-some-logs-on-centos-6-5/
The Log is then avaible under /var/log/haproxy.log
I got the following output:
Sep  8 09:52:13 localhost haproxy[31106]: { "timestamp" : 08/Sep/2015:09:52:13.033, "frontend" : "b017c339-9406-48aa-ac90-4307e7f6343a_mongodb_27017", "method" : "", "captured_request_headers" : "", "captures_response_headers" : "" }
Sep  8 09:52:13 localhost haproxy[31106]: { "timestamp" : 08/Sep/2015:09:52:13.034, "frontend" : "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_mongodb_27017", "method" : "", "captured_request_headers" : "", "captures_response_headers" : "" }
Sep  8 09:52:13 localhost haproxy[31106]: { "timestamp" : 08/Sep/2015:09:52:13.034, "frontend" : "b017c339-9406-48aa-ac90-4307e7f6343a_mongodb_27017::mongodb", "method" : "", "captured_request_headers" : "", "captures_response_headers" : "" }
Sep  8 09:52:14 localhost haproxy[31106]: { "timestamp" : 08/Sep/2015:09:52:14.540, "frontend" : "b4d4a437-2a0f-4489-be9e-7118ec3237c1_mongodb_27017", "method" : "", "captured_request_headers" : "", "captures_response_headers" : "" }
Sep  8 09:52:16 localhost haproxy[31106]: { "timestamp" : 08/Sep/2015:09:52:16.425, "frontend" : "b4d4a437-2a0f-4489-be9e-7118ec3237c1_mongodb_27017", "method" : "", "captured_request_headers" : "", "captures_response_headers" : "" }

While trying to connect the mongodb:
berndzuther@cc ~/development/appstash/vamp/vagrant (master●)$ mongo 172.31.1.11:33006
MongoDB shell version: 3.0.6
connecting to: 172.31.1.11:33006/test
Server has startup warnings:
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten]
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten]
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-09-08T16:18:36.719+0000 I CONTROL  [initandlisten]
2015-09-08T16:18:36.720+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-09-08T16:18:36.720+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-09-08T16:18:36.720+0000 I CONTROL  [initandlisten]
> ^C
bye
berndzuther@cc ~/development/appstash/vamp/vagrant (master●)$ mongo 172.31.1.11:33006
MongoDB shell version: 3.0.6
connecting to: 172.31.1.11:33006/test
2015-09-08T18:49:24.715+0200 I NETWORK  DBClientCursor::init call() failed
2015-09-08T18:49:24.720+0200 E QUERY    Error: DBClientBase::findN: transport error: 172.31.1.11:33006 ns: admin.$cmd query: { whatsmyuri: 1 }
    at connect (src/mongo/shell/mongo.js:181:14)
    at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed
berndzuther@cc ~/development/appstash/vamp/vagrant (master●)$ mongo 172.31.1.11:33006
MongoDB shell version: 3.0.6
connecting to: 172.31.1.11:33006/test
2015-09-08T18:50:00.926+0200 I NETWORK  DBClientCursor::init call() failed
2015-09-08T18:50:00.928+0200 E QUERY    Error: DBClientBase::findN: transport error: 172.31.1.11:33006 ns: admin.$cmd query: { whatsmyuri: 1 }
    at connect (src/mongo/shell/mongo.js:181:14)
    at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed

When i looked to the haproxy log i notice that haproxy try to connected multiple mongodb instances.  So i checked the routes with the rest api http://172.31.1.11:10001/v1/routes
[

{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_9050",
    "port": 9050,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog.ports.port",
    "weight": 100,
    "servers":

[

                {
                    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_9050",
                    "host": "localhost",
                    "port": 33000
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_catalog_80",
    "port": 33000,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog",
    "weight": 100,
    "servers":

[

                {
                    "name": "a7ca3d5b6ae0f571519c46e90ff04e728ebe4788",
                    "host": "172.31.2.12",
                    "port": 31199
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_checkout_8080",
    "port": 33001,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "checkout",
    "weight": 100,
    "servers":

[

                {
                    "name": "3a7a866906fcc8d57e570529a8322b3a310daf3c",
                    "host": "172.31.2.13",
                    "port": 31009
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_navigation_18090",
    "port": 33003,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "navigation",
    "weight": 100,
    "servers":

[

                {
                    "name": "9d383f9c62101eaad169a606f6b7df6f633689ef",
                    "host": "172.31.2.13",
                    "port": 31053
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_redis_6379",
    "port": 33005,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "redis",
    "weight": 100,
    "servers":

[

                {
                    "name": "ae455150a13722cfe13a6c7a937f1335ae83190d",
                    "host": "172.31.2.12",
                    "port": 31435
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_product_18080",
    "port": 33002,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "product",
    "weight": 100,
    "servers":

[

                {
                    "name": "d7101f706052c48fd5ea07711437c501c7b48a3e",
                    "host": "172.31.2.13",
                    "port": 31656
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_cart_18100",
    "port": 33004,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "cart",
    "weight": 100,
    "servers":

[

                {
                    "name": "8ce645fcd48685809cb5f71b96f275a12f42b005",
                    "host": "172.31.2.11",
                    "port": 31491
                }
            ]
        }
    ]

},
{

    "name": "cebe1679-e15d-41d7-a29f-c03bbcfd33ee_mongodb_27017",
    "port": 33006,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "mongodb",
    "weight": 100,
    "servers":

[

                {
                    "name": "54406b9ac88840ea9ff9988604f9ffa7792bd34f",
                    "host": "172.31.2.12",
                    "port": 31375
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_9050",
    "port": 9050,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog.ports.port",
    "weight": 100,
    "servers":

[

                {
                    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_9050",
                    "host": "172.31.1.11",
                    "port": 33000
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_navigation_18090",
    "port": 33003,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "navigation",
    "weight": 100,
    "servers":

[

                {
                    "name": "2c3468acb8f4c1d90d6b0df20e077815537a9a09",
                    "host": "172.31.2.11",
                    "port": 31650
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_checkout_8080",
    "port": 33001,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "checkout",
    "weight": 100,
    "servers":

[

                {
                    "name": "a2d6cef22c51c85d9d78cf6da04d019623dccff9",
                    "host": "172.31.2.11",
                    "port": 31338
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_catalog_80",
    "port": 33000,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog",
    "weight": 100,
    "servers":

[

                {
                    "name": "433750cd0a85c8ea01fab15292259b046265f931",
                    "host": "172.31.2.11",
                    "port": 31652
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_cart_18100",
    "port": 33004,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "cart",
    "weight": 100,
    "servers":

[

                {
                    "name": "932ba659b6df8522e92656874b8c3177e428fed8",
                    "host": "172.31.2.11",
                    "port": 31598
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_mongodb_27017",
    "port": 33006,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "mongodb",
    "weight": 100,
    "servers":

[

                {
                    "name": "30ffce15d779dc85b16e7e16cae6637b5b6dfe83",
                    "host": "172.31.2.11",
                    "port": 31031
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_product_18080",
    "port": 33002,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "product",
    "weight": 100,
    "servers":

[

                {
                    "name": "7e326e5166c9bc6f81ab893f8d57ebc77189e219",
                    "host": "172.31.2.11",
                    "port": 31622
                }
            ]
        }
    ]

},
{

    "name": "9b766960-3680-49c5-8395-5c05e4ac5e6d_redis_6379",
    "port": 33005,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "redis",
    "weight": 100,
    "servers":

[

                {
                    "name": "a48675044bfd9eccb572633bc7db0d9dc19e4bc8",
                    "host": "172.31.2.12",
                    "port": 31305
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_mongodb_27017",
    "port": 33006,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "mongodb",
    "weight": 100,
    "servers":

[

                {
                    "name": "a50c9b0aec6eb14969127a89fe65d4ff7c65841b",
                    "host": "172.31.2.11",
                    "port": 31208
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_cart_18100",
    "port": 33004,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "cart",
    "weight": 100,
    "servers":

[

                {
                    "name": "cafff5b83ba6efe05a6c27ea0f0b42746068384e",
                    "host": "172.31.2.13",
                    "port": 31304
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_product_18080",
    "port": 33002,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "product",
    "weight": 100,
    "servers":

[

                {
                    "name": "60a47e9baa75c60376613a69864a103553d383f1",
                    "host": "172.31.2.11",
                    "port": 31466
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_checkout_8080",
    "port": 33001,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "checkout",
    "weight": 100,
    "servers":

[

                {
                    "name": "db1763d79983efadefc4cbc82ed97b35c5dfe69",
                    "host": "172.31.2.11",
                    "port": 31852
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_9050",
    "port": 9050,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog.ports.port",
    "weight": 100,
    "servers":

[

                {
                    "name": "cdee9d2d-8856-4144-811a-e0731056255b_9050",
                    "host": "172.31.1.11",
                    "port": 33000
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_redis_6379",
    "port": 33005,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "redis",
    "weight": 100,
    "servers":

[

                {
                    "name": "b47078fc6733e11c600eaa563692f7094fee1d16",
                    "host": "172.31.2.12",
                    "port": 31765
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_navigation_18090",
    "port": 33003,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "navigation",
    "weight": 100,
    "servers":

[

                {
                    "name": "b90c7e73e6d9537d984e43af8212c26cab01d62c",
                    "host": "172.31.2.11",
                    "port": 31077
                }
            ]
        }
    ]

},
{

    "name": "cdee9d2d-8856-4144-811a-e0731056255b_catalog_80",
    "port": 33000,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog",
    "weight": 100,
    "servers":

[

                {
                    "name": "a9dd24652f4a25ed1c980ee8ffbe5b7a172d397",
                    "host": "172.31.2.12",
                    "port": 31186
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_redis_6379",
    "port": 33005,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "redis",
    "weight": 100,
    "servers":

[

                {
                    "name": "c33e8a1cc12f259e26f8839b7771d9caa3c49661",
                    "host": "172.31.2.11",
                    "port": 31609
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_mongodb_27017",
    "port": 33006,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "mongodb",
    "weight": 100,
    "servers":

[

                {
                    "name": "90dcd245565752c85712c84a2bdcaa5c5f4f5813",
                    "host": "172.31.2.12",
                    "port": 31910
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_cart_18100",
    "port": 33004,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "cart",
    "weight": 100,
    "servers":

[

                {
                    "name": "d96571279bfd13d7aae6b82d91812a0bb1bfda64",
                    "host": "172.31.2.11",
                    "port": 31527
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_checkout_8080",
    "port": 33001,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "checkout",
    "weight": 100,
    "servers":

[

                {
                    "name": "5940db53b7e336cedcf30b36971771bff0500bc2",
                    "host": "172.31.2.13",
                    "port": 31448
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_product_18080",
    "port": 33002,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "product",
    "weight": 100,
    "servers":

[

                {
                    "name": "fcccda9d9a78f8fcd8e1af994526002c57ecd9f1",
                    "host": "172.31.2.12",
                    "port": 31102
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_navigation_18090",
    "port": 33003,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "navigation",
    "weight": 100,
    "servers":

[

                {
                    "name": "178df2e513f49e942a3e1a29180a8f457f8e8aac",
                    "host": "172.31.2.11",
                    "port": 31676
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_9050",
    "port": 9050,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog.ports.port",
    "weight": 100,
    "servers":

[

                {
                    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_9050",
                    "host": "172.31.1.11",
                    "port": 33000
                }
            ]
        }
    ]

},
{

    "name": "b4d4a437-2a0f-4489-be9e-7118ec3237c1_catalog_80",
    "port": 33000,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog",
    "weight": 100,
    "servers":

[

                {
                    "name": "389f8ed829e54a6ca41279663e126cc0fba99e5",
                    "host": "172.31.2.13",
                    "port": 31458
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_9050",
    "port": 9050,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog.port",
    "weight": 100,
    "servers":

[

                {
                    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_9050",
                    "host": "172.31.1.11",
                    "port": 33000
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_catalog_80",
    "port": 33000,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "catalog",
    "weight": 100,
    "servers":

[

                {
                    "name": "888fac5307018583257f83b97a8324cf4f63279a",
                    "host": "172.31.2.12",
                    "port": 31305
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_product_18080",
    "port": 33002,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "product",
    "weight": 100,
    "servers":

[

                {
                    "name": "6f0c1359cff78fd679427a9e3a05ef78e74ae8fe",
                    "host": "172.31.2.12",
                    "port": 31188
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_navigation_18090",
    "port": 33003,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "navigation",
    "weight": 100,
    "servers":

[

                {
                    "name": "443c24f1197b8a5caf0a73a96b2f6e5285f7f8af",
                    "host": "172.31.2.11",
                    "port": 31799
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_cart_18100",
    "port": 33004,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "cart",
    "weight": 100,
    "servers":

[

                {
                    "name": "1174248e3ab5b52a9f3d3332eeff8e112d140518",
                    "host": "172.31.2.11",
                    "port": 31312
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_redis_6379",
    "port": 33005,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "redis",
    "weight": 100,
    "servers":

[

                {
                    "name": "7ff24e9ba4cafa7598f581e1c013e627b43640ec",
                    "host": "172.31.2.11",
                    "port": 31289
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_mongodb_27017",
    "port": 33006,
    "protocol": "tcp",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "mongodb",
    "weight": 100,
    "servers":

[

                {
                    "name": "1d249a608eb7de5ec0a26179bd666fcd71f1a308",
                    "host": "172.31.2.14",
                    "port": 31575
                }
            ]
        }
    ]

},
{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_checkout_8080",
    "port": 33001,
    "protocol": "http",
    "httpQuota": { },
    "tcpQuota": { },
    "filters": [ ],
    "services":

[

{

    "name": "checkout",
    "weight": 100,
    "servers":

[

                    {
                        "name": "87e1e0f376ff3ebb04b294901749bb6967459442",
                        "host": "172.31.2.11",
                        "port": 31324
                    }
                ]
            }
        ]
    }

]

As you can see there are multiple routes for the port 30006:

cebe1679-e15d-41d7-a29f-c03bbcfd33ee_mongodb_27017
9b766960-3680-49c5-8395-5c05e4ac5e6d_mongodb_27017
cdee9d2d-8856-4144-811a-e0731056255b_mongodb_27017
b4d4a437-2a0f-4489-be9e-7118ec3237c1_mongodb_27017
b017c339-9406-48aa-ac90-4307e7f6343a_mongodb_27017

It seems the the router does not delete the old configuration of an old deployment When looking to the deployments call http://172.31.1.11:8081/api/v1/deployments only b017c339-9406-48aa-ac90-4307e7f6343a should  deployed.
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a",
    "endpoints":

{

    "catalog.port": "9050"

},
"clusters":
{

    "cart":

{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:20:47.312-07:00"

},
"breed":
{

    "name": "cart",
    "deployable": "docker://zutherb/cart-service:latest",
    "ports":

{

    "port": "18100/http"

},
"environment_variables":
{

    "REDIS_PORT_6379_TCP_ADDR": "$redis.host",
    "REDIS_PORT_6379_TCP_PORT": "$redis.ports.port"

},
"constants": { },
"dependencies":

    {
        "redis": "redis"
    }

},
"environment_variables":
{

    "REDIS_PORT_6379_TCP_ADDR": "172.31.1.11",
    "REDIS_PORT_6379_TCP_PORT": "33005"

},
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_cart.3d680f6c-5645-11e5-884c-56847afe9799",
    "host": "172.31.2.11",
    "ports":

        {
            "18100": 31312
        },
        "deployed": true
    }

],
"dependencies":

        {
            "redis": "redis"
        },
        "dialects": { }
    }

],
"routes":

    {
        "18100": 33004
    },
    "dialects": { }

},
"catalog":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:20:47.307-07:00"

},
"breed":
{

    "name": "catalog",
    "deployable": "docker://zutherb/catalog-frontend:latest",
    "ports":

{

    "port": "80/http"

},
"environment_variables":
{

    "CHECKOUT_DESIGN": "standard",
    "NAVIGATION_PORT_18090_TCP_PORT": "$navigation.ports.port",
    "PRODUCT_PORT_18080_TCP_ADDR": "$product.host",
    "PRODUCT_PORT_18080_TCP_PORT": "$product.ports.port",
    "CART_PORT_18100_TCP_ADDR": "$cart.host",
    "CART_PORT_18100_TCP_PORT": "$cart.ports.port",
    "SHOP_PORT_8080_TCP_ADDR": "$checkout.host",
    "NAVIGATION_PORT_18090_TCP_ADDR": "$navigation.host",
    "SHOP_PORT_8080_TCP_PORT": "$checkout.ports.port"

},
"constants": { },
"dependencies":

    {
        "product": "product",
        "navigation": "navigation",
        "cart": "cart",
        "checkout": "checkout"
    }

},
"environment_variables":
{

    "CHECKOUT_DESIGN": "standard",
    "NAVIGATION_PORT_18090_TCP_PORT": "33003",
    "PRODUCT_PORT_18080_TCP_ADDR": "172.31.1.11",
    "PRODUCT_PORT_18080_TCP_PORT": "33002",
    "CART_PORT_18100_TCP_ADDR": "172.31.1.11",
    "CART_PORT_18100_TCP_PORT": "33004",
    "SHOP_PORT_8080_TCP_ADDR": "172.31.1.11",
    "NAVIGATION_PORT_18090_TCP_ADDR": "172.31.1.11",
    "SHOP_PORT_8080_TCP_PORT": "33001"

},
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_catalog.47d288a0-5645-11e5-884c-56847afe9799",
    "host": "172.31.2.12",
    "ports":

        {
            "80": 31305
        },
        "deployed": true
    }

],
"dependencies":

        {
            "product": "product",
            "navigation": "navigation",
            "cart": "cart",
            "checkout": "checkout"
        },
        "dialects": { }
    }

],
"routes":

    {
        "80": 33000
    },
    "dialects": { }

},
"checkout":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:50:51.512-07:00"

},
"breed":
{

    "name": "checkout",
    "deployable": "docker://zutherb/monolithic-shop:latest",
    "ports":

{

    "port": "8080/http"

},
"environment_variables":
{

    "CART_PORT_18100_TCP_ADDR": "$cart.host",
    "CART_PORT_18100_TCP_PORT": "$cart.ports.port",
    "MONGODB_PORT_27017_TCP_ADDR": "$mongodb.host",
    "MONGODB_PORT_27017_TCP_PORT": "$mongodb.ports.port"

},
"constants": { },
"dependencies":

    {
        "mongodb": "mongodb",
        "cart": "cart"
    }

},
"environment_variables":
{

    "CART_PORT_18100_TCP_ADDR": "172.31.1.11",
    "CART_PORT_18100_TCP_PORT": "33004",
    "MONGODB_PORT_27017_TCP_ADDR": "172.31.1.11",
    "MONGODB_PORT_27017_TCP_PORT": "33006"

},
"scale":
{

    "cpu": 0.3,
    "memory": 256,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_checkout.bf6e0d95-5649-11e5-884c-56847afe9799",
    "host": "172.31.2.11",
    "ports":

        {
            "8080": 31324
        },
        "deployed": true
    }

],
"dependencies":

        {
            "mongodb": "mongodb",
            "cart": "cart"
        },
        "dialects": { }
    }

],
"routes":

    {
        "8080": 33001
    },
    "dialects": { }

},
"navigation":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:20:47.307-07:00"

},
"breed":
{

    "name": "navigation",
    "deployable": "docker://magneticio/navigation-service:latest",
    "ports":

{

    "port": "18090/http"

},
"environment_variables":
{

    "MONGODB_PORT_27017_TCP_ADDR": "$mongodb.host",
    "MONGODB_PORT_27017_TCP_PORT": "$mongodb.ports.port"

},
"constants": { },
"dependencies":

    {
        "mongodb": "mongodb"
    }

},
"environment_variables":
{

    "MONGODB_PORT_27017_TCP_ADDR": "172.31.1.11",
    "MONGODB_PORT_27017_TCP_PORT": "33006"

},
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_navigation.49084982-5645-11e5-884c-56847afe9799",
    "host": "172.31.2.11",
    "ports":

        {
            "18090": 31799
        },
        "deployed": true
    }

],
"dependencies":
{

    "mongodb": "mongodb"

},
"dialects":
{

    "marathon":

            {
                "cmd": "export PORT=18090 && /navigation-0.6/bin/navigation"
            }
        }
    }

],
"routes":

    {
        "18090": 33003
    },
    "dialects": { }

},
"redis":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:20:47.312-07:00"

},
"breed":
{

    "name": "redis",
    "deployable": "docker://redis:latest",
    "ports":

    {
        "port": "6379/tcp"
    },
    "environment_variables": { },
    "constants": { },
    "dependencies": { }

},
"environment_variables": { },
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_redis.44d5000f-5645-11e5-884c-56847afe9799",
    "host": "172.31.2.11",
    "ports":

                {
                    "6379": 31289
                },
                "deployed": true
            }
        ],
        "dependencies": { },
        "dialects": { }
    }

],
"routes":

    {
        "6379": 33005
    },
    "dialects": { }

},
"mongodb":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:50:41.556-07:00"

},
"breed":
{

    "name": "mongodb",
    "deployable": "docker://mongo:latest",
    "ports":

    {
        "port": "27017/tcp"
    },
    "environment_variables": { },
    "constants": { },
    "dependencies": { }

},
"environment_variables": { },
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_mongodb.ba0ec744-5649-11e5-884c-56847afe9799",
    "host": "172.31.2.14",
    "ports":

        {
            "27017": 31575
        },
        "deployed": true
    }

],
"dependencies": { },
"dialects":
{

    "marathon":

            {
                "cmd": "mongod --smallfiles"
            }
        }
    }

],
"routes":

    {
        "27017": 33006
    },
    "dialects": { }

},
"product":
{

    "services":

[

{

    "state":

{

    "name": "Deployed",
    "started_at": "2015-09-08T09:20:47.307-07:00"

},
"breed":
{

    "name": "product",
    "deployable": "docker://zutherb/product-service",
    "ports":

{

    "port": "18080/http"

},
"environment_variables":
{

    "MONGODB_PORT_27017_TCP_ADDR": "$mongodb.host",
    "MONGODB_PORT_27017_TCP_PORT": "$mongodb.ports.port"

},
"constants": { },
"dependencies":

    {
        "mongodb": "mongodb"
    }

},
"environment_variables":
{

    "MONGODB_PORT_27017_TCP_ADDR": "172.31.1.11",
    "MONGODB_PORT_27017_TCP_PORT": "33006"

},
"scale":
{

    "cpu": 0.1,
    "memory": 128,
    "instances": 1

},
"routing":
{

    "weight": 100,
    "filters": [ ]

},
"servers":
[

{

    "name": "b017c339-9406-48aa-ac90-4307e7f6343a_product.44a4a13e-5645-11e5-884c-56847afe9799",
    "host": "172.31.2.12",
    "ports":

        {
            "18080": 31188
        },
        "deployed": true
    }

],
"dependencies":

        {
            "mongodb": "mongodb"
        },
        "dialects": { }
    }

],
"routes":

        {
            "18080": 33002
        },
        "dialects": { }
    }

},
"ports":
{

    "navigation.port": "33003",
    "cart.port": "33004",
    "checkout.port": "33001",
    "catalog.port": "33000",
    "mongodb.port": "33006",
    "redis.port": "33005",
    "product.port": "33002"

},
"environment_variables": { },
"hosts":

        {
            "checkout": "172.31.1.11",
            "catalog": "172.31.1.11",
            "cart": "172.31.1.11",
            "navigation": "172.31.1.11",
            "product": "172.31.1.11",
            "mongodb": "172.31.1.11",
            "redis": "172.31.1.11"
        }
    }

]

Is there a way to reset the router?

@tnolet
I unlock you for the vm.
My Assumption seems to be correct. After i deleted the following to files in /usr/share/vamp-router/configuration the haproxy works as excepted even that the external port 9050 is not started:

haproxy_new.cfg
vamp_router.json

@zutherb

It seems like indeed Vamp Core and Router were out of sync. You can always reset Vamp completely by using the /api/v1/reset command on the Vamp Core API. See http://vamp.io/documentation/api-reference/debug/
Or you can just reset Vamp Router by posting an empty config to the /v1/config endpoint of Vamp Router API, i.e.:

POST /v1/config
{
  "frontends" : [],
  "backends": [],
  "routes" : []
}

I got the VM downloaded and started. I just need a username + password now.

@tnolet thx, username + password is vagrant + vagrant

@zutherb I can see the machine booting, but I guess its missing some Puppet files as it throws errors about missing those files. When trying to log in it seems the user is either incorrect or not setup:
Tims-MacBook-Pro:VirtualBox VMs tim$ ssh -p 2222 vagrant@127.0.0.1
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
RSA key fingerprint is 95:88:a8:f9:8f:a1:d1:b6:9b:a6:a3:76:d9:06:9b:68.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
vagrant@127.0.0.1's password:
Permission denied, please try again.

@tnolet hmm ... normally puppet is only need for provisioning the vm.
Can you try to looking with the vagrant inscure key?
https://github.com/mitchellh/vagrant/blob/master/keys/vagrant

@zutherb That works! Great!

@zutherb
There are a couple of issues with the way this particular setup. Luckily, they are all pretty easy to fix:

You are running HAProxy as root or Haproxy was at some point in the past started as root.Vamp Router (when started with 'service vamp-router start') runs under the 'vamp-router' user. You can see this in /etc/init/vamp-router.conf

exec sudo -u vamp-router bin/vamp-router

This means all .sock files and .pid files that Haproxy writes are not accessible to Vamp Router and therefore it cannot start. I fixed this in your VMBox image by first killing haproxy and then chowning all files to vamp-router:
cd /usr/share/vamp-router/
sudo chown -R vamp-router:vamp-router *

I also removed the config files as you did mentioned earlier. We now have a clean start.
I then startup Vamp Router and all is well:
sudo service vamp-router start

with the result of haproxy AND vamp-router running as the same user.
vagrant@master1:/usr/share/vamp-router$ ps -ef | grep vamp-router
root      9856     1  0 05:49 ?        00:00:00 sudo -u vamp-router bin/vamp-router
vamp-ro+  9858  9856  0 05:49 ?        00:00:00 bash bin/vamp-router
vamp-ro+  9859  9858 61 05:49 ?        00:00:01 ./vamp-router
vamp-ro+  9864     1  0 05:49 ?        00:00:00 /usr/sbin/haproxy -f /usr/share/vamp-router/configuration/haproxy_new.cfg -p /usr/share/vamp-router/data/haproxy-privat

You can of course ignore this and just start Vamp Router as root. This also allows you to run HAproxy as root and bind to port 80 for instance. This is done by either editing the /etc/init/vamp-router.conf file or just using something like the following command to start vamp-router and push it to the background.
sudo /usr/share/vamp-router/vamp-router > /dev/null 2>&1 &

@tnolet thx a lot it works.

added to the FAQ.

authors: plamola tnolet zutherb

repo: magneticio/vamp-router


text:
fork() Does Not Occur During Run Tests

When performing run tests in travis CI, the processes are not being forked. This results in reduced test coverage of the logic performed after fork() runs, confirmed by reviewing Coveralls results.

I suspect this is due to limitations with Travis CI in order to prevent fork bombs.
What we'll do to fix this is check to see if the test_run CLI flag is set, and if so, continue running the contained logic.

Found this exception when running coverage tests:
Traceback (most recent call last):
  File "inquisition.py", line 173, in <module>
    main()
  File "inquisition.py", line 150, in main
    anatomize.startAnatomizer()
  File "/home/travis/build/magneticstain/Inquisition/lib/anatomize/Anatomize.py", line 150, in startAnatomizer
    numLogsBetweenTrackingUpdate=numLogsBetweenTrackingUpdate)
  File "/home/travis/build/magneticstain/Inquisition/lib/anatomize/Parser.py", line 523, in pollLogFile
    every_n=numLogsBetweenTrackingUpdate):
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pygtail/core.py", line 81, in __init__
    [int(line.strip()) for line in offset_fh]
ValueError: need more than 0 values to unpack

I found another bug in my last commit where new process spawn even when in test mode. I fixed that, and now it seems that it has fixed this exception as well.
Still not sure how, but I suspect it's some sort of race condition between parser processes. Fixing this so that all logic runs in a single process during test mode has resolved it during local testing.

https://sentry.io/carlsonet/inquisition/issues/410604874/

https://sentry.io/carlsonet/inquisition/issues/410604750/

source: gharchive/issue

repo: magneticstain/Inquisition

license: mit

license_type: permissive

license_source: bigquery


text:
Add tokenizer to encode input text and decode predicted image from logits

Tokenizer to encode text using BartTokenizer. It decodes Bart decoder output of image tokens to image using VQGAN decoder.

Currently getting an error when trying the tokenizer:
‘BartTokenizer’ object has no attribute ‘to’, for running the line tokenizer.to(device)
Not working with cpu nor cuda.
Trying to see if there's an easy fix.

Let me fix it

source: gharchive/pull-request

repo: mahalrs/newsgen

license_source: github-api


text:
#CleanCode No inline js and use configuration variables

@mai-soup The thing with inline js is - just don't do it. It has so many drawbacks:

A bad separation of concerns because the view shouldn't know about the logic
It's hard to read, and even harder to maintain because it's inline instead of a dynamic environment setting linked in a configuration file
Debugging hell, if something goes wrong
....

LoansView.vue
// if the loan is due in 7 days or less, show a button to extend the loan
button(v-if="(new Date(loan.returnDate) - new Date()) < 1000 * 60 * 60 * 24 * 7" @click="doExtend(loan)") Extend

The idea here would be using a function call from JS and configure this value in your .env.

instead of environment variables, decided to assign the loan-related durations on a per-library basis (#113)

repo: mai-soup/porch-reads-club

license: MIT


text:
fix/use promise to await for archiver to finalize before applying sha…

…256sum

r? @krishnaIndia
(maidsafe_highfive has picked a reviewer for you, use r? to override)

Draft based on this PR: https://github.com/maidsafe/safe_examples/releases/tag/untagged-437234bec79b2cf8b510

authors: hunterlester maidsafe-highfive


text:
Fixing two iOS display issues

Mail app on iOS 8 the default body padding is 20px. This makes the template rather skinny. Most modern email templates have a smaller left and right body padding of 10px.

20px padding: http://cl.ly/image/0x2b3e2P1i2b
10px padding: http://cl.ly/image/1p2h1b2Z0m1E

Mail app on iOS 8, Helvetica's 600 weight font looks wonky. The letter-spacing and font-weight looks off.

600 weight: http://cl.ly/image/0x2b3e2P1i2b
800 weight: http://cl.ly/image/1p2h1b2Z0m1E

Changed this in a few places ad13d824800bcd968870e1714cc1dea465ce1c1c
Thanks

authors: blakeperdue leemunroe

repo: mailgun/transactional-email-templates


text:
Feature request: Web browser notification

It would be nice to have mailhog capable to display notifications upon receiving messages. This would save clicking on mailhog tab every time to see if a message is received.

Which browser? Here my experience on a Mac:

Firefox: It seems to work. It even plays a bing sound.
Safari: Shows the notifcation, but no sound. (dunno why not playing sound)
Chrome: No notification, no sound. (dunno why)

Screenshot: Mailhog is not the active tab, but receives the notification.

@peterdd Chrome, Linux, Version 72.0.3626.121 (Official Build) (64-bit)

Maybe I have the reason: https://developer.mozilla.org/en-US/docs/Web/API/notificationSecure context
"This feature is available only in secure contexts (HTTPS), in some or all supporting browsers."
So in the latest Firefox 67 it is not working anymore - unless I change in about:config the dom.webnotifications.allowinsecure to false when you use mailhog just local for testing without TLS.
(notification works again, with sound)
In Chrome 74 I fiddled with chrome://flags
#unsafely-treat-insecure-origin-as-secure (enabled and insert address of your mailhog running)
and
#enable-message-center-new-style-notification (enabled)
to get them working for a local http ip address. ( http://10.0.0.x:8025 )
(notifications shown, no sound, don't know why)

Hi,
With Firefox 74, even this does not seem to work.

So in the latest Firefox 67 it is not working anymore - unless I change in about:config the dom.webnotifications.allowinsecure to false when you use mailhog just local for testing without TLS.

Any other way to make this work now?

Sorry, I meant set
dom.webnotifications.allowinsecure to true
With Firefox 74 was able to get the notification alerts on mac again. New seems the little speech bubble icon in the address bar. Click and allow it in the popup dialog and you get the other icon as shown in screnshot.

@peterdd Perfect! Both changes done and it works on Windows 10 & Firefox 74! Thanks a lot!

authors: KoolPal OnkelTem peterdd

repo: mailhog/MailHog


text:
getting Reference to property 'player' in closure requires explicit use of 'self' to make capture semantics explicit

While running in ios, we are getting the following error:/Users/prachhhi/Documents/yes/app/AppV2/node_modules/react-native-video-trim/ios/VideoTrimmerViewController.swift:254:16 Reference to property 'player' in closure requires explicit use of 'self' to make capture semantics explicit

which version of this library and RN are you using?
Have you run Pod install? can you try this in new project, because with the above errors I'll definitely will see it and never publish :)

RN version: 0.72.4
react-native-video-trim version: 1.0.10
yes we have ran pod install.
Yes correct and apologies for not adding full context, the same code is running  in another system so we suspect something wrong with xcode settings. But as this issue is coming with library only, I thought of asking for help here.

Can you click each of the error then screenshot and show me exact location for each error?

This file contains all the errors

Let me push a fix for this, I think this is about backward compatibility, it's really fine on my end

Sure, thanks a lot, yes I am also able to run on another system with latest xcode so looks like that only.

Hey @maitrungduc1410, Yep this worked, thanks for this, now I am thinking why I didnt just patched on my own and raised a PR lol.
Again thanks for quickly responding and helping.


text:
Request support for A1 PRO MAX

Log message
2024-10-24 21:23:05.224 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches otu_r1o1_lock with quality of 33%. DPS: {"updated_at": 1729797769.2820706, "9": "high", "16": 0, "19": 1, "33": false, "36": 1, "46": true, "47": true, "62": 1, "78": true}
2024-10-24 21:23:05.224 WARNING (MainThread) [custom_components.tuya_local.config_flow] Include the previous log message with any new device request to https://github.com/make-all/tuya-local/issues/

DPS information
{
  "result": {
    "model": "{\"modelId\":\"000003hp6s\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"unlock_method_create\",\"description\":\"【添加开锁方式】设备在线后，添加开锁方式。支持添加指密卡和人脸，以及支持管理员标记。\",\"extensions\":{\"iconName\":\"icon-a_up\",\"attribute\":\"1792\"},\"name\":\"添加开门方式\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"unlock_method_delete\",\"description\":\"【删除开锁方式】设备在线后，删除开锁方式。支持删除指密卡和人脸。\",\"extensions\":{\"iconName\":\"icon-dp_rabbish\",\"attribute\":\"1792\"},\"name\":\"删除开门方式\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"unlock_method_modify\",\"description\":\"【修改开锁方式】设备在线后，支持修改开锁方式的名称，以及密码的内容修改。\",\"extensions\":{\"iconName\":\"icon-edit\",\"attribute\":\"1792\"},\"name\":\"修改开门方式\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":9,\"accessMode\":\"ro\",\"code\":\"battery_state\",\"description\":\"【设备状态】用于电量以状态等级显示。范围高中低。（与DP8二选一）\",\"extensions\":{\"iconName\":\"icon-dp_battery\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"电量状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"high\",\"medium\",\"low\",\"poweroff\"]}},{\"abilityId\":16,\"accessMode\":\"ro\",\"code\":\"unlock_key\",\"description\":\"【上报开锁记录】若设备本地支持钥匙开锁检测，则用于设备上报机械钥匙开锁的记录。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"本地手动 开锁\",\"typeSpec\":{\"type\":\"value\",\"max\":999,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":19,\"accessMode\":\"ro\",\"code\":\"unlock_ble\",\"description\":\"【上报开锁记录】用于设备上报手机蓝牙开锁时的记录。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"蓝牙解锁记录\",\"typeSpec\":{\"type\":\"value\",\"max\":999,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":20,\"accessMode\":\"rw\",\"code\":\"lock_record\",\"description\":\"【上报关锁记录】用于设备上报门锁关锁的记录。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"256\"},\"name\":\"关锁记录\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":21,\"accessMode\":\"ro\",\"code\":\"alarm_lock\",\"description\":\"【告警记录】本地发生告警时，用于上报设备的告警记录。对应值说明：0=指纹试错报警、1=密码试错报警、2=卡试错报警、3=人脸试错报警、4=假锁（锁舌卡住）、5=高温报警、6=超时未关门、7=电子锁舌未弹出、8=防撬报警 、9=钥匙插入、10=低电报警、11=电量耗尽报警、12=震动报警、13=布防报警，如设备只用到告警dp中的几项，多余的内容也不需要删除。如删除则mcu在上报时的序号需要调整。建议开发者不要改动告警中的枚举值。如遇特殊情况，请在pm的指导下，进行增、删，以及配置多语言等操作\",\"extensions\":{\"iconName\":\"icon-dp_warming\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"门锁告警\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"low_battery\",\"power_off\"]}},{\"abilityId\":31,\"accessMode\":\"rw\",\"code\":\"beep_volume\",\"description\":\"【音量】用于设置设备本地导航语音音量大小。\",\"extensions\":{\"iconName\":\"icon-sound\",\"attribute\":\"1280\"},\"name\":\"提示音量\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"mute\",\"normal\"]}},{\"abilityId\":33,\"accessMode\":\"rw\",\"code\":\"automatic_lock\",\"description\":\"【自动落锁】用于设置自动落锁功能的开关。关闭后即设备不会自动落锁，此时也可作为常开模式。\",\"extensions\":{\"iconName\":\"icon-power\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"自动落锁开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":36,\"accessMode\":\"rw\",\"code\":\"auto_lock_time\",\"description\":\"【自动落锁】用于设置设备解锁后到执行自动落锁的延迟时间。设置范围1s～30min。\",\"extensions\":{\"iconName\":\"icon-dp_time3\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"自动落锁延时设置\",\"typeSpec\":{\"type\":\"value\",\"max\":1800,\"min\":1,\"scale\":0,\"step\":1}},{\"abilityId\":44,\"accessMode\":\"rw\",\"code\":\"rtc_lock\",\"description\":\"【时钟RTC】若设备本地支持RTC功能，则选择该DP，用于校准云端和本地的时间。\",\"extensions\":{\"iconName\":\"icon-dp_time3\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"硬件时钟RTC\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":46,\"accessMode\":\"rw\",\"code\":\"manual_lock\",\"description\":\"【落锁操作】用于触发设备执行落锁操作，可用于自动落锁和手动落锁。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"手动落锁\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":47,\"accessMode\":\"ro\",\"code\":\"lock_motor_state\",\"description\":\"【设备状态】用于上报设备离合开关的状态，即锁的开关状态。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"落锁状态\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":54,\"accessMode\":\"rw\",\"code\":\"synch_method\",\"description\":\"【同步开锁方式】用于手机同步设备本地所有的开锁方式。\",\"extensions\":{\"iconName\":\"icon-dp_upload\",\"attribute\":\"1792\"},\"name\":\"同步开门方式（全量同步）\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":61,\"accessMode\":\"rw\",\"code\":\"remote_no_dp_key\",\"description\":\"【远程开锁】用于触发设备远程开锁操作。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\"},\"name\":\"远程开门（带校验码）\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":62,\"accessMode\":\"ro\",\"code\":\"unlock_phone_remote\",\"description\":\"【上报开锁记录】用于设备上报手机远程开锁的记录。\",\"extensions\":{\"iconName\":\"icon-shouji\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"远程手机解锁\",\"typeSpec\":{\"type\":\"value\",\"max\":999,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":63,\"accessMode\":\"ro\",\"code\":\"unlock_voice_remote\",\"description\":\"【上报开锁记录】用于设备上报语音语音开锁的记录。\",\"extensions\":{\"iconName\":\"icon-dp_mic\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"远程语音解锁\",\"typeSpec\":{\"type\":\"value\",\"max\":999,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":68,\"accessMode\":\"rw\",\"code\":\"special_function\",\"description\":\"【特殊功能】可根据自身需求用于设置其他特殊功能的开关。对应文案可在IoT平台进行修改。\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1280\",\"trigger\":\"direct\"},\"name\":\"校准\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"function1\",\"function2\",\"function3\",\"function4\"]}},{\"abilityId\":69,\"accessMode\":\"rw\",\"code\":\"record\",\"description\":\"【获取开锁记录】用于手机主动获取设备本地存储的开门记录。\",\"extensions\":{\"iconName\":\"icon-dp_book\",\"attribute\":\"1280\"},\"name\":\"获取门锁记录\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":70,\"accessMode\":\"rw\",\"code\":\"check_code_set\",\"description\":\"【蓝牙开锁】用于配置设备执行蓝牙解锁时需要的校验信息。\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1280\"},\"name\":\"配置蓝牙解锁校验码\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":71,\"accessMode\":\"rw\",\"code\":\"ble_unlock_check\",\"description\":\"【蓝牙开锁】用于触发设备执行蓝牙解锁。触发源可以是手机、配件或靠近解锁。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1280\"},\"name\":\"蓝牙解锁（带校验码）\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":72,\"accessMode\":\"ro\",\"code\":\"unlock_record_check\",\"description\":\"【上报开锁记录】用于设备上报配件开锁及开关锁的记录。需要包含设备端具体触发开关锁的方式。\",\"extensions\":{\"iconName\":\"icon-tongji2\",\"attribute\":\"1280\"},\"name\":\"（带校验码）开关锁记录\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":73,\"accessMode\":\"rw\",\"code\":\"remote_pd_setkey_check\",\"description\":\"【远程开锁】用于配置远程开锁时需要的密钥。若设备需要进行远程开锁，该DP必选。\",\"extensions\":{\"iconName\":\"icon-dp_lock\",\"attribute\":\"1792\"},\"name\":\"配置远程解锁含校验\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},{\"abilityId\":78,\"accessMode\":\"rw\",\"code\":\"special_control\",\"description\":\"【特殊控制】可根据自身需求用于触发其他特殊控制能力。对应文案可在IoT平台进行修改。\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"1280\"},\"name\":\"开关方向\",\"typeSpec\":{\"type\":\"bool\"}}]}]}"
  },
  "success": true,
  "t": 1730035720957,
  "tid": "617139f4946711efad5172ecb0bd0dcf"
}

Product ID
rlyxv7pe
Product Name
A1 PRO MAX
Information about how the device functions
No response

What is an A1 PRO MAX?

I can did it changing some optionals:
`name: Door lock
products:

id: rlyxv7pe
name: Raykube A1 Pro Max
primary_entity:
entity: lock
dps:

id: 1
type: string
optional: true
name: unlock_method_create
id: 2
type: string
optional: true
name: unlock_method_delete
id: 3
type: string
optional: true
name: unlock_method_modify
id: 16
type: integer
optional: true
persist: false
name: unlock_key
id: 19
type: integer
optional: true
persist: false
name: unlock_ble
id: 20
type: string
optional: true
name: lock_record
id: 46
type: boolean
optional: true
name: lock
id: 47
type: boolean
optional: true
name: open
readonly: true
id: 54
type: string
optional: true
name: sync_method
id: 61
type: string
optional: true
name: remote_no_dp_key
id: 62
type: integer
optional: true
persist: false
name: unlock_app
id: 63
type: integer
optional: true
persist: false
name: unlock_voice
id: 69
type: string
optional: true
name: record
id: 70
type: string
optional: true
name: check_code_set
id: 71
type: string
optional: true
name: ble_unlock_check
id: 72
type: string
optional: true
name: unlock_record_check
id: 73
type: string
optional: true
name: remote_pd_setkey_check
secondary_entities:

entity: sensor
class: battery
category: diagnostic
dps:

id: 9
type: string
name: sensor
unit: "%"
mapping:

dps_val: high
value: 90
dps_val: medium
value: 60
dps_val: low
value: 30
dps_val: poweroff
value: 0

entity: event
name: Alert
dps:

id: 21
type: string
name: event
optional: true
mapping:

dps_val: low_battery
value: low_battery
dps_val: power_off
value: power_off

entity: switch
translation_key: keytone
category: config
dps:

id: 31
type: string
optional: true
name: switch
mapping:

dps_val: normal
value: true
dps_val: mute
value: false

entity: switch
name: Auto-lock
icon: "mdi:lock-clock"
category: config
dps:

id: 33
type: boolean
optional: true
name: switch

entity: number
name: Auto lock time
category: config
icon: "mdi:lock-clock"
dps:

id: 36
type: integer
optional: true
name: value
unit: s
range:
min: 1
max: 1800

entity: button
name: Sync clock
icon: "mdi:clock"
category: config
dps:

id: 44
type: boolean
name: button
optional: true

entity: select
name: Configuration
icon: "mdi:function"
category: config
dps:

id: 68
type: string
optional: true
name: option
mapping:

dps_val: function1
value: Recalibrate
dps_val: function2
value: Unlock more
dps_val: function3
value: Keep retracted
dps_val: function4
value: Add force

entity: switch
name: Change direction
category: config
dps:

id: 78
type: boolean
optional: true
name: switch
`

Making things optional blindly does not help, as it will end up false matching too many other devices.
It is better that you send the logs you are getting using the original config, so the minimal set of optional dps can be worked out.

authors: ChrisDes make-all

repo: make-all/tuya-local


text:
Fix coreJVM/initialCommands to run

Changes

Fix coreJVM/initialCommands to run

Codecov Report

Merging #379 (4d34971) into main (6246719) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              main      #379    +/-   ##
==========================================
  Coverage   100.00%   100.00%
==========================================
  Files           66        56    -10
  Lines         2666      1848   -818
  Branches       241        88   -153
==========================================
- Hits          2666      1848   -818

Impacted Files
Coverage Δ

packages/recheck/src/lib/env.ts

packages/recheck/src/browser.ts

packages/recheck/src/lib/java.ts

...ges/eslint-plugin-redos/src/rules/no-vulnerable.ts

packages/recheck/src/lib/pure.ts

packages/recheck/src/lib/exe.ts

packages/recheck/src/lib/native.ts

packages/recheck/src/main.ts

packages/recheck/src/lib/worker-pool.ts

packages/recheck/src/lib/agent.ts

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6246719...4d34971. Read the comment docs.

authors: codecov-commenter makenowjust

repo: makenowjust-labs/recheck


text:
To add working steps in T shape calculator

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Hi, I want to work on this issue I will start working on it as soon as I get assigned!! I am a part of GSSoC'21.
Kindly assign this issue to me!
Discord Username : Abhijeet Sinha(P)
Discord Tag: #4018

@abhijeet141 I'm already working on issue #3924. Please close this issue

repo: makesmatheasy/makesmatheasy


text:
Static pages - Cible WEB and HIDDEN displayed in Mobile

Just tried to create a static page with Cible = Web.
It is displayed in Rando but also in Mobile.

Just tried to create a HIDDEN static page and this one is also displayed in Geotrek-mobile.

There's indeed an issue in the condition. It still tests the old value for target and should be updated.

authors: SBats camillemonchicourt

repo: makinacorpus/Geotrek-mobile


text:
Fix removal of script contexts

This should fix #79.
Okay i found following issue:
the system script_remove_synchronizer handles removing the contexts of the script.
https://github.com/makspll/bevy_mod_scripting/blob/32eba12bc5e2d87ab05cfbf4a2dd14063d3842a2/bevy_mod_scripting_core/src/systems.rs#L94-L103
The problem here is, that .remove_context expects the script ID, as context_entities uses it as the Key.
https://github.com/makspll/bevy_mod_scripting/blob/32eba12bc5e2d87ab05cfbf4a2dd14063d3842a2/bevy_mod_scripting_core/src/hosts.rs#L267-L271
Which results in a very unreliable removing of the scripts. especially once the entities have multiple scripts and not just one.
I have updated the script_remove_synchronizer system, to loop through all context_entities and find those with a matching entity id.
The problem I see with this solution is that we have to loop through everything, as we can't break after one found match. because each entity could have multiple scripts, so we need to loop through all of them to find all.
https://github.com/makspll/bevy_mod_scripting/blob/745c20bb9e22d18761da7c50e96ee7f4766e790f/bevy_mod_scripting_core/src/systems.rs#L94-L112

I just added some changes to the context_entities.
I would love to hear some feedback from you, I personally think it makes more sense to use the entity as a key, instead of the script ID.

Not sure how to fix the test, as it comes from a crate rust_out?
running 7 tests
test src/lib.rs - (line 252) ... ignored
test src/lib.rs - (line 65) ... ignored
test src/lib.rs - (line 268) - compile ... FAILED
test src/lib.rs - (line 208) ... ok
test src/lib.rs - (line 117) ... ok
test src/lib.rs - (line 139) ... ok
test src/lib.rs - (line 179) ... ok

failures:

---- src/lib.rs - (line 268) stdout ----
error[E0601]: `main` function not found in crate `rust_out`
  --> src/lib.rs:287:2
   |
21 | }
   |  ^ consider adding a `main` function to `src/lib.rs`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0601`.
Couldn't compile the test.

failures:
    src/lib.rs - (line 268)

test result: FAILED. 4 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.71s

I see, haven't considered that!
In that case I'll quickly revert back to how it was before!

Merge Request is back at only fixing the bug in removing script context

No worries, much appreciated! Just one code style comment and I am happy!

authors: makspll zwazel


text:
(要望)アケコン方式の復活について

概要
ゲームコントローラーの操作モーションについて、v0.8.7時代のアケコンっぽい動きも使いたい事があるのを確認済み。
指針
やるならやるけど、以下の設計問題に答えられないうちは着手しない。

トリガー系のボタン押したときにリアクションできる事
可能ならホントにアケコン系のコントローラが刺さっているのか検証して切り替えること

通常のゲームコントローラ入力でアケコンの動きするのはエセモーションキャプチャのコンセプトからだいぶ離れてしまうため

moved to #522

repo: malaybaku/VMagicMirror


text:
License clarification

Hi, does license "BSD" mean the BSD-3-clause (https://opensource.org/licenses/BSD-3-Clause), or one of the other BSD licenses?  Thanks!

Good point. We're currently building an app and are working on proper attribution. So far, the only (indirect) dependency that we have that doesn't have an SPDX-compatible license id is readline. It would really help if your package were using one of the identifiers from the SPDX licenses list.

I second that.
We have automatic validations to ensure that all of our project dependencies have a license that matches one of those allowed by our legal department. Unfortunately, "BSD" is considered too vague to be added to that list, which means that unless it is clarified, we'll have to either switch to another similar library that has a clear license, or implement the features we need on our own.
Would it be possible to use one of the SPDX identifiers instead?
https://spdx.org/licenses/
Thanks!

Same for us. We're totally willing to live with not having a valid SPDX identifier, but knowing what BSD flavor this package is meant to be published as would be great.

authors: ariel11 bartvanandel fbeaudoincoveo lnqs


text:
Once completed, the system will not reset

if (secondsRemaining == 0)
{
    _cancellationTokenSource.Cancel();
    return;
}

The return shouldn't be there, because it returns before you call the ResetView() method

Thanks for pointing this out - and fixing it with PR #3 🥳

authors: BartaBlzs mallibone


text:
Scrollbars are rejected in MaterialUI Tables

When used in a material UI TableBody, it seems that MaterialUI rejects anything that may alter their table's architecture throught the DOM. Material UI forbids using anything other than TableHeader or TableBody as Table children, and any  inside of TableBody or Table Header (per HTML5 standars, this is not permitted either)
 render as a div.
Is there a way to assign Scrollbars to the TableBody without using the  so that way the Table architecture is unchanged?
Here is the code
    `<TableBody
	displayRowCheckbox={this.state.showCheckboxes}
	deselectOnClickaway={this.state.deselectOnClickaway}
	showRowHover={this.state.showRowHover}>
    	<Scrollbars  //not permitted. it renders as a

    		autoHide={false}
    		style={ScrollBarsStyle}>
		{tableData.map( (row, index) => (
			<TableRow key={index}>
				<TableRowColumn>{row.name}</TableRowColumn>
				<TableRowColumn>{row.type}</TableRowColumn>
				<TableRowColumn>{row.owner}</TableRowColumn>
			</TableRow>
		))}
    	</Scrollbars>
    </TableBody>`

UPDATE
The only way it can work is by adding the entire table inside the Scrollbars tags. But it disables the fixedHeader.

This can be accomplished by using two material-ui tables. One for the header and one for the rows.

  <TableHeader>
  ...
  </TableHeader>

<Scrollbars>

    <TableBody>
     ...
    </TableBody>

</Scrollbars>

Yup! That did it! Thank you!

But what if you need the columns to be the same width?

Then give the both sets of columns a style property e.g. style={{ width: '10%' }}

Unideal solution. What if you want the header to be fixed on vertical scroll, however to scroll with the content on horizontal scroll.

How would the horizontal scrolling work in this case? @justinmasse did you get this to work?

@justinmasse just put both tables inside a horizontally scrollable div

authors: TassosD alexlukelevy carlosafw justinmasse lotusms sarahshuffle

repo: malte-wessel/react-custom-scrollbars


text:
Support DataAnnotations?

I searched everywhere and I couldn't find any documentation on how to enable DataAnnotations being generated on the file. It see that it's generating XML Documentation but not generating DataAnnotations.
I was expecting like the xsd.exe to see MaxLength, RegularExpression, Description attributes on everything.
Is there a way to turn these on?

Sorry but LinqToXsd does not support those. It was originally started as a strongly-typed wrapper API around the Linq to XML API (think XDocument, XElement etc), and it's evolved that way. Adding that in is definitely possible though, but the code generator does not generate these attributes at the moment.

If System.Component.DataAnnotations are a hard requirement, I recommend using XmlSchemaClassGenerator - it generates code that's very close to what old-school xsd.exe gives you and also supports emitting DataAnnotations. LinqToXSD has its own validation mechanism that does not use DataAnnotations (it generates its own TypeValidator classes for validation).

authors: jhancock-taxa mamift

repo: mamift/LinqToXsdCore

license: MS-PL


text:
fix: correct url to repo in README

Fix incorrect URL in README

Thank you very much.

authors: mampfes swoga


text:
[update] SassからStylusへの移行をするべきか？

StylusはCSSのプリプロセッサとして後発なだけあって、Sassと同等の機能を持っていたり、それ以上の機能を持っている可能性がある。
現状のfunctionやmixinと同等の機能を維持できて、使いやすさや導入コストを考えて移行するメリットが十分にあるのか？

機能性であればStylusかもしれないけど、デファクトスタンダートなSassや、主流になっていく可能性のあるPostCSSとcssnextにしているほうがメリットが大きい。

repo: manabuyasuda/equip


text:
Running the tests frequently hang. Fix tests or underlying problem with the code.

Always hangs on CircleCI and often locally. Seems worse with some of the PRs we have merged than current upstream master.

Here is one example
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at org.jvnet.hudson.test.JenkinsRule.waitForMessage(JenkinsRule.java:1246)
	at org.jenkins.plugins.lockableresources.LockStepTest$19.evaluate(LockStepTest.java:735)
	at org.jvnet.hudson.test.RestartableJenkinsRule$3.evaluate(RestartableJenkinsRule.java:84)
	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:534)
	at org.jvnet.hudson.test.RestartableJenkinsRule.run(RestartableJenkinsRule.java:100)
	at org.jvnet.hudson.test.RestartableJenkinsRule.access$100(RestartableJenkinsRule.java:30)
	at org.jvnet.hudson.test.RestartableJenkinsRule$1.evaluate(RestartableJenkinsRule.java:64)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

interoperabilityOnRestart(org.jenkins.plugins.lockableresources.LockStepTest)  Time elapsed: 1.453 sec  <<< FAILURE!
java.lang.AssertionError: tried to overwrite p #1 with p #1
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:472)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:448)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:356)
	at jenkins.model.lazy.LazyBuildMixIn.getBuildByNumber(LazyBuildMixIn.java:226)
	at org.jenkinsci.plugins.workflow.job.WorkflowJob.getBuildByNumber(WorkflowJob.java:215)
	at org.jenkins.plugins.lockableresources.LockStepTest$14.evaluate(LockStepTest.java:518)
	at org.jvnet.hudson.test.RestartableJenkinsRule$3.evaluate(RestartableJenkinsRule.java:84)
	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:534)
	at org.jvnet.hudson.test.RestartableJenkinsRule.run(RestartableJenkinsRule.java:100)
	at org.jvnet.hudson.test.RestartableJenkinsRule.access$100(RestartableJenkinsRule.java:30)
	at org.jvnet.hudson.test.RestartableJenkinsRule$1.evaluate(RestartableJenkinsRule.java:64)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

Running InjectedTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.957 sec - in InjectedTest

Results :

Flaked tests:
org.jenkins.plugins.lockableresources.LockStepTest.deleteRunningBuildNewBuildClearsLock(org.jenkins.plugins.lockableresources.LockStepTest)
  Run 1: LockStepTest.deleteRunningBuildNewBuildClearsLock » Interrupted sleep interrup...
  Run 2: PASS

org.jenkins.plugins.lockableresources.LockStepTest.interoperabilityOnRestart(org.jenkins.plugins.lockableresources.LockStepTest)
  Run 1: LockStepTest.interoperabilityOnRestart tried to overwrite p #1 with p #1
  Run 2: PASS

repo: manahl/lockable-resources-plugin


text:
Add Hash#key method

Hash#key(value) returns the corresponding key with the given value.

Updated. Added Hash#key? method.

Updated. I followed the #fetch pattern and make #key block variant public for now; however, like you said, I'm not quite sure about this as it is not quite straightforward as a public API.

What do others think about a public Hash#key(value, &block)?

Updated.

Maybe @asterite would have an idea about this?
We are discussing if methods like Hash#fetch and Hash#key (with a block) should be public methods or not. The purpose of these methods are not for public API use but for DRYing related methods, thus their logic might not be as straightforward and may confuse developers at first sight.

Well, I never questioned it for Hash#fetch, there it very well has legit public usages.

Oops, I see.

Well, no other opinions, then let's keep it public for now. Thanks!

Thanks!

authors: adlerhsieh jhass

repo: manastech/crystal


text:
Fix HTTP::Request#keep_alive? method

Add "upgrade" type of connection to fix Websocket hand shake, that expects "Connection" header to be "Upgrade".

I'm trying to run this
require "http/server"
require "http/server/handlers/websocket_handler"

handlers = [] of HTTP::Handler
handlers << HTTP::LogHandler.new
handlers << HTTP::WebSocketHandler.new do |req|
  puts "> #{req}"
end
server = HTTP::Server.new(3000, handlers)
server.listen

But in Chrome it gives me the error "WebSocket connection to 'ws://pandora-102353.nitrousapp.com:3000/' failed: Error during WebSocket handshake: 'Connection' header value must contain 'Upgrade'". Do you have a working example without changing HTTP::Request#keep_alive? method?

This fix worked for me to get WebSockets upgrading properly, but had to be applied to src/http/common.cr

@hugoabonizio @adam12 Sorry for the delay! Your solutions were perfect, but we couldn't merge it because the code moved.

authors: adam12 asterite hugoabonizio


text:
Implementing State Space Models and simulating the State Space

Updated tests #40 and #41
Process like Ornstein-Uhlenbeck process which can be simulated by specifying the parameters  #41   of the process, theta - the mean of the process.

@amitkumarj441 We already have implementation of Gaussian Process, in that you can implement OrnsteinUlhenbeckKernel class which calculates the Ornstein Ulhenbeck covariance function for two points x and y.

Hey @mandar2812 , I'm onto implementing Ornstein Ulhenback covariance function for two points x & y, I already initiated some needed PRs for the above implementation, I'll soon initiate a PR for the same.

@amitkumarj441 : Look at this class RBFKernel to see how to implement kernels in DynaML:
RBFKernel

@mandar2812 Just initiated a PR to generate akka stream of Metropolis Hasting state #50 with breeze implementation of Markov Chain


text:
Check valid username in installer

Upon following this script:
Open a PowerShell prompt as administrator
Download the installation script installer.ps1 to your desktop
(New-Object net.webclient).DownloadFile('https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1',"$([Environment]::GetFolderPath("Desktop"))\install.ps1")
Unblock the installation script by running:
Unblock-File .\install.ps1
Enable script execution by running:
Set-ExecutionPolicy Unrestricted
If you receive an error saying the execution policy is overridden by a policy defined at a more specific scope, you may need to pass a scope in via Set-ExecutionPolicy Unrestricted -Scope CurrentUser to view execution policies for all scopes, type Get-ExecutionPolicy -List
Finally, execute the installer script as follow:
.\install.ps1
I get the following error See Image

The solution is to build the windows 10 VM with a one word user name.  I kept making the fresh windows install with user name JOHN DOE instead of a single word user name.  This resolved the issue upon package install the paths wheee the package is installed is clear of blanks.

@Ana06 FYSA, adding this check in https://github.com/mandiant/flare-vm/pull/485

See #485, thanks @HuskyHacks!

authors: HuskyHacks elevateman mr-tz

repo: mandiant/flare-vm


text:
Include all classes (not just components)?

This is a great start. But could it be modified to include all classes? It looks like the tool does parse non-component classes (like services, models, etc.), but doesn't appear to include them in the graph output. I think being able to see all the dependencies would also be quite useful.

@brian428 if you check this output, you can see the blue deps which are classes (services).
Is that what you mean?

Well, yes...partly. Though for some reason I have a number of services and other injected classes that aren't showing up as blue dependencies like you're showing above. Does the graph only pick up providers declared on a given class (rather than singleton (global) or inherited providers)?
Beyond that, I think it would be useful to see other types as well (models, composed/aggregated classes and so on). I realize that could make the graph a lot bigger, so maybe it could be an option. But being able to essentially see the relationships for all imported classes (or at least all imported non-framework classes) could be quite useful to identify issues with module decoupling and organization.
What do you think? Am I making sense? :-)

Yes, the tool crawls only the providers (hence the dependencies feature).

I am open to add this feature. However, I think this has to be behind flags. The developer should be able to choose what she/he wants to generate.

However, my priority for now would be to update the tool so it can handle TS 2.0

Right, that's what I inferred (about providers).
Given that, I'd say two key enhancements might be:

To have it handle global/singleton providers that are configured in the application bootstrap. (Currently, it only seems to handle providers declared on individual components, right?)
To use constructor arguments to determine a component's dependencies rather than relying only on the component's providers. What is shown right now, where only dependencies declared explicitly on the component as providers, is certainly useful. But in many cases, you're dealing with providers that are declared further up a component hierarchy (or bootstrapped at the app level), which are "lost" (to some degree) in the current dependency graph.

I'd have no problem with these options being exposed via flags though.
To be clear, I'm not disparaging what you've done...it's already very useful. As I said, I just think that being able to really see all of the dependencies, across the entire app, would also be very useful. In that light, the constructor params might be a more accurate way to determine the dependencies. Or to go even further, using the imports to truly visualize all of the dependencies.
Thanks!

Sure @brian428 I see your point ^^
Do you think you can send a PR so we can discuss more in details on the implementation?

I will see if I can take a stab at doing this, but it may take some time. Partly because I'm obviously not familiar with how you're actually doing this. And partly because I'm on the hook already for some other PRs on other projects (namely, the angular2-seed project). :-)