How to start cosmosdb emulator from command line? - azure-cosmosdb

I installed the emulator according to this and following this guide. I am starting here: Use the emulator on Linux or macOS. cosmos docsI can start the cosmosdb emulator from the windows menu. However I need to start it and make the port exposed to my macbook so my dev environment can connect to it. To do this I see you have to start the emulator from the command line. But if I try to run it from the command line it says
command not found
Why do I get this error given that I have installed it correctly according to the docs? How do I start it from the command line?

This is just above the section you referred to in your question in the docs.
Microsoft.Azure.Cosmos.Emulator.exe /AllowNetworkAccess /Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM +4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
Make sure to read and follow these instructions carefully. There are multiple steps involved in running the emulator hosted in a Windows VM from Mac or Linux.

Related

Cant connect to workspace

Im trying to complete the very first training module offered by MS. Something Im missing that isn't detailed on the documentation of the training.
These are the instructions I'm following
https://github.com/MicrosoftDocs/mslearn-aml-labs/blob/master/labdocs/Lab01.md
All good until I have to run the second command defined on the notebook called
"01-Getting_Started_with_Azure_ML.ipynb".
And yes I entered the device login code as the instructions indicate.
Look at the attached screenshot of the error returned after running the command of the notebook.
Opened a case with Microsoft. They noticed is an issue affecting their VM servers.
This is their reply:
Hi Marbin,
Hope you are doing good. I had discussed this with our team as well. This was a known issue with workspace names with capital letters. So, the workspace name ‘ML_Battlefield’ was creating the issue. This is fixed in SDK version 1.3.0.
In the compute instance notebook, we can update the SDK version to: pip install --upgrade azureml-sdke

Can cloud instances of Jupyter Lab support pop out interactive windows

I'm new to Jupyter notebooks/Lab and I've successfully got interaction with pop-out windows and buttons etc with ipywidgets on local instances of Jupyter Lab but not in the cloud when using notebooks.ai - the code runs without error but doesn't create the appropriate windows/button.
Is there anyway to get this working or is this an inherent restriction of using Jupyter Lab in the cloud?
I'm wondering whether there are firewall settings that need configuring to get this to work?
The X11 forwarding is disabled on the docker machines provided by notebooks.ai. Hence, any pop-up interaction is not being forwarded to your machine. However, you can see any inline plot/button in the Jupyter notebook.
If you are interested in this feature there is a GitHub repository to request features (I have never tried it) but might be interesting for you to receive a more in-depth explanation, workaround, or solution.
PROVE:
In the launcher tab you can either run a notebook, a python interpreter or a terminal on the remote docker machine. If you select the terminal and type echo $DISPLAY, you will see that the result is an empty line (if a valid display was attached you will see something like: DISPLAY=localhost:11.0).
For further information about using BASH to check if X11 forwarding is enabled from SSH check this question.

Firebase CLI tool is freezing when I type 'firebase init'

I installed the firebase command line tool and logged in successfully. I type
firebase init
in terminal, within my project directory, and I get the option to choose Database, Functions, or Hosting. I use the arrows and space bar to select Functions, press enter, and am presented with a list of projects. From this point forward I cannot do anything in terminal. I have to quit terminal in order to use it again. I am running OSX El Capitan, 10.11.6. I contacted Apple Support and they recommended talking with Firebase first, who in turn recommends asking stack overflow first. Any idea what the problem may be?
See the comment above, Node v8.0 and 8.1 both had regressions that broke the Firebase CLI. I upgraded my version of Node from 8.1.0 to 8.1.3, and everything works fine.

Can't start Cordova debugging to iOS simulator

