Backendless standalone / SSL / Upgrading / Misc

Hi Guys,

Great to see the standalone version of backendless 3.0 is up for downloading. I downloaded and installed the linux 64 bit version on an ubuntu 14.04 vm.

I got a couple of questions about it:

  1. Reading the quick start guide (the linux one shows the os x installation btw) it refers to backendless.hostURL = @“http://[IP ADDRESS]:8080/api” as endpoint. Is there also an encrypted (SSL) port number available? What parts of the backendless communication is encrypted and what is not?

EDIT: Found the wiki via the included readme.txt. I can use the api via ssl port 443, however now I’m getting an SSL error: 'FAULT = ‘-1200’ [NSURLErrorDomain] <An SSL error has occurred and a secure connection to the server cannot be made.> ’ This is probably caused by the self signed certificate that is included by default. Is there any way to accept untrusted certificates?

  1. After installing the standalone version I can login (via SSL) to the backend, but clicking ‘flight control’ gives me the error ‘Get List of Components Failed!’.

  2. Also after installation there is nothing listening on port 8080 (netstat -an | grep -i TCP | grep 8080 shows nothing)

EDIT: Solved, see the edit of question 1

  1. How do upgrades work? When there is a new 3.x release, is there a way to upgrade the installation?

EDIT: This is partly mentioned in the manual. It comes down to installing the new version and migrating all data. Is this true even for small updates (bug fixes)?

Thanks a lot!

One more thing: I did an export of all data from the backendless hosted environment and imported it on the standalone version. Works great, but one minor problem: I had set one relation to autoload, this wasn’t enabled anymore after the import. Had to enable it manually.

Another problem: Some time after starting backendless (less then 30 minutes) I start getting FAULT = ‘502’ [HttpEngine: INVALID statusCode 502] <HttpEngine: INVALID statusCode 502> and FAULT = ‘-1001’ [NSURLErrorDomain] <The request timed out.> in my application.

When i then try to refresh the backendless web interface it won’t load it’s content anymore, see attached screenshot. (EDIT: Everything loads except ‘Users’ and ‘Data’, that is where I get the infinite ‘Loading’ popup)

It can be resolved by restarting all backendless services. (But the same problem will happen again)

Apache logs:

[Tue Jan 12 11:39:24.114075 2016] [proxy_http:error] [pid 9490] (70007)The timeout specified has expired: [client 192.168.51.48:64612] AH01102: error reading status line from remote server 127.0.0.1:9000
[Tue Jan 12 11:39:24.114120 2016] [proxy:error] [pid 9490] [client 192.168.51.48:64612] AH00898: Error reading from remote server returned by /api/v1/binary
[Tue Jan 12 11:44:59.243389 2016] [proxy_http:error] [pid 9514] (70007)The timeout specified has expired: [client 192.168.51.48:64647] AH01102: error reading status line from remote server 127.0.0.1:9000, referer: https://xxx.xx/
[Tue Jan 12 11:44:59.243422 2016] [proxy:error] [pid 9514] [client 192.168.51.48:64647] AH00898: Error reading from remote server returned by /console/appversion/E662B81D-44AF-0ED0-FFFF-F5532C68B400/data/BLProjectObject, referer: https://xxx.xx/
[Tue Jan 12 11:45:35.853157 2016] [proxy_http:error] [pid 9430] (70007)The timeout specified has expired: [client 192.168.51.48:64660] AH01102: error reading status line from remote server 127.0.0.1:9000, referer: https://xxx.xx/
[Tue Jan 12 11:45:35.853214 2016] [proxy:error] [pid 9430] [client 192.168.51.48:64660] AH00898: Error reading from remote server returned by /console/appversion/E662B81D-44AF-0ED0-FFFF-F5532C68B400/data/tables, referer: https://xxx.xx/
[Tue Jan 12 11:47:18.485816 2016] [proxy_http:error] [pid 9431] (70007)The timeout specified has expired: [client 192.168.51.48:64715] AH01102: error reading status line from remote server 127.0.0.1:9000, referer: https://xxx.xx/
[Tue Jan 12 11:47:18.485892 2016] [proxy:error] [pid 9431] [client 192.168.51.48:64715] AH00898: Error reading from remote server returned by /console/appversion/E662B81D-44AF-0ED0-FFFF-F5532C68B400/data/tables, referer: https://xxx.xx/

