Other B4X Push Server

Shay

Well-Known Member
Licensed User
Longtime User
It is also works fine to me - I am using Amazon EC2 RHEL 7 server
(it is free for 1 year)
 

Shay

Well-Known Member
Licensed User
Longtime User
I will post the instructions this evening
I also created service from the b4x server and connected it to internal mysql server instead of the local db in the example
b.t.w I wish to create watchdog so once service has issue it will restart it, but I saw the logs are not created to log file only to "screen output".
it is writing only the http string to the log file (not what I put as log() )
 

Shay

Well-Known Member
Licensed User
Longtime User
I am now having same issue:
"Error connecting socket: (EOFException) java.io.EOFException: SSL peer shut down incorrectly"
it is trying to reconnect in loop and never manage to
 

Shay

Well-Known Member
Licensed User
Longtime User
Additional info:
As I see the port is in listening mode and if I send http to is, it seem to response, but it is writing the errors in loop.

restarting httpd service (apache) did not help
after many try I kill and start it again, it started to work again.
but after I updated the file, it started to show errors again

it is not related to my code
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
It is also works fine to me - I am using Amazon EC2 RHEL 7 server
(it is free for 1 year)

Thanks for this. I too am using Push and need to move it out into the cloud somewhere. This sounds like a perfect place to start.
 

Shay

Well-Known Member
Licensed User
Longtime User
I tried to reboot the server - did not help
I found 1 issue with my code - I don't know if it is related or not:
I found the timeout for retry (which you configured to 30 sec), is written on 2 places, and I changed it to 10 second on 1 place
So I compiled the code again, and now it is ok
 

Shay

Well-Known Member
Licensed User
Longtime User
Erel this is still happening, I cannot understand why
I changed 1 line, compiled it again, and once again it is not working
Can you please investigate this?
 

Shay

Well-Known Member
Licensed User
Longtime User
I stopped it yesterday from re-trying, and just started it again now
and it started ok (without doing anything - same jar from yesterday)
I think something when we kill it, is not clean, and it causes to fail every time till some OS timeout.
I will send logs next time it happen
this issue is not resolved...
 

Shay

Well-Known Member
Licensed User
Longtime User
I meant that I did not complied the code again from yesterday
I am connected via ssh to my server, so there is no network issue
but let's see next time it happen - let me know if you wish me to debug something
(if you explain what exactly you do there)
 

fishwolf

Well-Known Member
Licensed User
Longtime User
if i know well:
I have see that in B4A the push is received from a service (in background)
In B4I is received from a event, but work also if the app not running ?
 

fishwolf

Well-Known Member
Licensed User
Longtime User
I already have a native app that receive push.

i have use the http interface of push server b4j for register the device with the token (gcm_id) generare from native app
I have configure the AndroidApiKey

i have try to send message but receive this error.

Why?

B4X:
feb 19, 2015 9:19:56 PM org.apache.http.impl.client.DefaultHttpClient handleResponse
Avvertenza: Authentication error: Unable to respond to any of these challenges: {}
<HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
Error sending Android message: Unauthorized
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…