How to add new host to flynn if discover token is not known? - flynn

Documentation tells us to add it using -with --discover token. but how do I find discover token? cluster was created a while ago and I can not find what discover token was used.
I tried to generate new discover token on leader, and init new host to that, but that did not work. no messages either.

try typing history command in the terminal and grep it
history | grep discovery

Related

how can I integrate web app with fablo API?

I have deployed the smart contract(go) and the fablo network , I also have my own fablo rest APIs but I need to integrate this API with my web app how can I do it?
I'm working with this repository https://github.com/fablo-io/fablo-rest
I invoked the following steps in the readme file:
1- Run the script ./hyperledger-citc.sh to install some necessary software
2- Run the command sudo ./fablo recreate to start the network
3- You may open the file fablo-config.json to view the network components. It also includes the the installation of the chaincode "asset-transfer-basic" in Golang
4- You may use the commands sudo ./fablo [down | start | stop | up | prune | reset] to interact with the network
5- We use Fablo Rest API (https://github.com/fablo-io/fablo-rest) to interact with chaincodes and execute Transactions.
6- Create an authorization token using the below command. This token expires in few minutes, so it needs to be regenerated
I have learned that I can use fetch API function but it's only receives URL as a parameter but I don't have the URL of my API
In fabric samples,Check the rest-api-typescript project which is available under asset-basic-transfer or you can search "Asset Transfer REST API Sample" with this text on Fabric sample you will get the project info.

How to overwrite the api proxy deployment using apigeetool

I am using the below command in jenkins to deploy the api proxies to apigee edge.
apigeetool deployproxy -u abc -o nonprod -e dev -n poc-jenkins1 -p xyz
But am getting the below error.
Error: Path /poc-deployment-automation conflicts with existing deployment path for revision 1 of the APIProxy poc-deploy-automation in organization nonprod, environment dev
Here is my requirement , please help me what command to use.
If API doesn’t exist in target environment, Create Api in new environment with version 1.
If API already exist in target environment, Create Api in new environment with new version (previous version + 1)
So what command should we use to fix the above error and what should we use to do the above 2 tasks.
Help Appreciated.
The apigeetool deployproxy command supports by default your requirements. It deploys the revision 1 if there is no proxy with the name, and increases the revision if it already exists.
However, based on the error you mentioned, it seems that you have a path conflict between two proxies. You are trying to deploy a proxy to a /poc-deployment-automation basepath, but there is another proxy called poc-deploy-automation which is listening on the same basepath. It is not possible, even if the proxy name is different, because the basepath is what apigee uses to redirect traffic to your proxy.
Check the xml file at the root of your proxy and change the basepath attribute.
Also, the basepath of an API Proxy can be anything, but could not be the same used at the same time by two proxies--only one can be deployed at time. The revision numbers are irrelevant in this situation.

How to pass etcd credentials to kubernetes api-server?

I'm facing this issue since some days ago, and is the following:
I'm trying to start my kubernetes master using hypercube,
but the documentation is missing how to pass the etcd credentials to kubernetes in order to use a given user.
In the api-server configuration I have something like this:
- --etcd-servers=http://root:toor#etcd2-0.server:2379,http://root:toor#etcd2-1.server:2379,http://root:toor#etcd2-2.server:
Which is the only possible way to set the basic auth parameters of etcd.
(This works great for both etcdctl and etcd REST API.)
But I'm getting the following error:
F0915 17:25:35.579278 1 controller.go:86] Unable to perform initial IP allocation check: unable to persist the updated service IP allocations: 110: The request requires user authentication (Insufficient credentials) [0]
My etcd is refusing to write into /registry (which is the default folder), but root:toor are the right credentials.
I couldn't find any other configuration parameters for this, and I REALLY, REALLY need to secure my etcd with roles/users.
Please, I need some ideas / solutions if possible.

Registering new devices to Azure IOT hub

