Support Topics Documentation Slack YouTube Blog

Error in business logic after outage

Backendless Version (3.x / 5.x, Online / Managed / Pro )

5.x

Client SDK (REST / Android / Objective-C / Swift / JS )

Swift

Application ID

130CA81A-36A3-9479-FFEE-AB623F4D0E00

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

  1. The timer PriceGetterTimer runs and retrieves data from external website
  2. The data is written to a back endless table

Actual Behavior

  1. The timer PriceGetterTime attempts to run but fails
  2. The following error is returned in log: “2020-03-04 20:36:30,091 | Coderunner | ERROR | Business logic execution has been stopped, due to error: Code: 0 Class: java.lang.NoClassDefFoundError Message: Could not initialize class sun.security.ssl.SupportedGroupsExtension$SupportedGroups”
  3. The data is not retrieved from external site or written to back endless table

Reproducible Test Case

Look at the logs for that timer

No changes were made to business logic in the last 72 hours, however after the outage this timer is now not working

Hello,

thanks for reporting this issue!
Our engineers are already fixing this problem.
Will keep you informed here.

Regards,
Stansilaw

Does your timer works in debug mode locally?

Hi Stanislaw,

I received the following error when attempting to run run debug mode:

Mitchells-MacBook-Pro:bin Mitch$ ./CodeRunner.sh

Path to “JAVA_HOME”: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home


Running CodeRunner …

env JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java -XX:+HeapDumpOnOutOfMemoryError -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Dlogback.configurationFile=logback.xml -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -cp “/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/lib/tools.jar::…/libs/” com.backendless.coderunner.CodeRunnerLoader


Listening for transport dt_socket at address: 5005

18:12:59.405 [INFO] c.b.c.CodeRunnerLoader |main| JDK from “JAVA_HOME” - /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home

18:12:59.484 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner™ Backendless Debugging Utility

18:12:59.485 [INFO] c.b.c.CommandLineProcessor |main| Copyright© 2020 Backendless Corp. All rights reserved.

18:12:59.487 [INFO] c.b.c.CommandLineProcessor |main| Build date: 2020-01-27T08:09:47Z

Version: 5.7.1

Build id: 108243

VCS revision: aa9fb23a9d29e632dacedd1fc343745a84076803

18:12:59.491 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner session is running for 2 hours and will be terminated on 20:12:59.489[UTC]

18:12:59.559 [INFO] c.b.h.HealthCheckHttpServer |main| Management port is absent, management server not started

18:12:59.560 [INFO] c.b.coderunner.LocalCodeRunner |main| Registering runner on: ‘https://api.backendless.com

18:12:59.563 [INFO] c.b.coderunner.LocalCodeRunner |main| Application ID: ‘130CA81A-36A3-9479-FFEE-AB623F4D0E00’

18:12:59.563 [INFO] c.b.coderunner.LocalCodeRunner |main| Api key: ‘redacted string’

18:13:01.781 [ERROR] c.b.c.CodeRunnerLoader |main| Error reading entity from input stream.

javax.ws.rs.ProcessingException: Error reading entity from input stream.

at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:868)

at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:785)

at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:335)

at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:111)

at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

at org.glassfish.jersey.internal.Errors.process(Errors.java:228)

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:399)

at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:108)

at com.backendless.coderunner.util.CodeRunnerUtil.registerCodeRunner(CodeRunnerUtil.java:55)

at com.backendless.coderunner.LocalCodeRunner.register(LocalCodeRunner.java:138)

at com.backendless.coderunner.LocalCodeRunner.start(LocalCodeRunner.java:64)

at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.java:41)

at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.java:29)

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “apiKey” (class com.backendless.coderunner.commons.model.RegistrationResponse), not marked as ignorable (3 known properties: “applicationId”, “debugId”, “secretKey”])

at [Source: (org.glassfish.jersey.message.internal.EntityInputStream); line: 1, column: 67] (through reference chain: com.backendless.coderunner.commons.model.RegistrationResponse[“apiKey”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)

at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1582)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1560)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)

at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1574)

at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:965)

at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:815)

at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:257)

at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:229)

at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149)

at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124)

at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:853)

… 13 common frames omitted

18:13:02.957 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Debugging Utility disconnected successfully

18:13:02.958 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Thank you for using Backendless

Ok, thank you for additional info.
We’ll fix it ASAP, thanks for the patience & stay tuned.

Regards,
Stanislaw

1 Like

Could you add information about library you use to make http/s requests.

The problem has been fixed.
You can expect corrections to be applied on Monday or Tuesday.

Thank you

Hi,
Could you please advise when the changes have been applied?

Many thanks

Hi,

Is there any update on this? The issue has been ongoing since 4th March and impacts major functionality of my app…

Hi Mitchel,
as it says above, the fix is going to be today.
Thanks for your patience.

Regards,
Stanislaw

Hi,

Can you confirm if the changes have been made? I am still experiencing the same issue.

Additionally, I cannot test any alternate business logic code as debug mode in CodeRunner is also not working, see above thread.

Hi, Mitchell. We are so sorry, but we were forced to postpone the deploy on today.
I’ll post here about the progress.

Hi Oleg,

That’s ok, these things happen. Do you have an updated ETA on the patch roll out?

Please, check. Now the https requests should be going through.
If not, please provide the code example where you make http/s requests (because we made the check only with our test code).

The data is still not being written to the data table. I cannot check the logs are they are being written at the moment. I noticed the logs were only writing intermittently the last few days.
I re-deployed the code using ./Deploy.sh, still can’t see logs and no data written to table

Please see the attached picture for description of which logs are being written. The ‘default’ log from the timers is being written, it just reports that it has been executed.
The ‘custom messages’ log which should write every time the timer executes has not been updating (check the difference in the times)

Also the debug mode of CodeRunner is not working still. See attached screenshot, this is form code downloaded from timer right now.

Using code downloaded on 17th Feb, the error is as per the post above

http is accessed using following code (note this code has not been changed in over a year and always worked until now):

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import netscape.javascript.JSObject;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;

public double getJSONFromURL(String sURL){
        JsonParser jp = new JsonParser(); //from gson
        JsonElement root = null;
        //System.setProperty("http.keepAlive", "false");
        // Connect to the URL using java's native library
        URL url = null;
        try {
            url = new URL(sURL);
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        URLConnection request = null;
        try {
            request = url.openConnection();
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            request.addRequestProperty("Connection","close");
            request.connect();
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            root = jp.parse(new InputStreamReader((InputStream) request.getContent()));
        } catch (IOException e) {
            e.printStackTrace();
        }

        JsonObject rootobj = root.getAsJsonObject();
        String price = rootobj.get("lastPrice").getAsString();
        return Double.parseDouble(price);

    }

If you use the fresh download of CodeRunner, please take into account, that since last month it works on Java-11.

But your old code should work fine. I check your example in an half of an hour.