Page 1 of 1

FHIR API server errors

Posted: Fri Aug 23, 2019 3:12 am
by bravegag
Hi Chris,

I started getting this error today and for any request e.g.

Code: Select all

FHIR GET request https://api.opendental.com/fhir/v2/location?organization=organization/0
I then get:

Code: Select all

{"issue":[{"severity":"error","code":"exception","details":{"text":"The server has encountered an error."}}]}
Any ideas what's happening? I made sure to get my sandbox up to date; as of now I have 19.2.18.0.

TIA,
Best regards,
Giovanni

Re: FHIR API server errors

Posted: Mon Aug 26, 2019 9:40 am
by cmcgehee
Giovanni, it looks like your eConnector is not running. Once you turn it on, this error should go away.

Re: FHIR API server errors

Posted: Fri Aug 30, 2019 3:33 am
by bravegag
Hi Chris,
cmcgehee wrote:Giovanni, it looks like your eConnector is not running. Once you turn it on, this error should go away.
Thanks! I checked and the eConnector showed always started/running ... after I took the latest update then it works again, so all good.

Thank you and best regards,
Giovanni

Re: FHIR API server errors

Posted: Mon Sep 02, 2019 2:04 pm
by bravegag
Hi Chris,

I still get these spurious server errors, I checked and my sandbox installation is up to date and the eConnector service running (see below).
Image

Why are these sporadic errors happening?

Many TIA,
Best regards,
Giovanni

Re: FHIR API server errors

Posted: Tue Sep 03, 2019 7:43 am
by cmcgehee
In the location where the eConnector is installed, there is a folder named "Logger". There should be some files in there that help show what is going on, particularly the ProxyRemoteImmortal, EConnectorService, and LogWeb folders.

Re: FHIR API server errors

Posted: Fri Sep 06, 2019 11:59 am
by bravegag
Hi Chris,

I do again have the issue:

The ProxyRemoteInmortal in folder today shows:

Code: Select all

09/06/19 20:35:58:866	Thread loop failed: Quit event raised
The EConnectorService in folder today shows:

Code: Select all

09/06/19 20:34:52:603	Setting the no-sleep override.
09/06/19 20:34:52:603	OpenDentalEConnector Service is starting.
09/06/19 20:35:58:852	OpenDentalEConnector Service has stopped.
09/06/19 20:36:40:423	Setting the no-sleep override.
09/06/19 20:36:40:423	OpenDentalEConnector Service is starting.
The LogWeb in folder today shows:

Code: Select all

09/06/19 20:34:53:574	Message: eConnector Version matches Program Version.
Function Name: ListenerManagerThread : )
Is Exception: False
Application Log Level: Error
Entry Log Level: Error

Data Context:
eConnector Version: 19.2.20.0. Program Version: 19.2.20.0.

Call Stack:
1 - ListenerManagerThread : )
2 - ODThread : Run
3 - ThreadHelper : ThreadStart_Context
4 - ExecutionContext : RunInternal
5 - ExecutionContext : Run

09/06/19 20:36:40:663	Message: eConnector Version matches Program Version.
Function Name: ListenerManagerThread : )
Is Exception: False
Application Log Level: Error
Entry Log Level: Error

Data Context:
eConnector Version: 19.2.22.0. Program Version: 19.2.22.0.

Call Stack:
1 - ListenerManagerThread : )
2 - ODThread : Run
3 - ThreadHelper : ThreadStart_Context
4 - ExecutionContext : RunInternal
5 - ExecutionContext : Run
I look forward your feedback.

Best regards,
Giovanni

Re: FHIR API server errors

Posted: Mon Sep 09, 2019 8:20 am
by cmcgehee
Well, your eConnector is definitely shutting down and restarting. The eConnector logs generally don't say why it's starting or stopping, so you'll have to figure that out yourself. Maybe the computer is restarting, maybe the eConnector service does not have a startup type of automatic.

Re: FHIR API server errors

Posted: Tue Nov 05, 2019 12:57 am
by arm5060
Hi cmcgehee,

You are doing fantastic job by helping everyone here.
This is my first post. I am a developer and trying to integrate OpenDental with one of our Web Application.

I was trying to get list of appointments using a test PHP script by using our FHIRAPIKey of OpenDental setup.

Here is the code:

Code: Select all

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.opendental.com/fhir/appointment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"x-auth-token: FHIRAPIKey=XXXYYYZZZ",
"Accept: application/json"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
print_r(json_decode($response));
} ?>
But that always return me error as below:

Code: Select all

stdClass Object
(
    [issue] => Array
        (
            [0] => stdClass Object
                (
                    [severity] => error
                    [code] => login
                    [details] => stdClass Object
                        (
                            [text] => Developer API key required.
                        )

                )

        )

)
I have confirmed, the eConnector service is running.

OpenDental version is: 19.1.44.0

Please let me know what else i can check to troubleshoot this.

Looking forward to hearing back from you soon.


Thank You.

Re: FHIR API server errors

Posted: Tue Nov 05, 2019 8:59 am
by cmcgehee
Your PHP script is close. If you just change "x-auth-token: FHIRAPIKey=XXXYYYZZZ" to ""Authorization: FHIRAPIKey=XXXYYYZZZ", then the request should work.

Re: FHIR API server errors

Posted: Sun Nov 10, 2019 9:57 pm
by arm5060
Hi Cmcgehe,

Thank you for your response. I just checked and tried after changing but now it's giving me error of invalid API key.
I have checked the API key is right and also the eConnector is working.

Code: Select all

stdClass Object
(
    [issue] => Array
        (
            [0] => stdClass Object
                (
                    [severity] => fatal
                    [code] => security
                    [details] => stdClass Object
                        (
                            [text] => Invalid API key(s).
                        )

                )

        )

)

Can you please share how do i troubleshoot further?

Thank you.

Re: FHIR API server errors

Posted: Mon Nov 11, 2019 8:11 am
by cmcgehee
Can you send me your full request including your API key in a private message? I can check to make sure the API key is still valid.

Re: FHIR API server errors

Posted: Mon Nov 11, 2019 9:46 am
by arm5060
Hi cmchegee,

Thank you.
I have sent you personal message.
Please check.

Thank you