apigee / apigee-devportal-kickstart-drupal

A fast demo and starting point for Apigee Developer Portals for Drupal
https://www.drupal.org/project/apigee_devportal_kickstart
GNU General Public License v2.0
26 stars 34 forks source link

Facing an issue while trying to configure Apigee module #543

Closed NNV111 closed 2 years ago

NNV111 commented 2 years ago

We have Drupal set up and Apigee module installed in AWS workspace. Apigee also runs on private cloud. While trying to configure the details to establish the connection, facing the following error -- image

image

Could you please let me know what configuration details I've missed

shishir-intelli commented 2 years ago

@NNV111 Can you make sure you have correctly configured the private file settings. See https://www.drupal.org/docs/contributed-modules/apigee-edge/configure-the-connection-to-apigee#configure-private-file

NNV111 commented 2 years ago

@shishir-intelli I have configured the path in settings.php and the path is reflecting under the file system in the UI as well Cleared the cache, changed the permissions for this file (chmod -R 775 '../private';) I get the above error when this path has been provided.

image

Fetched this path using the command "find / -name private"

I have created a private directory in the drupal folder and gave that path, but that didn't work either. Have gotten the same error. Could you let me know if there's something I am doing wrong.

shishir-intelli commented 2 years ago

@NNV111
It seems like the private file system path which you have set is incorrect. I will suggest you create the private folder on /wwwand not inside Drupal and should not accessible over the web and also set the absolute path in setting.php . So IMO the path should look like /var/www/private in Private file system path and set the access permission for that folder.

NNV111 commented 2 years ago

@shishir-intelli Have tried as you've suggested, created a private folder and placed it outside the Drupal i.e. (/var/www/private), set the absolute path in settings.php, gave recursive permissions by using the command chmod -R 775 and chmod -R 777 Still facing the exact same error. The OauthTokenFileStorage.php file at line 200 is pointing out to this if block that's raising the error image

If possible, could you please let me know what else I could be missing out for the drupal-apigee connection establishment? Also, while running the curl command in Drupal server instance, we are getting the response when hitting the apigee management server.

shishir-intelli commented 2 years ago

@NNV111 No, you are not missing out anything, its just that your private directory is not set properly. The OauthTokenFileStorage.php checkRequirements method prepares the directory, either the path is incorrect or you are missing out of some permission on that directory.

Can you share me the screenshot of /admin/config/media/file-system page.

Meanwhile, you can checkout https://www.drupal.org/docs/8/core/modules/file/overview#s-private-file-system-settings-in-drupal-8 or https://www.drupal.org/docs/contributed-modules/apigee-developer-portal-kickstart/use-kickstart-with-apigee-edge-for-private-cloud#s-secure-edge-connection-settings and try it out.

Note: Caches need to be cleared when this value is changed to make the private:// stream wrapper available to the system.

phdhiren commented 2 years ago

@NNV111

Hope the solution worked for you. Closing the issue for now, feel free to reopen if required.