14 Replies - 3568 Views - Last Post: 14 March 2014 - 10:17 AM

#1 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Java Hosting

Posted 13 March 2014 - 02:25 PM

I've created a small java instant messaging app.
Which includes a client class and a server class.
I'm using a "Server IP" and "Port" as an argument to connect the client with server to start chatting.
The problem is that Every thing works fine on local host and same network but i want my app to run over internet which isn't working right.

I've Googled a lot about it and found out that i am facing "NAT (Network address translation)" Issue.
Further more i have tried to host my server.jar file online on a free web hosting site i.e 000Webhost.com I passed my web address i.e "xxxxxx.webuda.com" and 3306 as the port number as argument and tried to connect to the server, what i got was:
You are connected!
But After a while --> connection closed!
Which i think that 000webhost.com do not allow remote access.
What should i do to make it accessable from any where over internet.

I know the post is a bit long please Read it and reply :rolleyes:/>
Need Help!

Is This A Good Question/Topic? 0
  • +

Replies To: Java Hosting

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 13 March 2014 - 02:33 PM

The first is - don't host it on a free site. Those, being free and all, tend to lock down what you can do.

Look at places setup to host java apps.

https://www.cloudbees.com/
https://www.openshift.com/
https://www.heroku.com/
Was This Post Helpful? 0
  • +
  • -

#3 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Re: Java Hosting

Posted 13 March 2014 - 02:40 PM

View Postmodi123_1, on 13 March 2014 - 09:33 PM, said:

Those, being free and all, tend to lock down what you can do.


Please Explain!
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 13 March 2014 - 02:45 PM

Explain what? Free hosting doesn't mean there are not folks manning the gate. They want to give someone the barest minimum of functionality and then persuade them to upgrade for less restrictions and more benefits. It's pretty straight forward.

You would have to find a place to host your app, and run it in some capacity.. like those sites I lnked.
Was This Post Helpful? 0
  • +
  • -

#5 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Re: Java Hosting

Posted 13 March 2014 - 02:49 PM

Dear i have zero experience with web hosting.
Will these websites take me to what i want? i.e i want my server side to be on web and clients to connect that server.

Note: I've created a java swing application.
Can i deploy the same code on these websites?
I'm confused. I'm pretty much noob on this.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 13 March 2014 - 03:00 PM

Think about it - your java code/compile is not active unless it is being ran, right? So you need to find places to compile/run your code on. A generic webpage hosting company like 000host is not that friendly. I would suggest looking at the links I gave you.. I mean - it's not like I am just dolling those out as some sort of red herring answer.
Was This Post Helpful? 0
  • +
  • -

#7 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Re: Java Hosting

Posted 13 March 2014 - 03:04 PM

Okay now i got it.
I've created an account and starting understanding 'cloudBee' but honestly i have no idea right now what to do with it.
I'm trying to figure it out.
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 13 March 2014 - 04:31 PM

Good luck!
Was This Post Helpful? 0
  • +
  • -

#9 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2720
  • View blog
  • Posts: 11,438
  • Joined: 20-September 08

Re: Java Hosting

Posted 14 March 2014 - 05:53 AM

Quote

Further more i have tried to host my server.jar file online on a free web hosting site i.e 000Webhost.com I passed my web address i.e "xxxxxx.webuda.com" and 3306 as the port

They don't mention Java hosting (paid or not) but they DO mention MySql. Unluckily for you, the MySql server port is 3306 ;)

Where is your server jar - are we able to look at it?
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5309
  • View blog
  • Posts: 27,210
  • Joined: 10-May 07

Re: Java Hosting

Posted 14 March 2014 - 06:04 AM

Since this topic isn't about Java Coding, this should be more appropriate under Webservers & Hosting

View PostincredibleX, on 13 March 2014 - 05:40 PM, said:

View Postmodi123_1, on 13 March 2014 - 09:33 PM, said:

Those, being free and all, tend to lock down what you can do.


Please Explain!

Free hosting = panels. To do Java based hosting you need access to the shell of the server for configurations of system level services. Free hosting doesn't offer these, as malicious users would get hundreds & hundreds of free accounts & pump & dump.

You are going to need a host that offers Java specific services, or host it yourself.
Was This Post Helpful? 0
  • +
  • -

#11 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Re: Java Hosting

Posted 14 March 2014 - 06:45 AM

All i want is to make my server assessable to any one over internet who has my client.
I just google and found out that giving my server the ip and port of an online webpage of mine will resolve this issue.
But In my case 000webhost is not doing above mentioned things for me.
So i decided to post it here so that i may get suggestions what else i can do to make my sever assessable to all the clients over Internet.
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 14 March 2014 - 06:48 AM

Yes.. and those three host links provide java specific services.
Was This Post Helpful? 0
  • +
  • -

#13 incredibleX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 01-November 13

Re: Java Hosting

Posted 14 March 2014 - 06:57 AM

View Postmodi123_1, on 14 March 2014 - 01:48 PM, said:

Yes.. and those three host links provide java specific services.


I've started working on heroku.com but i'm unable to instal its plugin on my eclipse juno.
It gives the following error:

"Cannot complete the install because one or more required items could not be found.
Software being installed: Heroku Eclipse Plugin 1.0.2.201309271210 (com.heroku.eclipse.feature.feature.group 1.0.2.201309271210)"

Was This Post Helpful? 0
  • +
  • -

#14 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,573
  • Joined: 12-June 08

Re: Java Hosting

Posted 14 March 2014 - 07:02 AM

Yes.. and searching "Cannot complete the install because one or more required items could not be found. Software being installed: Heroku Eclipse Plugin" pulls up a ton of suggestions..

example:
https://stackoverflo...-eclipse-plugin
Was This Post Helpful? 0
  • +
  • -

#15 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 385
  • View blog
  • Posts: 1,401
  • Joined: 15-January 14

Re: Java Hosting

Posted 14 March 2014 - 10:17 AM

It was already mentioned by g00se, but just to re-iterate, you should not have your server listening for connections on port 3306. That is the MySQL port. On some servers you'll have a conflict with MySQL and your server won't even start. In other situations, the server might be outright blocking inbound connections on port 3306 for the sake of MySQL security. It's a terrible idea to have your server use a port that is already used by something popular, or likely to be blocked. There are 65535 ports you can choose from, use something other than the one that MySQL is already using.

The reason why you saw the messages about the connection succeeding, and then being closed, is because you connected to MySQL and then MySQL dropped the connection when it figured out you were not a MySQL client.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1