I've followed the instructions at the link below to "Build and simulate a Cordova iOS app in the cloud". https://taco.visualstudio.com/en-us/docs/build_ios_cloud/
After completing the instructions I'm able to build and get the iOS simulator working, however, I'm unable to attach a debugger.
The message displayed in remotebuild is:
GET /cordova/build/5655/debug 500 10.865 ms - 28
In Visual Studio I see the following in the Debug window:
Starting launch process C:\Program Files (x86)\nodejs\node.exe "(redacted)\node_modules\vs-tac\emulator.js" --platform ios --action launch --path "(redacted)\buildInfo.json" --serverUrl https://(redacted):3000/cordova --certificateName (redacted) --language en-US --loglevel info --cliVersion 5.4.1 --npmInstallDir "(redacted)" --deployTarget "iPhone 5"
Timed out connecting debugger to remote Apache Cordova app. See Output window for JavaScript console output.
------ Cordova tools 5.4.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 5655 on server https://(redacted):3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 5.4.1 already installed.
Requesting debug on remote iOS device for buildNumber 5655 on server https://(redacted):3000/cordova...
Failed to Debug iOS remote for build (redacted)\buildInfo.json to https://(redacted):3000/cordova :
iPhone 5
My local development machine is using Visual Studio 2015 and Cordova 5.4.1. I have Node v0.12.2 installed locally and v0.12.9 installed on the MacInCloud. Following the instructions in the link above, I am NOT an admin on the Mac machine.
I've also already tried the instructions suggested in this SO answer: Visual Studio Debugger failing to connect to remote Apache Cordova app in iOS simulator
All the suggestions and the links provided by others were helpful but ultimately my assessment of the problem was not being admin/root on the Mac. The Visual Studio Cordova docs linked in my original question would suggest that you can do all that you need on a Mac without having admin/root access but in my experience that is just not the case.
To the credit of the MacInCloud group, they were very helpful in making changes that I requested to permissions and for reinstalling packages such as brew, ios-webkit-debug-proxy, remotebuild, etc... but after a while that back-and-forth kind of approach to fixing the issue proved painful. When I switched from a Managed MacInCloud server to a Dedicated one, everything worked almost immediately.
Looking back I think the initial execution of remotebuild, which executes brew -- without being admin on the box -- caused the whole process to go south. I was warned when I ran remotebuild for the first time that it would install some brew components that might need root access. That should have been a warning sign to me that not being admin on the box was going to be an issue...
Even though I was able to get a Dedicated MacInCloud server working, the lesson I learned about having control over the Mac prompted me to just buy a Mac Mini. That was a little more difficult to setup because I was now doing everything myself, but ultimately I think it will pay off in the end.
For anyone else struggling with similar issues here is a brain dump of some things I learned along the way:
You don't necessarily need to get Visual Studio talking to the Mac to debug Cordova applications. You can use Safari Web Inspector from the Mac. https://blog.nraboy.com/2015/10/debugging-your-apache-cordova-ios-app-with-safari/. Even though I finally got VS working, I actually prefer this because it is more like Chrome's debugger which I prefer to Visual Studio's.
The ios-webkit-debug-proxy NPM package mentioned in other comments and links is basically a proxy which Visual Studio uses to debug the simulator in exactly the same way Safari does as mentioned above. For this proxy to work you must also be allowed to connect to the Mac over ports 9221-9322. https://github.com/google/ios-webkit-debug-proxy. Prior to learning that I thought I only needed port 3000 open for the remotebuild proxy...
The package necessary for launching the iOS simulator from remotebuild is ios-sim and it will occasionally timeout when launching the simulator and cause the debugger not to attach. This is a known limitation. https://github.com/phonegap/ios-sim and https://blogs.msdn.microsoft.com/visualstudio/2014/11/13/tools-for-apache-cordova-update-ios-debugging-windows-8-1-support/ (see comments).
If you should feel the need to install/uninstall brew it is very easy to do. Just run the install script and if already installed it will give you instructions on how to uninstall. http://brew.sh/ and https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting. To uninstall or reinstall a NPM package is equally easy and Google is your friend.
Read and re-read both of these links for setting up a Mac: https://taco.visualstudio.com/en-us/docs/ios-guide/ and https://taco.visualstudio.com/en-us/docs/build_ios_cloud/. Getting the RemoteBuild.config right is crucial for getting secure connections to work -- especially if you want to access your Mac Mini at home from across the internet.
If you are remoting to a Mac I highly recommend iRAPP or some other VNC alternative. My experience has been that VNC is painfully slow and having a bad connection when you're troubleshooting issues just leads to more aggravation. http://www.coderebel.com/products/irapp/
As mentioned above, the MacInCloud guys were great when I asked for support, but if you do need root access for more than six months the cost of a Mac Mini is less than a Dedicated server plan.
Cheers
Since it is the call to /cordova/[...]/debug that is failing it looks like you might not have ios_webkit_debug_proxy installed. You could try making sure that homebrew is installed (from http://brew.sh) and running brew install ios-webkit-debug-proxy. Afterwards you should be able to run ios_webkit_debug_proxy without an error.
If that runs successfully then you should be able to quit out of ios_webkit_debug_proxy and debugging should work via remotebuild.

Adding a Host on CloudStack development environment

I set a CloudStack development environment on Ubuntu 12.04 according to [this]
It works well, but I can't add a host through the management server UI.
I tested on released binary one, It could add the hosts. (Hypervisor: KVM)
I confirmed the log on terminal while the management server is running, It just said "unable to add host".
How can solve this problem?
Send this question to the Apache CloudStack developer mailing list.
Be prepared to provide a copy of the command you used to start the management server, the exact text from 10 lines before and 10 lines after the "unable to add host" message, and a copy of any exceptions that occured before this message.
I solved myself!
That's because of version. My CloudStack management server source version from GitHub was 4.2.0. But agent version was 4.1.0. So I changed source version 4.1.0. And, It was working well.

Resources