pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
867 stars 289 forks source link

Use baseUrl before calling action clear_cache_key #1403

Closed Madko closed 6 years ago

Madko commented 6 years ago

When calling indexing action using CLI, following error appears: Please enter the password:


Current User is 'admin'


Applying action 'index' on workspace Anonymous Samba Share (2ddbecd39691a01afbfab6e1aae7eec9) <?xml version="1.0" encoding="UTF-8"?>Indexation launched

PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] http://192.168.2.51/?get_action=clear_cache_key [status code] 404 [reason phrase] Not Found' in /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace:

0 /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))

1 /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')

2 /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))

3 /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))

4 /usr/share/pydio/core/vendor/react/promise/src/Fulfill in /usr/share/pydio/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89

Because baseUrl is not used.

With baseUrl detected and used, no more error and indexation works.

Best regards, Edouard

cdujeu commented 6 years ago

hey @Madko , thanks for submitting! Too bad we just release 8.0.2 without that fix. Do you know if it's specific to Samba workspace? Also can you kindly sign the CLA (if not already done)? See pydio.com > community > contribute Thanks!

Madko commented 6 years ago

I guess it's specific to any workspace using the cacheAbstract code. But I had this problem when using the CLI cmd.php. I can't see in the logs if it was present otherwise. I don't know if it fix the segfault problem, since I can't reproduce it on my samba test server. It only appears on a production server so it's not easy to debug. I will sign the CLA but it has no legal value in my country (just to let you know). Is that a problem ?

cdujeu commented 6 years ago

hi again - finally coming back on that one (you may have noticed we were focused on another project recently :-)) what i don't really understand in your code, is that the $client returned by getClient() should in fact already contain the base_url, as it is initialized with

            $this->httpClient = new Client([
                'base_url' => $baseUrl
            ]);

So i wonder if there could be a Guzzle version mismatch or something. Any idea?

Madko commented 6 years ago

Sorry but we switched to nextcloud, we had too much trouble to make pydio to run correctly. I can only confirm that the fix worked at the time, that's all.

Best regards, Edouard

cdujeu commented 6 years ago

ok ok, sad to see you go. Maybe at one point you can have a go on pydio/cells ? :-) Cheers

Madko commented 6 years ago

I've just tried pydio/cells but it seems that go.micro.client wants to grab stuff from internet (pydio.grpc.tasks), and since we are behind a proxy it doesn't seem to work. I'm starting to think that our production environment is incompatible with pydio software. But thanks for this pointer, I was not aware about pydio/cells.

cdujeu commented 6 years ago

actually it just needs a private IP address to work, it should not make any calls to the outside. Would be interested to see the log though :-)

Madko commented 6 years ago

Should I open a new issue for the log?

I also have other issues that are more documentary bugs, like the fact that $GOPATH is mandatory even if the path is the default one. Also git has to be installed. I also had to fix a path in the deps.sh script. Mariadb should at least supports FULLTEXT indexes. For my problem with pydio.grpc.tasks it's because it try to use $HTTP_PROXY to connect to itself (it seems). If I remove that env variable it doesn't occur anymore. Oh and the readme points to the wiki, for more installation instructions, but the wiki says it's deprecated. Maybe a wrong link, idk.

BTW I'm using CentOS7 environments. But the readme says that pydio/cells was developed and tested on this environment (among others).

cdujeu commented 6 years ago

If you can, please post that last one (w/ logs) in the pydio/cells repository, that would be nice, i'll comment out there.