Cloud9 IDE [C9 Server Exception 2] undefined - cloud9-ide

We have installed cloud9 ide locally on ubuntu 12.04LTS 32bit server. Installation steps followed from the url http://ubuntuforums.org/showthread.php?t=1813076
Cloud9 IDE is running and able to see home page ( localhost:3131/ )
When we try to run php or python file, on the console window it shows a message "[C9 Server Exception 2] undefined"
and also a request to localhost:3131/debug throws "404 Not Found"
post params are as below,
{"agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0","type":"C9 SERVER
EXCEPTION","message":{"type":"error","message":"File does not exist: root/local/bin/node","code":2,"data"
:{"command":"Run","file":"root/local/bin/node","runner":"node","args":[""],"env":{"C9_SELECTED_FILE"
:""}}}}
How to fix this issue?

Installations steps in http://ubuntuforums.org/showthread.php?t=1813076 are for older version.
Installation
Follow these steps to install the SDK:
git clone git://github.com/c9/core.git c9sdk
cd c9sdk
scripts/install-sdk.sh
To update the SDK to the latest version run:
git pull origin master
scripts/install-sdk.sh
Please note that Cloud9 v3 currently requires Node.js 0.12 or 0.10.
Starting Cloud9
Start the Cloud9 as follows:
node server.js
The following options can be used:
--settings Settings file to use
--help Show command line options.
-t Start in test mode
-k Kill tmux server in test mode
-b Start the bridge server - to receive commands from the cli [default: false]
-w Workspace directory
--port Port
--debug Turn debugging on
--listen IP address of the server
--readonly Run in read only mode
--packed Whether to use the packed version.
--auth Basic Auth username:password
--collab Whether to enable collab.
--no-cache Don't use the cached version of CSS
Now visit http://localhost:8181/ide.html to load Cloud9.
Running Tests
Run server side tests with:
npm run test
Run client side tests with:
npm run ctest
Then visit http://localhost:8181/static/test in your browser.
For more detail see: https://github.com/c9/core#installation.

Related

Docker for Desktop error during connect: Post A connection attempt failed because the connected party did not properly

I have freshly installed Docker for Desktop Edge in Windows 10 Home and try to build an image using the docker build command. But unfortunately, it didn't work for me, and got the below error :
CMD - docker build -t heet1996/post:0.0.1 .
error during connect: Post https://192.168.99.100:2376/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=na8ugnpn6d8gnxl3z8ppx4gap&shmsize=0&t=heet1996%2Fpost%3A0.0.1&target=&ulimits=null&version=1: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Earlier I was using a docker toolbox so I had to remove all the environment variables related to the Docker in my User variables before installing Docker for Desktop. After a lot of search on GitHub issues, I am still not getting the solution.
This is what I found in my service.txt file (C:\ProgramData\DockerDesktop\service.txt)
[18:27:22.232][LoggingMessageHandler][Info ] [f9b6b957] <Server end> POST http://localhost/dns/refresh-hosts -> 204 NoContent (took 118ms)
I got this error when i un-installed the docker toolbox and installed the docker desktop.
System Configuration:
OS: Windows 10 Home
Version: 21H1
Steps I Followed:
Un-installed the docker desktop.
Removed the all dockers related environment variables from the user variables.
Navigation: This System-> Properties-> Advance System Settings-> Environment Variables-> User Variables.
Re-installed the docker desktop and it's started working properly.
Try to run it on Docker CLI instead of CMD
Open Powershell as Administrator and run the below commands
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
Docker for windows must have:
[✓] Updated Windows 10 version >=2004
[✓] WSL 2 and Default Distro (i.e ubuntu)
The steps are well documented here. These are what to do after the installation:
To confirm ubuntu's installation, open C:/Windows/System32/bash.exe aka bash.
To test if docker is properly installed, run docker version on bash. This should print the docker client and server engine.
After successfully tested and confirmed the installations, try entering your command
$ docker build -t heet1996/post:0.0.1 .
here we are talking about using Docker with PowerShell and not with WSL. And also following the addition of variables in the environment variables of Windows.
Configuration when this response was made:
Windows 10 Pro 20H2 (Build 19042.867)
Docker 20.10.5
Powershell 5.1.19041.610
I also had to configure docker in a dirty way too much, after several hours of research and a comparison of installation on a clean Windows 10 I understood where my error was.
In addition to the user environment variable also make sure that you do not have DOCKER variables in the Windows system environment variables either.
Here is where my error was, I think it was due to the installation of the Docker module
I had the DOCKER_HOST variable in my system variable environment, so i deleted it.
If you want to check all your environment variables with Powershell:
[System.Environment]::GetEnvironmentVariables()
If you really want a Docker fresh installation on Windows, you need to delete the following folders:
C:\ProgramData\Docker
C:\Program Files\Docker\Docker
$HOME\AppData\Local\Docker
$HOME\AppData\Roaming\Docker
$HOME\AppData\Roaming\Docker Desktop
$HOME\.docker
my error, therefore, produced this error:
ERROR ==> error during connect: Get http://docker.artofshell:2376/v1.24/version: dial tcp: lookup docker.artofshell: no such host
After a complete uninstall of all docker (Via chocolatey, official docker ...) and by properly installing Docker from the official executable here everything is back to normal
Then if you want to use docker via Powershell you have to change the configuration of DockerCLI as you can see on many answers
Conclusion
It is possible to use docker with Powershell you must check if the
server daemon is used by Windows/amd64, you can modify the daemon with this command cd "C:\Program Files\Docker\Docker"; .\DockerCli.exe -SwitchDeamon
You can check the configuration of the daemon with the following command: docker version
You must remove all traces of old Docker installations if you had any
You must delete the environment variables from the old installation or from the docker toolbox
You must also activate the experimental features: information here