Does the problem start if Backendless just sits idle? Or you’re doing something with it? If the latter, then what are the steps to reproduce?

Please see my answers below:

  1. Reading the quick start guide (the linux one shows the os x installation btw) it refers to backendless.hostURL = @“http://[IP ADDRESS]:8080/api” as endpoint. Is there also an encrypted (SSL) port number available? What parts of the backendless communication is encrypted and what is not?
    Since the product runs on your server, it would be your responsibility to get an SSL certificate for the installation.

EDIT: Found the wiki via the included readme.txt. I can use the api via ssl port 443, however now I’m getting an SSL error: 'FAULT = ‘-1200’ [NSURLErrorDomain] <An SSL error has occurred and a secure connection to the server cannot be made.> ’ This is probably caused by the self signed certificate that is included by default. Is there any way to accept untrusted certificates?
There is an apache server which should be configured with your own cert.

  1. After installing the standalone version I can login (via SSL) to the backend, but clicking ‘flight control’ gives me the error ‘Get List of Components Failed!’.
    Flight Control should not be used at the moment (you do not need it yet).

  2. How do upgrades work? When there is a new 3.x release, is there a way to upgrade the installation?

EDIT: This is partly mentioned in the manual. It comes down to installing the new version and migrating all data. Is this true even for small updates (bug fixes)?
For upgrades involving database changes we will be providing upgrade scripts. For coding changes you will need to upgrade binaries per the provided instructions.

Regards,
Mark

Hi Mark, thanks for the answers.

Final question: Does backendless support self signed signatures?

I can reproduce this. Just have to find out what exact api call let’s the server crash, as on app startup I do a couple of async calls together.

Mark,

I was a bit of work to find the exact bit of code that probably causes the crash.

Its this:


func updateDevice(blDevice:BLDevice) {
            self.blDeviceID = blDevice.objectId
            
            blDevice.deviceOS = deviceOS
            blDevice.deviceOSVersion = deviceOSVersion
            blDevice.deviceModel = UIDevice.currentDevice().model
            blDevice.appVersion = appVersion
            blDevice.lastConnected = NSDate()
            
            if let user = backendless.userService.currentUser {
                blDevice.user = user
            } else {
                blDevice.user = nil
            }
            
            let dataStore = backendless.persistenceService.of(BLDevice().ofClass())
            
            dataStore.save(blDevice, response: {(response:AnyObject!) -> Void in
                print ("updateDevice - Response OK: ",response)
                
                }, error: {(fault:Fault!) -> Void in
                    print ("Fault! ",fault)
            })
        }

Switching back to backendless cloud and everything is ok.

But one thing: I suddenly get this error when calling the above method (on the cloud that is):

Fault! FAULT = ‘3009’ [User registration is denied for this version of application] <User registration is denied for this version of application>

How can I solve this?

Hi Barry,

Could you please send us the log files from backendless-3.0.0-8/apps/backendless/logs?

Sure, where do you want me to send them?

Do you also maybe know about the 3009 error I get?

Edit: Just did a quick check on the logs: It’s Redis that dies.

Send them to sergey.chupov@themidnightcoders.com, please.

Due to 3009 error, check whether you have Registration enabled on console: http://i.imgur.com/aeq90Ps.png</img>

Logs send!

About the registration: YEs it is disabled and it should be disabled. (it always has been).

Im not creating a new user, im creating a relation to an existing user (see the code example I posted).

Any other idea?

Don’t know yet, but I will ask somebody from the team to check it. You said it occurs in Backendless Cloud, right?

Correct -> in standalone the server crashes when calling that method.

Hi Barry,

Just a quick update that we found the problem when updating object with relation to User and are already working on the fix.

I have also seen occasionally today that my application using REST API will receive a HTTP error of 502.

Barry,

It would be a function of the webserver which is Apache in the case of Standalone Backendless.

Mark

Please open a new thread and provide more details to help us diagnose the problem.

Regards,
Mark

Will do If the error occurs for me again.