Just simple question:
I have created a new Service bus, Event hub and some shared access tokens with all rights, but registering a new device with iothub-explorer fails to 'unauthorized' message in Azure.
[tuomas#raspberry ~]$ iothub-explorer login "HostName=mynew-iot.servicebus.windows.net;SharedAccessKeyName=mynewdevice-1;SharedAccessKey=NptRRzI9mhiXO2QKuhZq47iY24A7cbtxRpUDSQO5aSI=" --connection-string
Session started, expires Tue Apr 12 2016 20:02:13 GMT+0300 (EEST)
[tuomas#raspberry ~]$ iothub-explorer "HostName=mynew-iot.servicebus.windows.net;SharedAccessKeyName=device-1;SharedAccessKey=NptRRzI9mhiXO2QKuhZq47iY24A7cbtxRpUDSQO5aSI=" create dummydev
Error Unauthorized
Any toughts?
With Thanks,
~T
I don't know if it's on purpose or not but the connection string in the second command doesn't match the one in the first one: the SharedAccessKeyName is different. Maybe it's just that.
If it's not just that, due to the way it's named I'm under the impression that you are using a device connection string when you should be using the service connection string (with a policy name in the SharedAccessKeyName field, such as the iothubowner). Whatever the policy is it should have the permissions to read and write to the registry. Unless you named such a policy "mynewdevice-1" ? One simple way to debug this is to use the iothubowner policy and associated key since it has full permissions.
Last thing, if you're using the "login" command, you don't need to specify the connectionstring again in subsequent commands (except to receive messages sent by devices, since this is done on the event hubs endpoint).
Thanks, I have really messed these old and new portals.
After creating a new Service bus and event hub in new portal I can register my devices. The rest .... new question perhaps...
With thanks.

Hawtio executable jar always "Failed to log in, Forbidden"

I'm trying to put hawtio-1.4.11 to work, but failing. I'm using the simplest configuration.
In the same host, activemq-5.9.0 (clean, no configs), and I just run java -jar hawtio-app-1.4.11.jar.
I've tested the logins to activemq (both old console and hawtio) and it was working ok.
Then I accessed hawtio
http://my_ip_address:8080/hawtio
and filled the form, and I was redirected to the login page. Then when I click login, I get "Failed to log in, Forbidden".
Could not see any log messages the give me a hint.
Thanks in advance for any help.
Update:
I did the fowlling test:
wget --user admin --password admin --auth-no-challenge http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost/TotalConsumerCount
And it worked (HTTP 200), and using a wrong password (HTTP 403). It seems to be working as it supposed to, but still can not make hawtio standalone to connect.
When I try to login using hawtio, the only log messages are those (regardless if I used the correct password or not):
2014-07-17 19:08:47,342 | DEBUG | Handling request for path /auth/login | io.hawt.web.AuthenticationFilter | qtp962581073-40
2014-07-17 19:08:47,342 | DEBUG | Doing authentication and authorization for path /auth/login | io.hawt.web.AuthenticationFilter | qtp962581073-40
BTW, I've tried a lot of different setups, including war version in jboss-4.2.3 but all failed too.
See this blog entry how to install hawtio in ActiveMQ as the web console
http://sensatic.net/activemq/activemq-and-hawtio.html
It also explains to setup the security part, which is likely what is your problem.
I was able to login to activemq console, but not in hawtio.
In my case I found that:
activemq console credetial are read from conf/jetty-realm.properties
hawtio credential are read from conf/users.properties and conf/groups.properties
In users.properties the password cannot contains same characters, in my case the euro sign €
I have had a similar issue: get always a hawtio (1.4.45) styled login page when try to remote connect to ActiveMQ jolokia api (ActiveMQ 5.10.1)
The reason was that the URL-paht configured in hawtio, that points to ActiveMQ jolokia api must end with an /!
for example /api/jolokia/
On a Unix machine - I fixed this through changing the order of the configurationpath to the configuration scripts. Added /bin/env as the first statment in the /bin/activemq script under # CONFIGURATION # For using instances,
since it ignores the others but the first as stated here
Unix configuration
happy coding !