Gatsbyjs Local HTTPS getting browser security errors

I'm trying to set up local https with gatsbyjs. I followed gatsby's instructions including setting up Certutil via brew install nss.
I then run, $ npm run develop -- --https.
When I open https://localhost:8000/ in Chrome I get ERR_SSL_PROTOCOL_ERROR and in Firefox I get Error code: SSL_ERROR_RX_RECORD_TOO_LONG.
Any help on this would be appreciated.

gCloud SDK failed to install in macOS behind corporate proxy

I am trying to install gcloud SDK while using a coporate network which works behind a proxy (and a VPN sometimes). I get proxy settings automatically using a pac.fcgi file (Automatic Proxy Configuration).
Now when I try to run ./install.sh in the terminal, I am constantly getting the following error
➜ google-cloud-sdk ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)?
ERROR: (gcloud.components.list) Failed to fetch component listing from server. Check your network settings and try again.
I found this SO question which was having the same issue, but their problem was related to ipv6. I already have ipv6 disabled (I can't even enable it) and I am using ethernet to connect to the network. Thus the answer is not useful to me.
I searched for proxy related info about installation and found this page. It asks for using a non-interactive installer instead and using gcloud command to set the proxy after installation. My problem is that I can't even install gcloud. I have tried with both interactive and non-interactive installers.
Any way I can install gcloud while being behind a corporate proxy.
PS: I am on macOS High Sierra and using zsh shell (already tried bash), in case it matters.
So, the problem was I was unable to set proxy before installation of gcloud. The installation of gcloud basically set the CLI in the path and installs some required components (core, bq, gsutil etc).
So what I did is I added the following lines in my .zshrc
source <PATH to gcloud sdk>/google-cloud-sdk/path.zsh.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.zsh.inc
or if you're using bash, add these lines in your .bashrc or .bash_profile
source <PATH to gcloud sdk>/google-cloud-sdk/path.bash.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.bash.inc
After that I restarted the terminal (or just run source ~/.zshrc or source ~/.bashrc or source ~/.bash_profile on terminal)
Now I was able to use gcloud commands. I ran gcloud init, set the proxy and then installed the required components using the following command -
gcloud components install core bq gsutil
And I installed gcloud without using the install.sh script.
PS: Run scutil --proxy to know the proxy settings set in your system.
For Windows 10 users who experience this issue. I installed the google SDK from the archived versions page. then used git bash to install using ./google-cloud-sdk/install.sh. then added in environment variable manually to PATH to use commands.

Docker and nodemcu-build. Excited but unable to run it

I tried to install docker image today to build my firmware for esp6288 with http server and it seems that I failed miserably.
Install docker toolbox.
Run "C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" aka "Docker Quickstart Terminal" shortcut
See:
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
Start interactive shell
Jaroslaw#lpatop MINGW64 ~
$
Run "C:\Program Files\Docker Toolbox\kitematic\Kitematic.exe" aka Kitematic (Alpha)
Search nodemcu-build by marcelstoer
Click Create...
After download, run.
See container logs:
fatal: Not a git repository (or any of the parent directories): .git
cp: cannot stat 'tools/esp-open-sdk.tar.gz': No such file or directory
Proceed according to https://hub.docker.com/r/marcelstoer/nodemcu-build/:
Open cmd:
Go to C:\Users\Jaroslaw (cmd already opens up in that dir)
Run git clone https://github.com/nodemcu/nodemcu-firmware.git
See, folder is there.
Go in to that folder.
Run:
docker run --rm -ti -v //c/Users/Jaroslaw/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
See output:
docker: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'docker run --help'.
Can you tell me what should I do to make this work? I'm very excited to start building my universal IoT unit for my home purposes with http server onboard.
The default NodeMCU firmware can be used to create an HTTP server. You don't need to build the firmware from source again to do that.
Download precompiled NodeMCU firmware from here. (Note that it's not the latest version! Latest no longer ships with precompiled binaries since there are lots of configurations to choose from. Once you get started, it is recommended to build the latest firmware as mentioned in bold below since this old version is reported to be buggy.)
Download ESPFlasher from here and flash the firmware onto the chip. (This is the only flasher that worked for mee).
Just flash the firmware onto the chip and download ESPlorer IDE. The IDE allows you to write Lua scripts onto the device, which can also be used to create an HTTP server.
See this page for an example of a web server emulated on ESP8266. This example works out of the box if you are using the precompiled firmware from (1). If you are building your own firmware from the latest source, it is recommended to use these scripts which are maintained.
Hope this helps.
To build your own firmware, simply do this:
If you ever feel like compiling your own firmware from the latest source, you can always head over to http://nodemcu-build.com and compile a custom firmware online, and get it emailed to you.

Git Bash on windows 7 behind proxy no longer working

I'm on a windows 7, 32 bit box, and working behind a proxy. I just upgraded my git client (Git Bash) to Git-1.8.3-preview20130601, and all of the sudden, I'm getting the following error whenever I try to push/pull:
fatal: unable to access 'https://github.com/User/simple_timesheets.git/:
Received HTTP code 407 from proxy after Connect
I was able to do this just fine before upgrading, and even when I tried to revert back to the last version that I think I had, I still get the error. When I run git config -l, it lists out the following variables (among others):
user.name=MyName
user.email=My#email.com
http.proxy=http://user:password#server:port
core.autocrlf=true
https.proxy=http://user:password#server:port
http.sslcainfo=/bin/curl-ca-bundle.crt
What's odd is that I seem to be able to use the Git Bash client to curl just fine
curl finance.yahoo.com --proxy http://user:password#server:port
and can even curl into a dummy https site I set up on my computer:
curl https://localhost:3000 --insecure
Any ideas what I'm missing? Thanks
EDIT:
I could be wrong, but I think there might be an issue with curl in version 1.8.3. I uninstalled all git related applications I could think of on my computer, and installed Git-1.8.0-preview20121022, ran a pull on a repo and was successful.
For giggles, I uninstalled the working version, and kept the cert file; then reinstalled version 1.8.3 to see if this didn't have anything to do with it, but I got the same error I was originally trying to resolve.
Also, after re-installing version 1.8.0, I tried to curl an https website (gmail), with the following command: curl https://www.gmail.com --proxy http://user:pass#server:port, which was successful. When I did this under 1.8.3, I got an error about code 407. The version switch seems like it solved this.
I had the same issue resolved it by using two proxy filters:
"--proxy or -x" and "--proxy-user".
curl -x http://proxyserverurl:port --proxy-user username:password -L http://url
Though what you have tried is also not wrong but might not be compatible with your curl version.
Hope this helps!
I had the same issue. Exporting the environment variables https_proxy and http_proxy resolved the issue. So I ended up adding the following lines to the .bashrc file in the home directory:
# Configure proxy settings
export https_proxy='http://myproxy.example.com:8086/'
export http_proxy='http://myproxy.example.com:8086/'

Resources