502 error on ubuntu

41 views
Skip to first unread message

Pat Dunlavey

unread,
Aug 28, 2020, 4:31:53 PM8/28/20
to archipelago commons
Hello everybody! I'm brand new to this group, so please be kind ;-)

Following the local ubuntu install instructions here, everything goes swimmingly until I get the following error during the drush site install phase:
 [notice] Starting Drupal installation. This takes a while.
[28-Aug-2020 20:10:28 UTC] Error: Call to a member function addError() on null in /var/www/html/web/modules/contrib/strawberryfield/src/Plugin/StrawberryfieldKeyNameProvider/JsonldKeyNameProvider.php on line 251 #0 /var/www/html/web/modules/contrib/strawberryfield/src/Plugin/StrawberryfieldKeyNameProvider/JsonldKeyNameProvider.php(220): Drupal\strawberryfield\Plugin\StrawberryfieldKeyNameProvider\JsonldKeyNameProvider->getRemoteJsonData('https://schema....')

When I visit http://localhost:8001, I get "502 Bad Gateway nginx/1.19.2"

I thought maybe I had a port conflct, but 8001 is not otherwise in use. When the docker containers are running, the port appears correct in the port list.

Any suggestions would be much appreciated! 

Pat


Pat Dunlavey

unread,
Aug 28, 2020, 4:51:13 PM8/28/20
to archipelago commons
I didn't notice that this appeared several times on the command line after shutting down and restarting containers. It's not readily reproducible:
2020-08-28 16:35:46,291 [27249765]   WARN - ernallyAddedFilesProcessorImpl - Cannot find project config directory for non-default and non-directory based project archipelago-deployment 

Maybe a permissions issue? I see some odd user/group ids inside the archipelago-deployment directory and subdirectories.


Pat Dunlavey

unread,
Aug 28, 2020, 5:15:20 PM8/28/20
to archipelago commons
Some details on those odd permissions on the ubuntu host. Some things are my user (pat), others root, others 82 (not a user on the linux host):

pat@pdbd-popos:~/archipelago-deployment$ ll
total 564
drwxr-xr-x 14 pat  pat        4096 Aug 28 16:00 ./
drwxr-xr-x 23 pat  www-data   4096 Aug 28 15:23 ../
-rw-r--r--  1 pat  pat        4684 Aug 28 15:25 composer.json
-rw-r--r--  1 pat  pat      494893 Aug 28 15:25 composer.lock
drwxr-xr-x  3 pat  pat        4096 Aug 28 15:23 config/
drwxr-xr-x  2 pat  pat        4096 Aug 28 15:25 d8content/
-rw-r--r--  1 pat  pat        2404 Aug 28 15:25 docker-compose-nginx.yml
-rw-r--r--  1 pat  pat        2404 Aug 28 15:25 docker-compose.yml
drwxr-xr-x  2 pat  pat        4096 Aug 28 15:25 docs/
drwxr-xr-x  4 pat  pat        4096 Aug 28 15:23 drush/
drwxr-xr-x  8 pat  pat        4096 Aug 28 15:25 .git/
-rw-r--r--  1 pat  pat         582 Aug 28 15:25 .gitignore
drwxr-xr-x  2 pat  pat        4096 Aug 28 15:25 nginxconfigford8/
drwxr-xr-x  2 pat  pat        4096 Aug 28 15:25 patches/
drwxr-xr-x  8 pat  pat        4096 Aug 28 15:38 persistent/
drwxr-xr-x  2   82       82   4096 Aug 28 15:23 private/
-rw-r--r--  1 pat  pat        1642 Aug 28 15:25 README.md
drwxr-xr-x  4 pat  pat        4096 Aug 28 15:23 scripts/
drwxr-xr-x 76 root root       4096 Aug 28 16:06 vendor/
drwxr-xr-x  8 pat  pat        4096 Aug 28 16:06 web/
pat@pdbd-popos:~/archipelago-deployment$ ll web
total 84
drwxr-xr-x  8 pat  pat  4096 Aug 28 16:06 ./
drwxr-xr-x 14 pat  pat  4096 Aug 28 16:00 ../
-rw-r--r--  1 pat  pat   385 Aug 28 15:23 autoload.php
drwxr-xr-x 12 root root 4096 Aug 28 16:01 core/
-rw-r--r--  1 pat  pat  1025 Aug 28 15:23 .csslintrc
-rw-r--r--  1 pat  pat   151 Aug 28 15:23 .eslintignore
-rw-r--r--  1 pat  pat    41 Aug 28 15:23 .eslintrc.json
-rw-r--r--  1 pat  pat  3858 Aug 28 15:23 .gitattributes
-rw-r--r--  1 pat  pat  7866 Aug 28 15:25 .htaccess
-rw-r--r--  1 pat  pat  2314 Aug 28 15:23 .ht.router.php
-rw-r--r--  1 pat  pat   549 Aug 28 15:23 index.php
drwxr-xr-x  3 root root 4096 Aug 28 16:06 libraries/
drwxr-xr-x  3 root root 4096 Aug 28 16:02 modules/
drwxr-xr-x  3 pat  pat  4096 Aug 28 16:02 profiles/
-rw-r--r--  1 pat  pat  1594 Aug 28 15:23 robots.txt
drwxr-xr-x  3   82   82 4096 Aug 28 15:25 sites/
drwxr-xr-x  3 root root 4096 Aug 28 16:01 themes/
-rw-r--r--  1 pat  pat   848 Aug 28 15:23 update.php
-rw-r--r--  1 pat  pat  4555 Aug 28 15:25 web.config


