bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 57 forks source link

NAME REQUEST System Issue: unable to submit a NR for a xpro corporation with the corporate number from the home jurisdiction #7246

Closed sienna-oldaccountdontuse closed 2 years ago

sienna-oldaccountdontuse commented 3 years ago

ServiceNow incident:

INC0086708

Contact information

Staff Name: Jennifer Weldon

Description

Good morning,

I just spoke to a client who called for assistance as he was having issues submitting his name request through Name Request. I attempted to walk him through how to submit it and I experienced the same issue. What happened is the system generated an error message to advise that the “Corporate Number Not Found” when you try to submit a NR:

image003 (6).jpg unnamed.jpeg

I verified that the numbers are correct in CORES, and I can’t figure out why this is happening. I’m not sure if this is a known issue or not, and I’m wondering if someone can look into it please?

Before closing this ticket, remember to ask Sienna or Linda to inform IT Ops that this has been resolved!

stevenc987 commented 3 years ago

@kialj876 @thorwolpert .

I checked this corp_num doesn't exist in CPROD. Is this a known issue?

lmcclung commented 3 years ago

@stevenc987 sound like maybe the call to MRAS hub isn't working. Perhaps this didn't get hooked up properly as part of OCP4 migration to PROD?

severinbeauvais commented 3 years ago

The UI responded as it did because the network call to fetch the MRAS profile failed. (The UI actually saw a "CORS error" but that's possibly because the API did not respond with a correct HTTP code.)

severinbeauvais commented 3 years ago

I saw this in the namex api logs:

Calling MRAS Jurisdictions API using [corp_num: 2023326222]
https://prodapi.mrasservice.ca//api/v1/xpr/jurisdictions/2023326222
{'x-api-key': 'BC:0d9524df-(snipped)', 'Accept': 'application/xml'}

Is it correct?

severinbeauvais commented 3 years ago

The MRAS_SVC_URL secret in OCP has a trailing /. Maybe it shouldn't?

lmcclung commented 3 years ago

@pwei1018 @rarmitag could you confirm whether the MRAS hookup was reconnected with the OCP4 upgrade?

kialj876 commented 3 years ago

was this resolved?

rarmitag commented 3 years ago

The value for the MRAS_SVC_URL is the same as it was in OC3, so there would be no reason for it to stop working by moving it to OC4.

sienna-oldaccountdontuse commented 3 years ago

I don't think it's been resolved yet, has it @severinbeauvais ?

severinbeauvais commented 3 years ago

Reproduction Steps:

  1. go to https://www.bcregistry.ca/namerequest/
  2. select action= Register or Incorporate a
  3. select jurisdiction = Extrapro (Canada)
  4. select business type = any
  5. select home jurisdiction = Alberta
  6. enter corporate number = 2023326222
  7. click Search

After about 15 seconds, this fails ("Corporate Number Not Found") and an error is printed to the dev console:

Access to XMLHttpRequest at 'https://namex.apps.silver.devops.gov.bc.ca/api/v1/mras-profile/AB/2023326222' from origin 'https://www.bcregistry.ca' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
14:27:55.260 instrument.js?ea14:109 fetchMRASProfile() = Error: Network Error [ Could not fetch mras profile ]
14:27:55.444 VM11:1 GET https://namex.apps.silver.devops.gov.bc.ca/api/v1/mras-profile/AB/2023326222 net::ERR_FAILED

So not yet fixed.

severinbeauvais commented 3 years ago

As I heard the MRAS keys were recently updated, I just tested this again. It still fails.

lmcclung commented 3 years ago

See also #7632 which was opened May 18th.

Kaineatthelab commented 2 years ago

this looks like a bug that should be prioritized if tis broken? not sure why it has the blocked label on it? @jdyck-fw

jdyck-fw commented 2 years ago

I just pulled the 'blocked' label off of this one. I believe it may have been leftover from being blocked and tied to the answer required on "Home Jurisdiction needs to be written back to NamesP database".

@Sienna-Blumstengel any chance you might be able to confirm?

rarmitag commented 2 years ago

Was this related to Andre's ticket #6566?

andrepestana-aot commented 2 years ago

@rarmitag It's not related to #6566. The issue is probably related to MRAS configuration or network access. Can you please check the conf props below from PROD and compare to other environments?

MRAS_SVC_API_KEY
MRAS_SVC_URL

The request to PROD (https://namex.apps.silver.devops.gov.bc.ca/api/v1/mras-profile/AB/2023326222) is having:

504 Gateway Time-out
The server didn't respond in time.

While in dev (https://namex-dev.apps.silver.devops.gov.bc.ca/api/v1/mras-profile/AB/2023326222) immediately brings the response: {"error":"No profile found for the jurisdiction, registration number pair."}

It can be also firewall access from namex-api to mras service.

jdyck-fw commented 2 years ago

@lmcclung will get some test MRAS NRs for this. Also check with home team to see if mras is hooked up for Test.

JohnamLane commented 2 years ago

@lmcclung FYI I just verified the getProfile in NRO prod for this company and it's working. This points to the namex/MRAS integration. image

lmcclung commented 2 years ago

@eve-git Hi Eve, can you look at this one for your next ticket since it's about the MRAS hookup not working correctly?

Thanks.

eve-git commented 2 years ago

The production issue does not like invalid-corp-number issue because instead of an error message returns, there is no response returned from hub.

I tested in test with Alberta 2110166911 and it works. I suppose that the code in test and prod are the same in this part. Probably the request URL has no problem.

An api-key should be in header for a MRAS request. I wonder if it is correct in prod. The api-key in oracle is at cprd-> SYSTEM_VARIABLES.SYSCHAR_CD='MRAS_API_KEY'

I am looking for the api-key in the app.

eve-git commented 2 years ago

It is proved that the api-key in namerequest app are different from what in oracle database. Update the api-key in app environment should solve the problem. No code change needed.

lmcclung commented 2 years ago

Can someone on Ops pick this up as Eve doesn't have access to PROD yet?

thorwolpert commented 2 years ago

please do not do that

lmcclung commented 2 years ago

@pwei1018 I understand you received a new key around May 11th. Could you update it?

pwei1018 commented 2 years ago

@lmcclung @thorwolpert @eve-git @rarmitag According May 11th Update key email, our existing api key in Namex API is a new key. The key in COLIN is the old one we used before.

thorwolpert commented 2 years ago

@andrepestana-aot had noted the issue a while back now.

@pwei1018 has opened a FW change to fix this.

pwei1018 commented 2 years ago

@lmcclung @thorwolpert Firewall rule got change in both bcgov and MRAS. I verified it with new and old keys. Both works. Please verify it inside the application.

rarmitag commented 2 years ago

Good find Patrick. Firewall rules can be a real pain.

sienna-oldaccountdontuse commented 2 years ago

Woohoo thanks Patrick, I tested and it looks like it works! Will reach out to the client to see if this is resolved and can be closed. @pwei1018 could you please add an estimate on how long this ticket took to complete (maybe add buffer for other's contibutions?)

lmcclung commented 2 years ago

@Sienna-Blumstengel if you don't hear back from the client be EOD July 22, I recommend moving this one to done.