I'm trying to deploy from apigee tool with the following command:
apigeetool deployproxy -n my_proxy_name -o myorgname -e test -d apiproxy-3/ -b my_base_path -u myusername -p mypassword
and getting always this:
Import failed to /v1/organizations/myorg/apis?action=import&name=my_proxy_name with status 400:
{
"code" : "messaging.config.beans.InvalidBundle",
"message" : "Bundle is invalid. Unable to read/find APIProxy contents",
"contexts" : [ ]
}
At first I thought it was my proxy development.. so I tried downloading the proxy as zip file, uncompressing it, and then uploading from this command without any changes, and got the same thing.
Could this be a problem with me being on yosemite dev build 2?
the issue here is with the paid hosted option, it seems My org was having an isse and support is looking into it.
Try renaming the subdirectory from apiproxy-3 to apiproxy, then retry.
Related
Prog:dist abhishek$ composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString
Deploying business network from archive: my-network.bna
Business network definition:
Identifier: my-network#0.1.6
Description: My Commodity Trading network
✖ Deploying business network definition. This may take a minute...
Error: Error trying deploy. Error: Error trying install composer runtime. Error: Connect Failed
Command failed
when trying to install the composer runtime,returns
Prog:dist abhishek$ composer runtime install -n my-network -p hlfv1 -i PeerAdmin -s randomString
✖ Installing runtime for business network my-network. This may take a minute...
Error: Error trying install composer runtime. Error: Connect Failed
Command failed
I've been working through the Hyperledger Composer tutorial (https://hyperledger.github.io/composer/tutorials/developer-guide.html) on an older Mac, running OS X Mavericks 10.9.5, which means I'm using Docker Toolbox instead of Docker for Mac. I encountered the same error message when deploying the sample Trading network .bna file on my local dev environment Fabric network.
Here is the command in Terminal:
$ composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString -A admin -S
And here is the error log:
Error: Error trying deploy. Error: Error trying install composer runtime. Error: Connect Failed
In my case, it was because Docker Toolkit answers to on an IP address assigned when you start docker, instead of localhost, 127.0.0.1, etc.
If you are also using Docker Toolkit and are getting the same error, first find the docker IP number, which should be listed under the Docker Whale logo in Terminal when you started it, and then edit the following files (TextEdit should be fine), changing all references to localhost and 127.0.0.1 to the IP number (leave the ports, such as :7050, there):
fabric-tools/fabric-scripts/hlfv1/composer/configtx.yaml
fabric-tools/fabric-scripts/hlfv1/composer/docker-compose.yml
fabric-tools/fabric-scripts/hlfv1/createComposerProfile.sh
fabric-tools/fabric-scripts/hlfv1/createPeerAdminCard.sh
Then, back in Terminal, navigate back to fabric-tools, and if Fabric is already started, stop it, and then recreate the Composer Profile, as documented:
$ ./stopFabric.sh
$ ./createComposerProfile.sh
The log should now show the Docker Toolkit IP for the orderers, CA and peers. Now restart Fabric:
$ ./startFabric.sh
Navigate back to fabric-tools/my-network/dist and re-run the compose command, and if all goes well, it should connect properly.
Is your Fabric running? What is the output of docker ps?
Try doing the next:
Pick a directory that you want and install Hyperledger Fabric and Hyperledger Composer Playground running:
curl -sSL https://hyperledger.github.io/composer/install-hlfv1.sh | bash
Then run your command.
Try the code below:
$composer runtime install -c PeerAdmin#hlfv1 -n basic
$composer network deploy -a basic.bna -A admin -S adminpw -c PeerAdmin#hlfv1 -f admincard
I recently installed Ngrok in order to test my localhost meteor App on my phone.
I am successful in accessing the meteor app via a tunnel by ngrok.
However when I try to login using I get this error message:
The login process shows the following error message:
400. That’s an error.
Error: redirect_uri_mismatch
Application: AppName
You can email the developer of this application at: my#emailadress.com
The redirect URI in the request, http://localhost:7123/_oauth/google,
does not match the ones authorized for the OAuth client.
Updating the Authorized JavaScript origins & redirect URIs to the Ngrok forwarding addresses, doesn't have an effect.
How do I correctly use ngrok in conjuction with Google Oauth?
Any help would be greatly appreciated
Use ngrok and change the Root URL to the one supplied by ngrok.
ROOT_URL=http:XXXXXXXX.ngrok.io meteor to start meteor.
It's trying to use http://localhost:7123/_oauth/google instead of a more ngrok-like url that could be, for example: https://fd4fdbbb.ngrok.io/_oauth/google
You can check the parameters that you are using to run the app and the environment variables too.
For example, I typically use
ServiceConfiguration.configurations.upsert(
{ service: 'facebook' },
{
$set: {
appId: process.env.facebookConsumerKey,
secret: process.env.facebookConsumerSecret,
loginStyle: 'popup'
}
}
);
And run meteor using a bash script that looks like:
#!/bin/bash
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 4.4.7
IP_ADDRESS=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -v '10.0.0.1'` echo "Starting app on: $IP_ADDRESS:3000"
# NODE_DEBUG=request \
# facebookOAuthRedirectURL=http://$IP_ADDRESS:3000/_oauth/facebook \
facebookAppName="BlahApp - local dev" \
facebookConsumerKey=12345 \
facebookConsumerSecret=xxxxxx \
facebookOAuthRedirectURL=http://$IP_ADDRESS:3000/_oauth/facebook \
MONGO_URL=mongodb://$IP_ADDRESS:27017/staging-blah-app \
ROOT_URL=http://$IP_ADDRESS:3000 \
BIND_IP=$IP_ADDRESS \
MOBILE_DDP_URL=http://$IP_ADDRESS \
MOBILE_ROOT_URL=http://$IP_ADDRESS \
meteor --port $IP_ADDRESS:3000 --settings development-settings.json
So you can, instead of using googleOAuthRedirectURL=http://$IP_ADDRESS:3000/_oauth/google could use https://fd4fdbbb.ngrok.io/_oauth/google
The issue was that the environment variable were not read by meteor, and even though it was overwritten on the client side, somehow the server connected to google with a wrong callback url.
Now for the solution... I started by ensuring that the settings in the google service configuration were reset by running this in the terminal after killing the app:
meteor reset
In a separate terminal, I then started ngrok to generate a tunnel link:
./ngrok http 7123
Yielding the tunnel link:
http://adba9b9f.ngrok.io/
In a separate terminal I start my app by assigning it to "port 7123" and setting "http://adba9b9f.ngrok.io" as the absoluteUrl like this:
ROOT_URL=http://adba9b9f.ngrok.io meteor --port 7123
To confirm that this command has been carried out, I typed this into the browser console
Meteor.absoluteUrl()
The response:
"http://adba9b9f.ngrok.io"
Indicates that the Meteor.absoluteUrl() command was successful.
Next, I accessed my app via the "http://adba9b9f.ngrok.io" tunnel and clicked on the "Configure google button", where GLADLY noticed that the Authorized JavaScript origins were preset to:
http://adba9b9f.ngrok.io and
Authorized redirect URIs preset to: http://adba9b9f.ngrok.io/_oauth/google
I then filled in the Client ID and Client Secret part with details from the google credentials, and updated the google credentials with the details from the configure google button details and saved.
Am happy to say... Everything works desirably now.
I have followed below document to deploy openstack using kolla and I have built all the docker images successfully. I am following this guide for all-in-one installation.
http://docs.openstack.org/developer/kolla/quickstart.html
I have cloned stable/liberty branch.
But while issuing kolla-ansible deploy getting below error.
:# kolla-ansible deploy
Deploying Playbook : ansible-playbook -i /usr/local/share/kolla/ansible/inventory/all-in-one -e #/etc/kolla/globals.yml -e #/etc/kolla/passwords.yml /usr/local/share/kolla/ansible/site.yml
ERROR: merge_configs is not a legal parameter in an Ansible task or handler
Command failed ansible-playbook -i /usr/local/share/kolla/ansible/inventory/all-in-one -e #/etc/kolla/globals.yml -e #/etc/kolla/passwords.yml /usr/local/share/kolla/ansible/site.yml
I have searched a lot about this error but could not find anything, any idea about this error?
Please make sure you have right version of ansible on your deployment node. It should expect version >1.9.4 but < 2.0
I get an error when trying to run it:
~/projects/test-app
/usr/local/bin/meteor:3
# This is the script that we install somewhere in your $PATH (as "meteor")
Here is the command I run:
pm2 start meteor-pm2.json
And here is meteor-pm2.json:
{
"name" : "test-app",
"script" : "/usr/local/bin/meteor",
"MAIL_URL":"smtp://yourmail_configuration_here",
"MONGO_URL":"mongodb://localhost:27017/meteor",
"ROOT_URL":"https://www.mysite.com/",
"PORT":"3000",
"out_file":"/home/josh/logs/app.log",
"error_file":"/home/josh/logs/err.log"
}
I also try this:
cat start
#!/bin/bash
MONGO_URL="mongodb://localhost:27017/meteor"
PORT=3000
ROOT_URL="https://www.mysite.com/"
/usr/local/bin/meteor
and I run it with:
pm2 start ./start -x interpreter bash
and I get:
/usr/local/bin/meteor
^
ReferenceError: usr is not defined
when i modify the bash script by adding the export:
#!/bin/bash
export MONGO_URL="mongodb://localhost:27017/meteor"
export PORT=3000
export ROOT_URL="https://www.mysite.com/"
/usr/local/bin/meteor
I get:
export - SyntaxError: Unexpected reserved word
Any ideas what am I doing wrong?
Is pm2 trying to run the bash script in it's own special script interpreter that doesn't allow the use of export?
I believe this process.json syntax is more correct:
{
"apps": [
{
"name": "myAppName",
"script": "./bundle/main.js",
"log_date_format": "YYYY-MM-DD",
"exec_mode": "fork_mode",
"env": {
"PORT": 3000,
"MONGO_URL": "mongodb://127.0.0.1/meteor",
"ROOT_URL": "https://myapp.example.com/",
"BIND_IP": "127.0.0.1"
}
}
]
}
then I just start it using run.sh which contains:
#!/bin/sh
#
# This shell script starts the actual
# app in the production environtment.
#
pm2 start process.json -i max # Enable load-balancer and cluster features
Note: the BIND_IP env var is there to change it from the default (0.0.0.0). The 0.0.0.0 would make the app accessible around the ssl proxy layer (if you use SSL/TLS with nginx or some other web server and the BIND_IP is set to 0.0.0.0 then pretty much anyone could access it via http://myapp.example.com:3000 around the encrypted layer, unless you block that port in your web server's configuration).
This is how I got my meteor app (Telescope) working
ROOT_URL=http://localhost:3000 PORT=3000 MONGO_URL=mongodb://127.0.0.1:27017/Telescope pm2 start main.js
inside .meteor/local/build
Meteor isn't actually running from /usr/local/bin/meteor, that script is only used for bootstrapping etc, that when done redirects to ~/.meteor/meteor
From /usr/local/bin/meteor:
# All this script does is exec ~/.meteor/meteor. But what if you don't have it
# yet? In that case, it downloads a "bootstrap tarball", which contains the
# latest version of the Meteor tools, and plops it down at ~/.meteor. In fact,
# once you've run this once, you don't even really need this script: you can put
# ~/.meteor/ into your PATH, or a symlink to ~/.meteor/meteor into some other
# PATH directory. No special permissions needed!
So what you need to do is change your script pointer to use meteor in your "Warehouse dir" (~/meteor/meteor)
This means that pm2 expects some syntax and finds another in the start script. In order to direct it to the right syntax, add this to your config.json file:
"interpreter" : "bash"
P.S.: addition of this parameter to the command line didn't work
I bundled my application and put it onto my server. I am running the app via upstart:
exec sudo -u myuser PORT=3005 MONGO_URL=mongodb://localhost:27017/ms ROOT_URL=http://www.example.com/ /usr/bin/node /var/www/priv/example.com/bundle/main.js >> $
The important part (i think) is:
exec sudo -u myuser
When i curl my app via:
curl http://www.example.com/?_escaped_fragment_=
I get an empty body. My log file says:
spiderable: phantomjs failed: { [Error: Command failed: /bin/bash: /root/.bashrc: Permission denied
Can't open '/dev/stdin'
] killed: false, code: 255, signal: null }
stderr: /bin/bash: /root/.bashrc: Permission denied
Can't open '/dev/stdin'
I did chmod 777 on /root/.bashrc but without any success. If i do /bin/bash /root/.bashrc as 'myuser' i also get permission denied.
Could any one tell me how to set the permissions so that phantomjs can do what it has to do? Can i specify that ~/.bashrc is used anywhere? I would really love to see my stuff on google :-)
Thanks alot!
Manuel
Updates:
I have phantom.js 1.8.2 installed via npm.
Running the application as root does not help. Error then is:
spiderable: phantomjs failed: { [Error: Command failed: Can't open '/dev/stdin' ] killed: false, code: 255, signal: null } stderr: Can't open '/dev/stdin'
I found out, that it seems to be a package that causes the problem. I opened an issu here:
github.com/alanning/meteor-roles/issues/3
Alanning fixed the problem but spiderable still did not work. The solution was to remove phantomjs because i installed it via npm. I then reinstalled it from http://phantomjs.org/download.html directly. Now it is working!
I found that problem again, the problem were publications on the server-side that in some cases just returned but did not stop the subscription.
e.g. on server i have a publication with
return unless #userId
The correct way would be:
return this.stop() unless #userId
If a crawler comes, it will never be authenticated, so be careful to end publications correctly.