Cannot find the environment variable on skill deploy - alexa

​I am setting up ASK CLI on a new machine. I completed all the steps at Alexa docs and I am able to create a skill locally.
When I try to deploy it, it tells me: [Error]: Cannot find the environment variable: AWS_ACCESS_KEY_ID.
I went and took a look at the credentials file at ~/.aws/credentials and I can see that aws_access_key_id as well as aws_secret_access_key both exist. I checked with the CSV file and I confirmed that both those keys are correct.
What should I do?
I'm using WSL for Windows 10. I did setup on WSL for Windows 10 on my other machine and it did work.
Tried setting up a bash environment variable as well. Didn't work.

I fixed it by removing my AWS credentials file. Then I reinstalled the ask-cli and reinitialized it using the ask init --no-browser command.

Related

How to fix SERVICE_PAUSED error on starting nssm server

So I need to run a custom server. It worked on other machines, but not on mine (all of them are on Windows).
My input:
nssm start custom-server
Error message:
custom-server: Unexpected status SERVICE_PAUSED in response to START control.
I tried to re-start it, but got the same message.
Use the following instructions to change I/O redirects:
nssm set [SERVICE_NAME] AppStdout [APP_PATH_INSTALL]\logs\service.log
nssm set [SERVICE_NAME] AppStderr [APP_PATH_INSTALL]\logs\service-error.log
Check the service log files to find the failure.
In my case, the failure was caused by a dependency on Python libraries.
As Garric15 states it is probably your install command.
This could be for example a StdOut redirect to a path / file that does not exist on your local machine.
Look in the Application event log for errors where the source is nssm around the time you installed the service.
The reason is because firewall is blocking the software which you are running as a service, start first software separately, it will ask you to add to firewall exclusions , then you can use it via nssm
Some scenario
App directory not provided or doesn't exist
nssm nssm set xyz-service AppDirectory "D:\Work\ShoppingKart"
File which is given for service may be corrupted (rebuild code)
The application trying to run is not proper or corrupted. Try to run without windows service once.
Program (.exe) file path not found (in this case look for the solution, or else give full path, if java not found even if it is there in env, just add full path)
I solved it by using no mws (Managed Windows Service?) release,
ex.
gogs_0.12.10_windows_amd64 works
gogs_0.12.10_windows_amd64_mws not working
The issue for me was there had been a Java update on my machine. The JAVA_HOME environment variable was now pointing to an invalid directory (i.e. the old Java version). Just needed to update the JAVA_HOME path and restart the solr services to fix it.
I was attempting to configure rclone as a windows 10 service. I fixed it including the rclone.conf archive inside the rclone folder.
In my case, the problem was that after the service was installed using nssm.exe, the program name was changed. This caused service to always go to paused state after start or restart the service, using either services.msc or nssm.exe command line.
Editing service nssm.exe startup parameters solved the problem for me.

Managed VM Deployment hangs on "Copying certificates for secure access..."

I'm running the following command to deploy my Managed VMs app (on Windows 10):
gcloud preview app deploy app.yaml --project=<PROJECT> --promote
The deployment starts bug hangs on the following line:
Copying certificates for secure access. You may be prompted to create an SSH keypair.
And after some time I get the error:
ERROR: (gcloud.preview.app.deploy) Unable to copy certificates.
I've already:
Made sure that there are SSH keys in ~\.ssh\google_compute_engine
Tried to run with --quiet - same results
Renamed ssh-term.exe to ssh.exe - same results
Run the command as an administrator.
Run the command with --verbosity debug, which prints the following line multiple times: DEBUG: File [f] does not exist locally.
Any help will be much appreciated!
Found the cause! It was the project's firewall that blocked SSH by default. Fixed that and it worked.
Glad you fixed it, I had the same problem and will use your fix. I did happen accros a work around. By using the Container Build API to perform the build.
enter the command
gcloud config set app/use_cloud_build true
Before you
gcloud preview app deploy
Cite: https://github.com/isusanin/google-cloud-sdk/issues/533

GAE Upload Download Data / Import Data to localhost for testing on my dev server

I needed to test some changes on my local dev server before pushing to production. Doing so required having the full dataset on my local machine.
A colleague directed me to:
https://developers.google.com/appengine/docs/python/tools/uploadingdata?csw=1
I downloaded the data using an administrator's username and password, but unfortunately, I was unable to upload the data to my localhost "dev" app engine server.
Ran this command from the commandline:
appcfg.py upload_data --filename=../data/data1.dat --url=http://localhost:9080/_ah/remote_api ./
Where:
9080 was my app port on my localhost copy of the app
I was running this command from my app directory
Had the downloaded data stored in relative directory
../data/data1.dat
Received this error:
raise _ToDatastoreError(err)
google.appengine.api.datastore_errors.BadRequestError: app "dev~appname" cannot access app "appname"'s data
UPDATE: It seems that the answer was as simple as adding the following to my upload_data call:
--application="dev~appname"
Thanks #DavidBennett.
ORIGINAL ANSWER: (which also works)
After a ton of searching on SO and code.google.com, the solution I found that worked was a comment on this question:
devappserver2, remote_api, and --default_partition
I used my original command as described in the question:
appcfg.py upload_data --filename=../data/data1.dat --url=http://localhost:9080/_ah/remote_api ./
The username and password I entered when prompted were my apps username (in my case, my email) and the corresponding password. (If that doesn't work you might want to try blank or test#example.com based on other comments I've read, but have not tested that theory.)
I also restarted my app engine with the following flag: (don’t forget to remove the flag the next time you restart the server) (You might want to try without using this flag, since I can’t confirm that it affects anything - I’m including it here, since it was a setting that I used.)
--clear_datastore=yes
The commenter recommends to delete “dev~” in your local server code on line 84 in this file:
google/appengine/tools/devappserver2/application_configuration.py, line 84
Where:
that base directory 'google' is located inside of:
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
assuming your GoogleAppEngineLauncher.app directory is in your Applications directory on your Mac
IMPORTANT: Restart your local app engine server for the changes to take effect.

