Using Nodejs on OS X Server - macos

The Problem
I have a mac mini that I'm using as my home server. I also have a domain name, which we'll call example.com. What I would like to know is, how do I enable remote access to a Node.js app (running on a mac mini using OS X Server) that is listening on port 8080? Ideally, I want blog.example.com to point to this running node app.
What I've Tried
Successfully pointed my domain name to my IP address. Therefore, I can access example.com from anywhere
Changed airport time capsule settings to allow access to port 8080 from within the Server.app
Started Node.js app, which is listening on port 8080. I can access localhost:8080, but not example.com:8080
Created an A record for blog.example.com, and verified that DNS has propagated.
So I think my problem might lie in getting OS X server and node.js to work well together, but I could also be missing a few other pieces to the puzzle. Hopefully you guys can help me out or point me to a tutorial that shows how to get this working. Thanks!

Related

Not able to enter Jenkins (Mac) using network IP

I'm trying to setup Jenkins on my MacMini server. I've installed it using official docs and everything works, except accessing Jenkins using local network ip. I
'm able to enter using localhost:8080, but not able to reach it from 192.168.1.X:8080 from other network device or even from the same mac server.
I've already tried instructions from this question
Accessing Jenkins on Mac OS X from another machine
but no effect.
It looks like Jenkins does not open to external connections or something. My browser finds Jenkins address, but it says "Not able to connect", just like if there is no such port (8080).
I've created a test http server, just to see if my Mac is reachable and ports are open, and everything works fine. Im able to enter an http, ssh, VNC using network address, but not able to enter Jenkins using it's port.
Does anybody knows why?

Viewing Docker Compose web app on server outside host machine (the host is OSX)

My computer is OSX. I'm logged into an ssh connection (Ubuntu), and from there I'm ssh'ed into an OpenStack instance of Ubuntu 14.04. From this OpenStack instance I've been following a Docker-Compose tutorial from the Docker docs : https://docs.docker.com/compose/gettingstarted/
I'm on Step 4, and I'm successfully running a server that is running on http://0.0.0.0:5000/
However, I don't know how to view a GUI Google Chrome browser from my Macbook. Because whenever I go to http://0.0.0.0:5000/ it says server not found, which makes sense because it's not on my computer.
I read something about port forwarding, but I'm not sure that's right here. I'm fairly new, so please help!
Also, is this the right way to use an OpenStack machine? That you use your computer's web browser to view the web app?
I solved it myself. Turns out on OpenStack, you need to create a security group and then add it to your instance. When you create a security group, you can add a port that you want to provide public access to. And then you can view the web app on any computer by typing in your floating IP on OpenStack, colon separated by the public port address.

Cannot access macOS Server from the other mac using wifi

This is how it is managed in macOS Server:
and then from the other mac I do:
but it doesn't work, cannot login to remote mac. Why?
User kuna exists on mac with macOS Server and is an admin.
If you want to access your server from inside the office, don’t use the public IP - use the server’s local IP (one of the ones starting 192.168....)
If you want to access your server from outside the office, you may have to configure your office router to forward the relevant traffic to your server. This process is called port forwarding.
I’d
find out the port numbers you need to forward on this page
Google <name of your router> setup port forwarding for how to enter them into your router - although with many routers, the process is pretty self-explanatory in the admin interface.

Stored Endpoint IP Address after Network Configure Changes in RMI

I've got a RMI server running on a mac. Once I changed the server IP and restart the Application and clients, then clients keep connect to the old ip address with right bind and lookup address. I really have no idea what went wrong because the program is working on another linux server just with different port.
What the remote object clients got is Proxy[MinervaInterface,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.0.104:51815](remote),objID:[40d99efb:140ba232cec:-7fff, 6333954213550330995]]]]]
which 192.168.0.104 is the old IP and it should be 10.0.1.104
I've check the host file and my code, there is no anything like 192.168.0.*
Please help, Thank you.
UPDATE
I have confirmed this is a server registry problem. But I have already restarted the server. I did't remember what else did I do to the registry. Is there any way to set it manually?
UPDATE
I rune this code on that server InetAddress.getLocalHost().getHostAddress(), it returned 192.168.0.104, that can explain where this address came from. But there is no such address on the server now
SOLVED
I found java use a hostname to lookup localhost address, that hostname is not localhost and have not been updated by OS X Server for some reason. I updated the record from OS X Server console and solved this annoying problem.
NEVER THOUGHT ABOUT THAT

Red5 Problem with connecting from remote client

So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. However, here is what I have done...
Inside My MXML Flex File I try to connect to the computers IP that the server is running on(My Server is running from within Eclipse). The line for connecting looks like this netConnection.connect(rtmp://192.168.2.12/myApp, true);
All that happens is after a lot of minutes go by, I just get NetConnection.Connect.Failed and there is no log being output by Eclipse. Almost like it never even registers the connection that the remote client is trying to make.
The other interesting thing is that I am ABLE to connect to my Red5 Server using a different computer within my local home network just fine. But only when it is remote I am unable to connect.
I have changed my Red5-web.properties file and added this...
webapp.contextPath=/myApp
webapp.virtualHosts=*, 127.0.0.1, localhost, 192.168.2.14, 174.122.104.3
The 174 one is my website where the Flex Swf Resides on.
I think maybe somehow my computer is not setup or configured to allow these remote connections and is rejecting them or something, I'm not quite sure why a remote client can't connect. Does anyone have any idas?
Your help is greatly appreciated.
You may uninstall the red5 and reinstall it.
When it ask you the server ip address type your server's LAN adress (192.168.2.* or 10.0.0.* whatever). This solved my problem.
In my opinion, if you have at least one domain name that you own, the best way for you to go is to set up an Apache Http Server to your server machine, and create subdomains for both red5, rtmp and rtmpt. Make the Apache handle your incoming requests, and decide their correct routing there.
In case you don't own a domain, or the previous way is too time-taking to set up and get it work, you should just make sure that the ip address you're trying to connect to is not an internal IP.
In your example above you are trying to connect from the client to a 192.168... address. If you try to connect to it from within your LAN, it works, since that ip there is registered to your machine.
But when you take your notebook to your neighbor, and using his internet connection to access your site and connect to red5, the client (flex application) will also try to connect to that 192.168..., and your neighbor's router has no idea about your LAN, probably it doesn't have such an internal IP address either, but SURELY cannot connect to your server.
So instead of using 192.168... in your connection string, you should try using your external IP address (the 174... one):
netConnection.connect("rtmp://174.122.104.3/myApp", true);
This will work always, as far as you have a static IP address.
Also make sure, that your red5 server is accessible over the 80 port, or if it's not, specify the correct port number there.
For that you can do following thing...
These steps I took and it's solved my problem...
1.During the installation, you must have given ip 127.0.0.1 (localhost) and port :5080
2.firstly open the port (5080 and 1935) on firewall.
Visit http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7
3.Now to go red5->conf->red5.properties and open this file in notepad++. (or any other editor)
4.repalce http.host and rtmp.host ip with your ip address (ipv4)
5.start the red5 service.
6.Now check http://yourip:5080
It will start working, and you can access it from other system also (in the same network Obviously )

Resources