Diego Pino

unread,
Aug 28, 2020, 5:40:40 PM8/28/20
to archipela...@googlegroups.com
Hi Path, happy to see you here!  Most of our life Archipelagos run on Ubuntu so it should not be an issue with that. Permissions should be Ok (as far as one can read on a Friday night) 

Gist is: check if your running the latest https://github.com/esmero/archipelago-deployment/blob/8.x-1.0-beta3/ versions and that every module there is up to sync with the composer.lock file provided. Error is happening on a line of code that patche/ updated 2 months ago. Do a git fetch, git pull and then again composer install.

Full explanation:

I feel there could be an issue with the strawberryfield/strawberryfield version that is being pulled there because line 251 is a as of now comment in the current beta3 version https://github.com/esmero/strawberryfield/blob/8.x-1.0-beta3/src/Plugin/StrawberryfieldKeyNameProvider/JsonldKeyNameProvider.php#L251 
There was in fact a 2 month old issue we fixed that when one of the remote sources was absent (maybe that schema.org file is the book one which was deprecated by google without any notice, so much for LoD availability) Archipelago failed and we also replaced it with a good one in the configs

That last error "ernallyAddedFilesProcessorImpl - Cannot find project config directory for non-default and non-directory based project " is an PhpStorm error, so probably not related at all

A few questions:

Are you running the latest archipelago-deploymen beta3? When was the last time you did a git pull? (or can you do a git pull again?). This can be my fault but archipelago does releases a little bit different than other projects. We create the release branch inbetween release and work there until the release. We give some time to test, patch again and when ready to move one we create the next one and work on that. So freezing happens when the next iteration starts, not when its published.

Also, can you check if this file https://github.com/esmero/archipelago-deployment/blob/8.x-1.0-beta3/config/sync/strawberryfield.strawberry_keynameprovider.schema_org.yml in your local deployment looks the same way as it looks in Github?
That is the config that pulls the remote URL that fails in like 251 (old code), in your error message the URL being pulled is from schema.org, which we replaced in our settings for a local github version.

So if line 251 is where things are failing and also that file is different, then maybe its just that you are a few committs behind.

Let me know if its just that or i need to dig deeper.

happy to help further and hope this is the actual issue and also the fix is as easy as that!! Did i say it makes me happy to see you here?

Cheers
Diego

Diego Pino

unread,
Sep 1, 2020, 9:53:45 AM9/1/20
to archipelago commons
Hi Pat, following up with you. Did you find the issue? Can jump into a call to give you a hand and help troubleshoot your deployment if you have not found a solution yet
PS: Also, so sorry, My Phone autocompleted Pat into Path last time and i was too tired to react on time , so sorry, its all because i type too many times JSON PATH or JMES Path all day long.

best

Diego

Diego Pino

unread,
Sep 9, 2020, 5:18:04 PM9/9/20
to archipelago commons
Hi, doing some housekeeping here. Hope all is well and silence is just some well deserved vacations or just too busy on other projects/life/world. Let me know (anytime) if you need any help with this

Best

Diego
Reply all
Reply to author
Forward
0 new messages