Solved

Users Brick - "Cannot reach url" error

  • 19 June 2023
  • 4 replies
  • 72 views

Hello,

As part of LCM Implementation, I’m having an issue with the connection for my configuration database which is the input source for adding users to my domain using the User Brick. 

User Brick - gd_encoded_params:

{
"mssql_client": {
"connection": {
"url": "${analytics-configuration.url}",
"authentication": {
"basic": {
"userName": "${analytics-configuration.username}",
"password": "${analytics-configuration.password}"
}
},
"database": "${analytics-configuration.database}",
"sslMode": "verify-full"
}
},
"input_source": {
"type": "mssql",
"query": "SELECT distinct login,first_name,last_name FROM [GD].[BRICKS_USER]"
}
}

The brick fails stating “cannot reach url”: 
 


The interesting thing is that I use the same connection for the configuration of the Provisioning Brick and that works like a charm without an issue.

Provisioning (workspace) Brick - gd_encoded_params:

 

{
"mssql_client": {
"connection": {
"url": "${analytics-configuration.url}",
"authentication": {
"basic": {
"userName": "${analytics-configuration.username}",
"password": "${analytics-configuration.password}"
}
},
"database": "${analytics-configuration.database}",
"sslMode": "verify-full"
}
},
"input_source": {
"type": "mssql",
"query": "Select * from [GD].[BRICKS_PROVISIONING]"
}
}

 

icon

Best answer by michal 20 June 2023, 23:03

View original

4 replies

Userlevel 3

Hi Luis, 

 

the “cannot reach url” error usually implies there is a misconfiguration in the resource the brick is trying to query the data from. Are you using any kind of white listing by any chance or did anything change recently in your data base settings? I would advise checking your user access rights and IP whitelisting settings. You can find more details in this documentation: GoodData IP Addresses and IP Whitelisting | GoodData Free. If you are still having issues, feel free to send the error / request ID from the log.

 

-Moises

Hello Moises, thanks for the reply.

No, we don’t user any white listing and did not change anything in the source database. The connection to the source database is the same we use for the Provisioning Brick and that works fine, the only thing that changes is the table we want to query but by the looks of the error message the brick can’t reach the database. 


 

