Android Question Error 500 jRDC2

Cleidson

Member
Hello everybody,
For the last 3 days, I have been studying how to implement a homemade VPS to test connections to a MySql database via jRDC. After many attempts with jRDC, it worked in one of my tests. However, the test was not on the database that I intended to use, as I was still learning how to make requests on the client side.
So, I assembled the code on the client side, in the real application that I will use, with all the parameters, connection link with the same information as in the previous test.
In the config I changed the database name, username and password. I generated a new JRDC, replaced it on the VPS server and ran nohup again and to my surprise, it stopped working. In all the requests I make the response is error 500. TimeOut.
I checked the IP address and it remains the same.
I checked the credentials information and it is correct.
I checked port 17178 and it is open.
I checked the log after the jRDC server was started by nohup and it said it had started.
Another piece of information, perhaps not relevant, is that the VPS network works in bridge mode with my local network.
Based on the above, there is another configuration that must be carried out, as I only changed access information to the database.
 

aeric

Expert
Licensed User
Longtime User
Hello everybody,
For the last 3 days, I have been studying how to implement a homemade VPS to test connections to a MySql database via jRDC. After many attempts with jRDC, it worked in one of my tests. However, the test was not on the database that I intended to use, as I was still learning how to make requests on the client side.
So, I assembled the code on the client side, in the real application that I will use, with all the parameters, connection link with the same information as in the previous test.
In the config I changed the database name, username and password. I generated a new JRDC, replaced it on the VPS server and ran nohup again and to my surprise, it stopped working. In all the requests I make the response is error 500. TimeOut.
I checked the IP address and it remains the same.
I checked the credentials information and it is correct.
I checked port 17178 and it is open.
I checked the log after the jRDC server was started by nohup and it said it had started.
Another piece of information, perhaps not relevant, is that the VPS network works in bridge mode with my local network.
Based on the above, there is another configuration that must be carried out, as I only changed access information to the database.
Can you post the error message?

Double check if you enter the correct database user and password.

One possible tricky mistake is you have a space at the end of line after your User or Password in config.properties which you didn't realize causing the database connection failed.
 
Upvote 0

Cleidson

Member
Hey guys,
After a few more rounds of studies and testing, it finally worked.
I'll leave a script of what I did, in case it's useful to other developers:
I installed Notepad++ to more accurately view the configuration parameters. So I was able to check Aeric's suggestions and there were no spaces after username and password.
As for the test suggested by Erel, the JRDC server was functional on the server side.
Then I remembered that as it was a VPS installed in a virtual machine, I had only enabled one adapter in bridge mode for my local network connection. I don't know if it's related, but the virtual machine listed 4 network adapters. I enabled all of them for bridge mode.
Even so, the connection to the database did not occur. I went to look at the database and there was information that there was a user account that allowed any device to access the database and that no two users could have the same configuration. As in my case I had created a user account with this parameter, I deleted the default MySql account and kept mine with the configured privileges.
After that, the application started to connect with the database, but, to my despair and distress, it returned an error in the SQL syntax.
After making a series of comparisons between numerous syntaxes that I saw, the example that worked for me uses ` ` as markings in the clauses and for autoincrement fields I used NULL as a parameter in the INSERT INTO.
After that, both the query and the insertion worked, but as it was late at night and I was very tired, I didn't perform many tests. I'll do it over the course of the week.
I would like to thank all of you for your help.
 
Upvote 0

Cleidson

Member
Hey guys,
I'll take advantage of the topic to ask for information, if possible. I started the VPS server and to my surprise jRDC did not start. I used nohup, via terminal, to check if the server started. Unsuccessfully. The only way that worked was to delete the file, copy a new one and start over. Is there any configuration to start jRDC with Ubuntu VPS?
Thanks in advance.
 
Upvote 0
Top