Stored Endpoint IP Address after Network Configure Changes in RMI - macos

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

Related

SonarQube on windows - can only view locally

I have a windows server 2016 machine which I have Jenkins running on. I wanted to install SonarQube. So have downloaded v7.1
I have managed to start sonarqube on the machine and can view the webserver at http://localhost:9000
I tried to view the page on a different machine using the IP address and port 9000, but this doesn't connect. Looking in the sonar.properties file I can see
Binding IP address. For servers with more than one IP address, this property specifies which
address will be used for listening on the specified ports.
By default, ports will be used on all IP addresses associated with the server. sonar.web.host=http://xx.xxx.xxxx.xxx
If I use http:// then sonarqube starts, but I can't see sonarqube from any other machine, if I don't use http:// (so just the ip) then it won't start with a bind error.
Has anyone experience of setting this up on windows?
Turns out it was something a lot simpler, the machine is being run on azure and there was no port 9000 endpoint

Putty error : Unable to open connection to hostname : Host does not exist

I am using Putty to ssh into some of the servers that I work on. I am able to connect all others except the one. Although I was able to connect to it before. Whenever I try connecting to it, it always give me error:
Unable to open connection on myhost: Host does not exist
My firewall is off and I have even re-installed putty but that did not fix it. When I tried connecting to the same server using putty on some other windows system, I was able to do so. I searched regarding this on Internet but did not find much relevant.
I am running putty on Windows 7.
What can be the possible issue?
As I understand you have three computers involved. At the same time one connection is working and the other one fails. So we can exclude that the ssh daemon on your linux box is hanging.
In lack of knowing their real names I will call your computers linuxbox (this is the computer you want to ssh into), win7ok (that is the computer that you are able to ssh from using putty) and win7fail (that obviously is the computer you can't connect from).
Please do a tracert from both Win7 computers:
tracert linuxbox.your.domain
tracert linuxbox
Add the results to your question as it will help us find out what is happening.
Perhaps it is also a good idea to determine the ip address of the linuxbox from win7ok:
ping linuxbox
or
nslookup linuxbox
Then try to connect from win7fail by using the ip address of the target computer, perhaps it is only a DNS problem (which might be as nmap is failing too).
To make all of this easier to understand for us please provide the real names of the computers as you use them in putty.
For me the problem was with the Url of the reposity. Check remote URL. It must start with git#github.com, not https://.
I used nslookup and then used the ip address it gave me to connect and it worked
I had a similar problem with GitExtensions. The solution was to remove the https url and replace it with git#gitlab....
WRONG:
GOOD:
I just went through this. I have a Cisco VPN I need to use to get through to the Linux machine I wanted to login to and check.
No Putty session would get through using the machines name.
An nslookup on the windows machine yielded the correct address.
I too connected right in via the ip address.
I tried to Google the error and it failed, so I suspected the wireless.
Disconnected and reconnected my WiFi and all was good.
I did it fast enough that open connections stayed open.
And new connections refering to DNS names worked fine.
Seems like maybe some cached DNS addresses were stale.
Your DNS cache stores the locations (IP addresses) of web servers that contain web pages which you have recently viewed. If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site.
Following CLI command will do the trick:
ipconfig /flushdns

What is the oracle database 12c IP Address

I just Installed Oracle Database 12c. At the end of the installation it gave me Information about my connection. SID, IP, etc. I restarted the computer run all these services (some of them already running):
OracleJobSchedulerORCL
OracleOraDB12Home1MTSRecoveryService
OracleOraDB12Home1TNSListener
OracleRemExecServiceV2
OracleServiceORCL
OracleVssWriterORCL
But I think I forgot the IP and port of my database since I tried to access the database using a webbrowser and it doesn't work (I tried https://10.10.10.10:5500/em). I don't know If the problem is really the IP:Port that I may have forgotten or if I forgot to run service. I am pretty sure the IP address look like https://10.10.x.x:xxxx/em but I don't I am not certain. Is there a way to recover the IP address and port of the database?
EDIT: I've installed it on Windows 8 x64 JP. with
In Environment Variable
with ORACLE_HOSTNAME = 10.10.10.10
ORACLE_UNQNAME = orcl
And in the host file (in System32/Drivers/etc/)
127.0.0.1 localhost
10.10.10.10 wopr.orcl wopr
Per documentation, format for accessing enterprise manager in your browser
http://hostname:portnumber/em
Once you sure that default port number is kept as default HTTP port number is 5500 then you can get your system hostname. Port numbers are recorded in $ORACLE_HOME/install/portlist.ini file.
If running windows then just run the command hostname which will give you the hostname of your machine. Then run like
http://My_hostname:5500/em
Or use the command ipconfig to see your IPV4 address and use that address
http://X.X.X.X:5500/em
Or you as well use localhost
http://localhost:5500/em
or 127.0.0.1 (loop back address) like
http://127.0.0.1:5500/em
See here for more information
Well, if you installed it on your local machine, you can always access it using localhost, so try https://localhost:5500/em.
The default port number for Enterprise Manager is indeed 5500.

Why are some networking APIs able to accept remote connections and others are not?

I'm at a loss to explain this behavior with web servers on windows. It's in a domain environment with windows firewall set as domain policy.
local web servers - both as localhost:port and FQDM:port
Tomcat OK
IIS OK
WEBrick OK
Jenkin's server - OK
remote access - using FQDM:port
Tomcat No connection
IIS No connection
WEBrick OK
Jenkin's server - OK
What I don't understand what WEBRick and the server Jenkins uses to accept remote connections.
Are there other diagnostics I should look into?
Is it possible to configure Tomcat to use a similar approach?
I can't tell much about WEBRick or Jenkins, but for Tomcat - if you look at Tomcat 7 source (StandardServer.java), you'll see:
// Set up a server socket to wait on
try {
awaitSocket = new ServerSocket(port, 1,
InetAddress.getByName(address));
} catch (IOException e) { ... }
This means, whatever you specify in address (in your server.xml), goes through this.
The contract of InetAddress.getByName says:
The host name can either be a machine name, such as "java.sun.com", or
a textual representation of its IP address. If a literal IP address is
supplied, only the validity of the address format is checked.
If I was you, I'd try setting just the IP address first and see if there are any problems.
The second step is to check whether you have got local name resolution policy incorrect (hosts file). I've been in situations where local hosts file was incorrect or contained non-resolvable entries, causing all sorts of weird issues like the one you're having.
It sounds like your remote request are never reaching the services that don't reply. And that implies it's a firewall or NAT issue. I don't think it's a configuration issue since you said from the local machine localhost:port and FQDN:port both work.
To diagnose, a good first step is to see if there is any communication remotely with telnet.
telnet hostname port
If you don't see a Connected to FQDN. response, then a firewall, hardware or the local software firewall, blocked the connection. You will need to make sure the firewalls in the way have all the proper ports open, forwarding, etc.

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