How to run monitor-dashboard in Cloud9? - cloud9-ide

I install monitor-dashboard ( https://github.com/lorenwest/monitor-dashboard ) by npm in my Cloud9's workspace and followed the steps to configure by external mode.
When I run the process, there are no errors, but in the URL with the port that says where I can find the dashboard, that doesn't work.
Any ideas?

Looks like monitor-dashboard runs on 4200 by default and doesn't give an easy way to change that port. Cloud9 exposes ports 8080, 8081, and 8082 so replace these occurrences of 4200 with 8081, run it again, then go to https://yourworkspace-preview.url:8081 and you should be good.

Related

Is it possible in vscode liveshare to share port 443 (https)?

I'm trying to share the port 443 from my development machine (win10) to my laptop (os x) using the amazing Live Share feature of Visual Studio Code.
On the dev machine I can access the service (running behind an nginx reverse proxy), so server is running fine.
VS Code doc mention a 1:1 mapping for the port "unless it's already in use".
Checking with sudo lsof -P -i TCP -s TCP:LISTEN on the mac, I can confirm 443 is not in use.
But the port on the mac is mapped to a random port (50150 in this case) instead of 443.
I guess I'm lacking some rights to open a sub 1000 port on os x.
Does anyone know what I can do (I mean other then running vscode as root)
Thanks
Short answer (for anyone who would find this later) : not possible!
Restricted ports are ... restricted.
And as I said in the question i don't want to run vscode as root.
But what I ok to run as root is a small utility to do port forwarding.
So I'm now using portforward (npm -> https://www.npmjs.com/package/portforward ) to do just that, and everything works fine.

Running go webserver on Cloud9 IDE

im kinda confused on how to run a go lang webserver on Cloud9IDE.. This is my simple go server i am attempting to run:
https://ide.c9.io/amanuel2/golangpractice
I tried to click run then went to the url it wants me to go but it told me 404 not found... And i also saw this is the output in the command line when i click run on cloud9:
Your code is running at https://golangpractice-amanuel2.c9users.io.
Important: use os.Getenv(PORT) as the port and os.Getenv(IP) as the host in your scripts!
2016/03/14 11:45:51 Listening on port 8080 ...
Please help!
The 404 you're seeing is from line 142 of webserver.go so your app actually is running properly. From your code, it looks like you have a route for /item/name so try going to https://golangpractice-amanuel2.c9users.io/item/name and you'll get something there.
All other routes are giving 404's because of line 142.

Port 80 to 8080

First time I installed the package xampp I had many problems (like everyone who tries to use this programs and tries to create a website!)
I had made some researches on the web to find the solution to make Apache work: I setted the usual port 80 to 8080.
Now everytime I want to access to control panel of xampp or access to the DBMS MySQL I have always to add to the url ":8080" after "localhost".
My first question is: is it possible not to write ":8080" after the "localhost", maybe changing some settings I don't know where or in what file? (ex: "localhost:8080/xampp/" => "localhost/xampp")
Another thing: what could be the problems if apache is listening on the port 8080 instead of the usual one? (I don't have many experience in this field...)
Thank you in advance!
The only way to not write :8080 in the address bar is to make it work with the default port, which is :80. If the server does not want to start on that port it's probably because another program is already using it.
netstat -a -n -o | findstr ":80 "
With this command you can see which program is using your 80 port.

How to control where Meteor runs

I'm installing Meteor (framework) on my AWS EC2 (micro) instance and followed the instructions and after creating a test project I ran meteor on that directory giving me the expected
[[[[[ /var/www/html/meteortest ]]]]]
Running on: http://localhost:3000/
But I can't navigate to my server's localhost in my browser to see the hello world example project. Is there a way I can make meteor work on something like :
http://mydomain.com/meteortest/
or
http://mydomain.com/meteortest:3000
The way that Meteor sets the ROOT URL is by using an environment variable called ROOT_URL:
http://docs.meteor.com/#meteor_absoluteurl
So you could run your Meteor instance like so: ROOT_URL="http://mydomain.com/" meteor --port 80
However, if you want to have the meteor instance served from a folder (like http://mydomain.com/meteortest), you will have to use nginx to forward ports (see Tyr's example) but replace the line:
location / {
with:
location /meteortest {
and change your ROOT_URL appropriately. If you still can't access your domain from outside, you may have not set your security groups properly for EC2. You have to open up port 80. More information on how to do this can be here: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-network-security.html
You can setup nginx to proxy port 3000 to your domain. Something like:
server {
listen 80;
server_name meteortest.mydomain.com;
access_log /var/log/nginx/meteortest.access.log;
error_log /var/log/nginx/tmeteortest.error.log;
location / {
proxy_pass http://localhost:3000;
include /etc/nginx/proxy_params;
}
}
Please see http://wiki.nginx.org/HttpProxyModule for more information.
However, running meteor on port 3000 is a development environment. If you want to use it in production, please run "meteor bundle", and then follow the README inside the generated tarball.
I think the problem is that port 3000 is likely blocked by amazon's firewall. You could look at opening it up, try Tyr's solution, or try just running meteor with
meteor --port 80
You may need root permissions (i.e. sudo) to do this.
Running directly on port 80 would require root privileges, which you don't really want your web server to run as -- starting it as root and deescalating to a regular user is possible, but not really ideal as well, as you may find that a programming bug at some time forgets to deescalate privs and you will not see any errors from that.
In many cases, I don't really want/need to run a load balancer to use multiple core, especially if I'm runnning on AWS single core t1 or t2 instance types, which I just scale out as I need them -- hence the best advice I have seen is to simply use the Linux kernels ability to do port forwarding, mapping port 80 to port 3000, like this
$ sudo iptables -A PREROUTING -t nat -i eth0 -p tcp \
--dport 80 -j REDIRECT --to-port 3000
Nice and easy and nothing else to do -- and super efficient at the same time as no extra processes are involved in serving the requests.

iSQLPlus not starting on Port 80

I am trying to change the port for iSQLPlus on my Oracle DB server, by making changes in the file http-web-site.xml.
When I change the port to 80, in this file, the iSqlPlus doesn't start. I can nether connect over a browser or telnet to it, even from the host machine itself. On the command line, however, it does not give any errors.
I have tried changing it to other ports that is 8080 and 5560, it is running fine with no problems there.
I am using Oracle 10.2.0_10.
If on Unix you need to be root to run a service with port under 1024
For a more complete answer see https://serverfault.com/questions/38461/is-there-still-a-reason-why-binding-to-port-1024-is-only-authorized-for-root-on

Resources