It's all about the answers!

Ask a question

Cannot connect to localhost from another machine


An Nguyen Truong (6112) | asked Sep 11 '13, 4:38 a.m.
retagged Sep 16 '13, 9:43 a.m. by Ralph Earle (25739)
i create a repository connection (URI: https://localhost:9443/ccm/; Name: localhost) with ID and password  is OK when  i use my computer. But i don`t create a repository connection on other computer (installed jazz team sever and  RTC client) with that ID and password. help me!

Accepted answer


permanent link
Dr. Hans-Joachim Pross (1.1k4458) | answered Sep 11 '13, 4:55 a.m.
JAZZ DEVELOPER
localhost as URI does work only for your local host.

To colaborate with others, the Jazz Team Servers URI needs to be the fully qualified hostname.
Look here for more details.
Avoid using host names that cannot be resolved with a DNS: Avoid host names such as "localhost" or an IP address.

Determine your host name: Choose a host name that is unlikely to change and that can be resolved through a DNS within your network.

Ensure that the host name is fully qualified.
An Nguyen Truong selected this answer as the correct answer

Comments
An Nguyen Truong commented Sep 11 '13, 9:26 a.m. | edited Sep 11 '13, 10:30 a.m.

what do i must do? when i want to create a repository connection on other computer with URI: https://localhost:9443/ccm/; Name: localhost and my ID, password. Because i want to connect my project when i use other computer. i want to see collaboration of RTC.

One other answer



permanent link
Karl Weinert (2.0k52736) | answered Sep 11 '13, 9:47 a.m.
JAZZ DEVELOPER
An,

If this is just for testing you need to use at least a host name in the URI to access it from other servers.
https://myhost:9443...
If that host can't be found via dns you can add that host and IP address to the hosts file of any client that wants to access that server. You should also add it to the server's hosts file as well.
Hosts file example:
9.44.23.24       myhost
Where "myhost"  it what you used in the  the RTC public URI

I have seen some people test using the IP address: https://9.44.23.24:9443/jts
but if your server uses DHCP that will be a problem if the IP address changes at some point.

If you have already set up using localhost the easiest fix would be to reinstall with a proper host name.
When performing the setup yous should also access the server using the hostname that will be used in the URL

Comments
An Nguyen Truong commented Sep 11 '13, 10:25 a.m. | edited Sep 11 '13, 10:31 a.m.

i want to connect my project when i use other computer.
i create this project on my computer when i create a repository connection ( as URI: https://localhost:9443/ccm/; Name: localhost).
what do you must do?
With my ID and passwork, i log in jazz team sever (https://localhost:9443/jts/setup) on my computer. i do not log in jazz team sever (https://localhost:9443/jts/setup) on other computer.


Bo Chulindra commented Sep 11 '13, 10:43 a.m.
JAZZ DEVELOPER

@hoangphihong106: I would suggest that you learn more about your hosts file, host names, and aliases. It will help explain why you're seeing what you're seeing and it will help you figure out a solution.

Otherwise if you want a quick workaround, here are my suggestions. However, these suggestions are not good ones and will cause problems if your server is used by anyone other than you.

  • Find out what your IP address is for the computer that you have the server installed on. You can use this IP address to contact your computer from another one. For example, if your IP address is 9.44.23.24, then you will use https://9.44.23.24:9443/jts/setup from other computers.
  • When you configure your public URI, you should not use your IP address since this will cause problems (for example, if your IP address changes).
  • If your server's computer's IP address changes, you will have to use the new IP address to contact that server. You can work around this by making your IP static.


An Nguyen Truong commented Sep 11 '13, 11:14 a.m.

thank you


An Nguyen Truong commented Sep 24 '13, 3:36 a.m.

how is my IP address find? now is my computer server for other computers connect ?
what do I must do to other computer connect with my project ?


Karl Weinert commented Sep 24 '13, 7:37 a.m. | edited Sep 25 '13, 10:25 a.m.
JAZZ DEVELOPER
how is my IP address find? now is my computer server for other computers connect? what do I must do to other computer connect with my project ?


You will need to add the RTC public url hostname to the hosts file on every client you want to access RTC from.
WARNING:
If you are using DHCP your IP address is likely to change so you would need to do this for each client every time your IP address changes.
So this is not a good solution to use in a production environment.

Find your computer's IP address with ipconfig
Be sure to choose the current Ethernet adapter in use.


C:\>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . : domain.ibm.com
   Link-local IPv6 Address . . . . . : fe80::1478:1a45:a189:cc04%15
   IPv4 Address. . . . . . . . . . . : 9.32.23.241
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 9.32.23.1

   Ethernet adapter VirtualBox Host-Only Network:
.....

On each host that needs to connect to your computer:
Run notepad as administrator
Right click the notepad shortcut and select run as administrator
You need to do this so you can edit the hosts file

Choose file -> open
On the bottom right corner of the "open" Dialog change "Text Document (.txt)" to "All Files (.*)"
Browse to C:\Windows\System32\drivers\etc\
Select hosts from that folder

Add your host name as it appears in the RTC public URI
Example
URI: https://myhost.domain.ibm.com:9444/jts

The hots file would look something like this:

localhost name resolution is handled within DNS itself.


    127.0.0.1       localhost

    ::1             localhost


9.32.23.241        myhost.domain.ibm.com

Now you should be able to access RTC on your computer from the client you configured with these settings.


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.