deploying gae to development server stopped working

I'm working through a test GAE Java project which was working fine but I decided to look at adding GWT to the same project. I then decided to stick with the GAE stuff I was learning and decided to remove GWT. The problem is I can't now deploy to the development server as it gives the following in the Eclipse console pane. Anyone know please how I can reset appropriate settings to how my project had them originally?
terminated test [Web Application] C:\Program
Files\Java\jdk1.6.0_37\bin\javaw.exe Usage:
[options]
Options: --help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest -s SERVER SDK version. --address=ADDRESS The address of the interface on the local machine -a ADDRESS
to bind to (or 0.0.0.0 for all interfaces). --port=PORT
The port number to bind to on the local machine. -p PORT
--sdk_root=DIR Overrides where the SDK is located. --disable_update_check Disable the check for newer SDK versions. --generated_dir=DIR Set the directory where generated files are created. --jvm_flag=FLAG Pass FLAG as a JVM argument. May
be repeated to
supply multiple flags.
I seem to have found my own answer through setting up a new dummy gae project and having a poke around, found that the 'Run As' > 'Run Configurations...' > '(x)= Arguments' > 'Program arguments' had an additional port defined prior to the rest of the argument beginning '--port=8888'. I removed the mention of '-codeServerPort 9997 ' and it now deploys to dev server and appears to be working as before.
eg
new dummy project: --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\dummy\war"
project that wouldn't deploy to dev server: -codeServerPort 9997 --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\test\war"
I faced the same issue and you know what, Workaround is just pretty simple.
I created one new appengine project with only one jsp in WAR and 'Run As' > 'Run Configurations...' >Server Tab -> Unchecked then checked Run Built-In server and then checked Automatically select any port.
Server started ..on some fishy 25334 port..i stopped that using red button on Console Terminal.
then i changed it back to 8888 and WHOA project Ran.... :)
Then i did the same with old project. deleted this new one and all is working as expected.

Google App Engine appcfg.py shows the help message for every command

I have GWT app, which is deployed on GAE (Java). I'm trying to download data from App Engine datastore using appcfg.py . I did all the setup according to http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/ .
GAE Python SDK version is 1.4.3
Python version is 2.5.4
appcfg.py is on my PATH. When I run appcfg.py on the command-line, I get the "help" message. But the problem is that no matter which command I use, it always returns the help message. I have not been able to run any command using appcfg.py.
It doesn't give any specific error message no matter what arguments I give. My app is using Google Accounts authentication, but I don't think it even gets to the point of authentication.
I'm able to use the Java appcfg (for other actions like rollback) without any problem. But the Python version simply refuses to work for all commands.
I've tried different formats like:
appcfg.py create_bulkloader_config --url=http://myappid.appspot.com/remote_api --application=myappid --filename=config.yml
appcfg.py create_bulkloader_config --filename=bulkloader.yaml --url=http://myappid.appspot.com/remote_api
appcfg.py --filename=bulkloader.yaml --url=http://myappid.appspot.com/remote_api create_bulkloader_config
All give me the same help message:
Usage: appcfg.py [options]
Action must be one of:
create_bulkloader_config: Create a bulkloader.yaml from a running application.
cron_info: Display information about cron jobs.
download_app: Download a previously-uploaded app.
download_data: Download entities from datastore.
help: Print help for a specific action.
request_logs: Write request logs in Apache common log format.
rollback: Rollback an in-progress update.
set_default_version: Set the default (serving) version.
update: Create or update an app version.
update_cron: Update application cron definitions.
update_dos: Update application dos definitions.
update_indexes: Update application indexes.
update_queues: Update application task queue definitions.
upload_data: Upload data records to datastore.
vacuum_indexes: Delete unused indexes from application.
Use 'help <action>' for a detailed description.
Options:
-h, --help Show the help message and exit.
-q, --quiet Print errors only.
-v, --verbose Print info level logs.
--noisy Print all logs.
-s SERVER, --server=SERVER
...
...
...
Even when I try "appcfg.py help create_bulkloader_config" for a detailed description, it still shows me the same standard help.
I have also tried on the local development server using the url http://127.0.0.1:8888/remote_api but it still gives the same help message.
I'm totally clueless as to what the problem is. I'm new to GWT and GAE, and any help will be appreciated.
Thanks.
The following fix worked for me. It looks like appcfg.py doesn't like PYTHON27 and ALWAYS returns the help menu. I fixed it by executing it with PYTHON25 and hard coded all my file locations:
C:\Python25-archive\python "C:\Program Files (x86)\Google\google_appengine\appcfg.py" rollback C:\scripts\myapp
The right way is to change the environment variables on Windows 7:
Go to System Properties
Go to Advance System Settings
Click on Environment Variables
Append to Path variable the values C:\Python27\
Click Ok and restart your computer. (Yes, it is needed.)
Another way is to:
Open command Prompt
Locate your python.exe file. For example:
C:\Python27>_
Then, run a python command that looks like this.
python <appcfg_directory> download_app -A <your_app_id> -V <your_app_version> <output-dir>
Where <appcfg_directory> is equal to C:\Program Files\Google\google_appengine\appcfg.py. (Depending on your file location)
Don't forget to put quotes before and after <appcfg_directory>

Resources