I, [2023-06-19T19:05:32.283613 #7]  INFO -- : Pipeline starts , request_id=disc_vQHr1zEv8e:VrI8m8eGos9jgRDg:4L57X5ysnxYUcWUC
I, [2023-06-19T19:05:32.284133 #7] INFO -- : Statistics collecting is turned ON. All the data is anonymous.
W, [2023-06-19T19:05:32.286252 #7] WARN -- : Reference 'analytics-configuration.url' is not found!
W, [2023-06-19T19:05:32.286507 #7] WARN -- : Reference 'analytics-configuration.username' is not found!
W, [2023-06-19T19:05:32.286711 #7] WARN -- : Reference 'analytics-configuration.password' is not found!
W, [2023-06-19T19:05:32.286933 #7] WARN -- : Reference 'analytics-configuration.database' is not found!
I, [2023-06-19T19:05:32.288305 #7] INFO -- : Starting timer
I, [2023-06-19T19:05:32.290784 #7] INFO -- : Connecting with SST to server https://secure.fra1.gooddata.com
I, [2023-06-19T19:05:33.085931 #7] INFO -- : Connected using SST to server https://secure.fra1.gooddata.com to profile "luis.carrico@mycompany.com"
I, [2023-06-19T19:05:33.167045 #7] INFO -- : Connection successful
I, [2023-06-19T19:05:33.201947 #7] INFO -- : Connected to server with webdav path https://secure.fra1.gooddata.com/gdc/uploads/
W, [2023-06-19T19:05:33.312702 #7] WARN -- : Following params are not used by any action: [
"use_aws_java_sdk",
"values_to_mask",
"gooddata_ruby_commit",
"mssql_client",
"development_client",
"process_name",
"gdc_request_id",
"gdc_use_local_webdav_upload",
"disable_default_batch_upload_ff",
"user",
"gdc_protocol",
"gdc_port",
"gdc_project_mode",
"process_id",
"gdc_hostname",
"user_email",
"gdc_branding_hostname",
"gdc_priority_mode",
"gdc_webdav_root",
"gdc_sst",
"gdc_log_directory",
"gdc_execution_id",
"gdc_execution_log_path",
"gdc_execution_result_log_path"
]
I, [2023-06-19T19:05:33.572103 #7] INFO -- :
+-------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------------+-------------------+
| Action | Parameter | Description | Parameter Type |
+-------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------------+-------------------+
| CollectMultipleProjectsColumn | gdc_gd_client | Client Used for Connecting to GD | GdClientType |
| CollectMultipleProjectsColumn | multiple_projects_column | Identifier of column that identifies the relation to the projects in an user action input | StringType |
| CollectMultipleProjectsColumn | sync_mode | Synchronization Mode for user action (e.g. sync_one_project_based_on_pid) | StringType |
| CollectMultipleProjectsColumn | gdc_logger | Logger | GdLogger |
| SynchronizeUsers | gdc_gd_client | Client Used For Connecting To GD | GdClientType |
| SynchronizeUsers | input_source | Input Source | HashType |
| SynchronizeUsers | sync_mode | Synchronization Mode (e.g. sync_one_project_based_on_pid) | StringType |
| SynchronizeUsers | multiple_projects_column | Column That Contains Target Project IDs | StringType |
| SynchronizeUsers | data_product | DataProduct to manage | GDDataProductType |
| SynchronizeUsers | organization | Organization Name | StringType |
| SynchronizeUsers | domain | Domain | StringType |
| SynchronizeUsers | gdc_logger | Logger | GdLogger |
| SynchronizeUsers | gdc_project | GDC Project | GdProjectType |
| SynchronizeUsers | gdc_project_id | GDC Project Id | StringType |
| SynchronizeUsers | segments | Segments to manage | ArrayType |
| SynchronizeUsers | additional_hidden_params | Additional Hidden Parameters | HashType |
| SynchronizeUsers | whitelists | Whitelists | ArrayType |
| SynchronizeUsers | regexp_whitelists | Regular expresion whitelists | ArrayType |
| SynchronizeUsers | ignore_failures | Ignore Failures Flag | BooleanType |
| SynchronizeUsers | remove_users_from_project | Remove users from project flag | BooleanType |
| SynchronizeUsers | do_not_touch_users_that_are_not_mentioned | Do not touch users that are not mentioned flag | BooleanType |
| SynchronizeUsers | create_non_existing_user_groups | Create non existing user groups flag | BooleanType |
| SynchronizeUsers | sso_provider | Single sign on provider | StringType |
| SynchronizeUsers | ads_client | ADS client | AdsClientType |
| SynchronizeUsers | authentication_modes | Authentication modes | StringType |
| SynchronizeUsers | first_name_column | First name column | StringType |
| SynchronizeUsers | last_name_column | Last name column | StringType |
| SynchronizeUsers | login_column | Login column | StringType |
| SynchronizeUsers | password_column | Password column | StringType |
| SynchronizeUsers | email_column | Email column | StringType |
| SynchronizeUsers | role_column | Role column | StringType |
| SynchronizeUsers | sso_provider_column | Sso provider column | StringType |
| SynchronizeUsers | authentication_modes_column | Authentication modes column | StringType |
| SynchronizeUsers | user_groups_column | User groups column | StringType |
| SynchronizeUsers | language_column | Language column | StringType |
| SynchronizeUsers | company_column | Company column | StringType |
| SynchronizeUsers | position_column | Position column | StringType |
| SynchronizeUsers | country_column | Country column | StringType |
| SynchronizeUsers | phone_column | Phone column | StringType |
| SynchronizeUsers | ip_whitelist_column | Ip whitelist column | StringType |
+-------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------------+-------------------+
I, [2023-06-19T19:05:33.580178 #7] INFO -- :
+---+-------------------------------+-------------------------------------------------------------+
| Actions to be performed for mode 'users' |
+---+-------------------------------+-------------------------------------------------------------+
| # | NAME | DESCRIPTION |
+---+-------------------------------+-------------------------------------------------------------+
| 0 | CollectMultipleProjectsColumn | Collect multiple_projects_column to be used in user actions |
+---+-------------------------------+-------------------------------------------------------------+
| 1 | SynchronizeUsers | Synchronizes Users Between Projects |
+---+-------------------------------+-------------------------------------------------------------+
I, [2023-06-19T19:05:33.580458 #7] INFO -- :

W, [2023-06-19T19:05:33.582913 #7] WARN -- : Action GoodData::LCM2::CollectMultipleProjectsColumn does not have RESULT_HEADERS, inferring headers from results.
I, [2023-06-19T19:05:33.673467 #7] INFO -- :
+-----------------------------------------+
| Result of CollectMultipleProjectsColumn |
+-----------------------------------------+
| MULTIPLE_PROJECTS_COLUMN |
+-----------------------------------------+
| project_id |
+-----------------------------------------+
I, [2023-06-19T19:05:33.673821 #7] INFO -- :

E, [2023-06-19T19:05:33.772256 #7] ERROR -- : Execution failed. Error: [
{
"action": "GoodData::LCM2::SynchronizeUsers",
"err": "Cannot reach the url",
"backtrace": [
"/src/lib/gooddata/cloud_resources/mssql/mssql_client.rb:104:in `validate'",
"/src/lib/gooddata/cloud_resources/mssql/mssql_client.rb:47:in `initialize'",
"/src/lib/gooddata/cloud_resources/cloud_resource_factory.rb:26:in `create'",
"/src/lib/gooddata/helpers/data_helper.rb:67:in `realize_cloud_resource'",
"/src/lib/gooddata/helpers/data_helper.rb:50:in `realize'",
"/src/lib/gooddata/lcm/actions/synchronize_users.rb:371:in `block in load_data'",
"/src/lib/gooddata/lcm/actions/base_action.rb:35:in `without_check'",
"/src/lib/gooddata/lcm/actions/synchronize_users.rb:370:in `load_data'",
"/src/lib/gooddata/lcm/actions/synchronize_users.rb:168:in `call'",
"/src/lib/gooddata/lcm/lcm2.rb:438:in `run_action'",
"/src/lib/gooddata/lcm/lcm2.rb:358:in `block in perform'",
"org/jruby/RubyArray.java:1792:in `each'",
"/src/lib/gooddata/lcm/lcm2.rb:354:in `perform'",
"/src/lib/gooddata/bricks/users_brick.rb:10:in `call'",
"/src/lib/gooddata/bricks/middleware/fs_upload_middleware.rb:19:in `call'",
"/src/lib/gooddata/bricks/middleware/dwh_middleware.rb:42:in `call'",
"/src/lib/gooddata/bricks/middleware/aws_middleware.rb:29:in `call'",
"/src/lib/gooddata/bricks/middleware/gooddata_middleware.rb:90:in `call'",
"/src/lib/gooddata/bricks/middleware/bench_middleware.rb:18:in `block in call'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/benchmark.rb:293:in `measure'",
"/src/lib/gooddata/bricks/middleware/bench_middleware.rb:18:in `call'",
"/src/lib/gooddata/bricks/middleware/execution_result_middleware.rb:21:in `call'",
"/src/lib/gooddata/bricks/middleware/decode_params_middleware.rb:17:in `call'",
"/src/lib/gooddata/bricks/middleware/logger_middleware.rb:70:in `call'",
"/src/bin/run_brick.rb:65:in `<main>'",
"org/jruby/RubyKernel.java:1007:in `load'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli/exec.rb:1:in `(root)'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli/exec.rb:74:in `kernel_load'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli/exec.rb:28:in `run'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli.rb:463:in `exec'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli.rb:27:in `dispatch'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/cli.rb:18:in `block in start'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/gems/shared/gems/bundler-1.17.3/exe/bundle:30:in `<main>'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/stdlib/bundler/friendly_errors.rb:124:in `<main>'",
"org/jruby/RubyKernel.java:1007:in `load'",
"/usr/local/rvm/rubies/jruby-9.2.5.0/lib/ruby/gems/shared/gems/bundler-1.17.3/exe/bundle:22:in `<main>'",
"org/jruby/RubyKernel.java:1046:in `eval'",
"/usr/local/rvm/gems/jruby-9.2.5.0/bin/jruby_executable_hooks:22:in `<main>'"
]
}
]
The execution finished with error

 

Userlevel 2

Given the parameter names in your configuration like ${analytics-configuration.username}, I assume you are using data sources. If the same/similar configuration works for the provisioning brick and fails with “Cannot reach the url” for user brick, I would suggest to double check that you have the user brick deployed with the data source (analytics-configuration in this case).

The parameters from the data sources are only propagated to the schedule if the data source is explicitly mentioned in the deployment of the process. If not, the schedule would not be getting the value of the datasource parameters and I believe that might be causing this issue.

You can check if it is deployed with the data source(s) in the Data Integration Console UI if you click “Redeploy” button next to the process. Right under the “COMPONENT” there should be “additional data sources” section with your data source selected.

If the data source is not there, you can add it.

NOTE - If you don’t see the “additional data sources“ section and instead see a yellow box, just click to “Switch to using Data Sources” in this box to display it.

 

 

Hello Michal, 

Problem solved once I’ve redeployed the process like you suggested. Thanks for the help!  

Reply