Closed guanchgonzalez closed 3 years ago
Have you activated this service?
/**
* Configuration file: Config\Api.
*/
class Api
{
/** List of active services. Available: dav, webservice */
public static $enabledServices = ['webservice'];
Yes, I did it:
[apache@clientes clientes]$ grep enabledServices config/Api.php public static $enabledServices = [ dav, webservices, webservice ]; [apache@clientes clientes]$
Maybe should be
public static $enabledServices = ['dav', 'webservices', 'webservice'];
Same failure after including the single quotations.
Hi @guanchgonzalez, try to remove 'webservices'
Same failure with these two different combinations:
Test 1: [apache@clientes clientes]$ grep enabledServices config/Api.php public static $enabledServices = ['webservice']; [apache@clientes clientes]$
Test 2: [apache@clientes clientes]$ grep enabledServices config/Api.php public static $enabledServices = [ 'dav', 'webservice' ]; [apache@clientes clientes]$
A new test, in /cache/logs/system.log:
2021-07-23 10:39:04 [warning] File not found: /var/www/clientesportal/public_html/layouts/Default/modules/Base/resources/Install.js
REQUEST = Array ( [module] => Install [view] => Install )
2021-07-23 10:39:38 [warning] File not found: /var/www/clientesportal/public_html/layouts/Default/modules/Base/resources/Install.js
REQUEST = Array ( [module] => Install [view] => Install [_csrf] => sid:c0aa3b7301f583f6cd5949a5e299cf4d534795a4,1627033144 [mode] => step2 [lang] => es-ES )
That's true, this file doesn't exists:
[apache@clientes clientesportal]$ ls -l /var/www/clientesportal/public_html/layouts/Default/modules/Base/resources/Install.js ls: no se puede acceder a /var/www/clientesportal/public_html/layouts/Default/modules/Base/resources/Install.js: No existe el fichero o el directorio [apache@clientes clientesportal]$ ls -l /var/www/clientesportal/public_html/layouts/Default/modules/Base/resources/ total 308 -rw-r--r-- 1 apache apache 1204 jul 14 09:32 Dashboard.js -rw-r--r-- 1 apache apache 2168 jul 14 09:32 Dashboard.min.js -rw-r--r-- 1 apache apache 2496 jul 14 09:32 Dashboard.min.js.map -rw-r--r-- 1 apache apache 1815 jul 14 09:32 DetailView.js -rw-r--r-- 1 apache apache 58 jul 14 09:32 DetailView.min.js -rw-r--r-- 1 apache apache 100 jul 14 09:32 DetailView.min.js.map -rw-r--r-- 1 apache apache 8141 jul 14 09:32 EditView.js -rw-r--r-- 1 apache apache 5161 jul 14 09:32 EditView.min.js -rw-r--r-- 1 apache apache 12835 jul 14 09:32 EditView.min.js.map -rw-r--r-- 1 apache apache 4690 jul 14 09:32 Header.js -rw-r--r-- 1 apache apache 3527 jul 14 09:32 Header.min.js -rw-r--r-- 1 apache apache 9444 jul 14 09:32 Header.min.js.map -rw-r--r-- 1 apache apache 4562 jul 14 09:32 ListView.js -rw-r--r-- 1 apache apache 2471 jul 14 09:32 ListView.min.js -rw-r--r-- 1 apache apache 4428 jul 14 09:32 ListView.min.js.map -rw-r--r-- 1 apache apache 1059 jul 14 09:32 PasswordChangeModal.js -rw-r--r-- 1 apache apache 1775 jul 14 09:32 PasswordChangeModal.min.js -rw-r--r-- 1 apache apache 2277 jul 14 09:32 PasswordChangeModal.min.js.map -rw-r--r-- 1 apache apache 1362 jul 14 09:32 Pdf.js -rw-r--r-- 1 apache apache 2171 jul 14 09:32 Pdf.min.js -rw-r--r-- 1 apache apache 2756 jul 14 09:32 Pdf.min.js.map -rw-r--r-- 1 apache apache 741 jul 14 09:32 QuickCreateModal.js -rw-r--r-- 1 apache apache 1527 jul 14 09:32 RecordList.min.js -rw-r--r-- 1 apache apache 3971 jul 14 09:32 RecordList.min.js.map -rw-r--r-- 1 apache apache 1703 jul 14 09:32 RecordListModal.js -rw-r--r-- 1 apache apache 2140 jul 14 09:32 RelatedListView.js drwxr-xr-x 2 apache apache 88 jul 14 09:32 Widget -rw-r--r-- 1 apache apache 41189 jul 14 09:32 Widgets.js -rw-r--r-- 1 apache apache 36065 jul 14 09:32 Widgets.min.js -rw-r--r-- 1 apache apache 83021 jul 14 09:32 Widgets.min.js.map [apache@clientes clientesportal]$
By the way, both Yetiforce CRM and YetiPortal are in their last stable versions:
[apache@clientes clientes]$ cat config/version.php <?php
return [ 'appVersion' => '6.2.0', 'patchVersion' => '2021.07.02', 'lib_roundcube' => '0.1.29', ]; [apache@clientes clientes]$
[apache@clientes clientesportal]$ cat config/Version.php <?php /**
namespace Conf;
/**
Turn on debugging, you'll probably find the answer there.
In the Portal web server, in /cache/logs/api.log:
[apache@clientes logs]$ cat api.log
-------------------------------------------------- 2021-07-23 11:44:18 -------------------------------------------------- Trace:
Method: [PUT] Install Headers: Array ( [User-Agent] => YetiForce Portal | Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 [X-Encrypted] => 0 [X-Api-Key] => 8d7wY38rBHsnuMrRS5Ujj1tvTbNtrTKX [Content-Type] => application/json [Accept] => application/json )
RawBody: Array ( [data] => Install Wizard )
Body: {"data":"Install Wizard"}
Status: 405 Reason phrase: Method Not Allowed Time: 0.32 sec. Error: Invalid response content type Accept:application/json <> text/html; charset=iso-8859-1 Headers: Array ( [Date] => Fri, 23 Jul 2021 10:44:18 GMT [Server] => Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips [Allow] => GET,HEAD,POST,OPTIONS,TRACE [Content-Length] => 235 [Content-Type] => text/html; charset=iso-8859-1 )
RawBody: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
The requested method PUT is not allowed for the URL /Portal/Install.
-------------------------------------------------- 2021-07-23 11:44:18 -------------------------------------------------- Trace:
Method: [PUT] Install Headers: Array ( [User-Agent] => YetiForce Portal | Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 [X-Encrypted] => 0 [X-Api-Key] => 8d7wY38rBHsnuMrRS5Ujj1tvTbNtrTKX [Content-Type] => application/json [Accept] => application/json )
RawBody: Array ( [data] => Install Wizard )
Body: {"data":"Install Wizard"}
Status: 405 Reason phrase: Method Not Allowed Time: 0.33 sec. Error: App\Exceptions\AppException: Invalid response content type in /var/www/clientesportal/app/Api.php:106 Stack trace:
Headers: Array ( [Date] => Fri, 23 Jul 2021 10:44:18 GMT [Server] => Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips [Allow] => GET,HEAD,POST,OPTIONS,TRACE [Content-Length] => 235 [Content-Type] => text/html; charset=iso-8859-1 )
RawBody: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
The requested method PUT is not allowed for the URL /Portal/Install.
REQUEST = Array ( [_csrf] => sid:e175351d82659dd3926e81a20745bc958b015a52,1627037019 [mode] => Step3 [lang] => es-ES [apiUrl] => https://clientes.talecsystem.com/ [apiKey] => 8d7wY38rBHsnuMrRS5Ujj1tvTbNtrTKX [serverName] => apiyeti [serverPass] => **** [module] => Install [action] => Install ) [apache@clientes logs]
How can I fix the 405 HTTP error?
I tried several ways to set the AllowMethods directive in the VirtualHost in Apache, but the CRM never get this configuration.
Environment | Version / Name |
---|---|
YetiForce | 6.2.0 |
Web server (name and version) | Apache/2.4.6 (CentOS) |
PHP | 7.3.29 |
Browser (name and version) | Google Chrome 92.0.4515.107 on Fedora 33 x86_64 |
Operating System (name and version) | CentOS Linux release 7.9.2009 (Core) |
Database (name and version) | 10.5.11-MariaDB Server |
Service Pack version | N/A |
And you have the same mismatch in your GitStable version of YetiForce CRM:
Do you have any update?
I updated the installation description and added debugging, attach all logs https://github.com/YetiForceCompany/YetiForcePortal2#-installation https://github.com/YetiForceCompany/YetiForcePortal2#-debug
All these step you added to the README.md are already done in our sandbox after you proposed them 10 days ago. As I told you, the same mismatch configuration exists in your GitStable version, My Home Page > Software Configuration > Logs > Server Configuration Do you have available the right configuration for an Apache deployment of the two Virtual Hosts, the CRM and the Portal? Or is a code issue?
you have a problem in apache configuration, look for something like this:
<Limit GET HEAD POST PUT DELETE OPTIONS>
# Deprecated apache 2.2 syntax:
# Order Allow,Deny
# Allow from all
# Apache > 2.4 requires:
Require all granted
</Limit>
AllowMethods GET HEAD POST PUT DELETE OPTIONS
https://www.google.com/search?q=the+requested+method+put+is+not+allowed+for+this+url+apache2
Firstible, we don't use the Limit directive, due is drepecated in last versions of Apache. Instead of we use "AllowMethods" directive:
<IfModule mod_ssl.c> <VirtualHost *:443> DocumentRoot /var/www/YetiForceCRM/public_html ServerName yetiforcecrm.talecsystem.com <Directory /var/www/YetiForceCRM/public_html> AllowMethods GET POST PUT OPTIONS PATCH PROPFIND REPORT LOCK DELETE COPY MOVE Require all granted AllowOverride All </Directory> ErrorLog /var/log/httpd/YetiForceCRM/error.log CustomLog /var/log/httpd/YetiForceCRM/access.log combined . . .
In the other hand, as we told you 7 days ago, you suffer the same issue in your demos.
If you check your access.log you can find several request respoonding with an 405 HTML errors for the same methods, while the rest of the request to other routes give a 200 OK response. You should inspect internally your code. The first failure appears during the YetiPortal2 Installation Wizard execution, but is not the only one.
The wizard has been tested several times and even on the server where the demo is available, and all the errors that were found have been fixed. Attach the full request (raw request) that gets a 405 error code
The raw request is available in our comment 11 days ago:
_In the Portal web server, in /cache/logs/api.log:
[apache@clientes logs]$ cat api.log
-------------------------------------------------- 2021-07-23 11:44:18 --------------------------------------------------_
The access.log:
[apache@clientes YetiForceCRM]$ grep PUT access.log | grep '" 40' 185.230.239.236 - - [27/Jul/2021:13:49:42 +0100] "PUT /Portal/Install HTTP/1.1" 405 235 "-" "YetiForce Portal | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" 185.230.239.236 - - [27/Jul/2021:14:20:47 +0100] "PUT /Portal/Install HTTP/1.1" 405 235 "-" "YetiForce Portal | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" [apache@clientes YetiForceCRM]$
[apache@clientes YetiForceCRM]$ grep PUT access.log | grep '" 20' 185.230.239.236 - - [27/Jul/2021:11:17:13 +0100] "PUT /token.php HTTP/1.1" 200 8 "-" "YetiForceCRM/6.2.24" 185.230.239.236 - - [27/Jul/2021:12:40:09 +0100] "PUT /token.php HTTP/1.1" 200 8 "-" "YetiForceCRM/6.2.24" . . . 185.230.239.236 - - [03/Aug/2021:09:06:02 +0100] "PUT /token.php HTTP/1.1" 200 8 "-" "YetiForceCRM/6.2.0" 185.230.239.236 - - [03/Aug/2021:09:06:03 +0100] "PUT /token.php HTTP/1.1" 200 8 "-" "YetiForceCRM/6.2.24" [apache@clientes YetiForceCRM]$
[apache@clientes YetiForceCRM]$ grep '" 40' access.log | egrep -v "PUT|HEAD" 185.230.239.194 - - [27/Jul/2021:13:04:37 +0100] "POST /index.php HTTP/1.1" 401 72 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" 185.230.239.236 - - [29/Jul/2021:09:56:27 +0100] "POST /Portal/Users/Login HTTP/1.1" 404 216 "-" "YetiForce Portal | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" 185.230.239.236 - apicrm [29/Jul/2021:10:54:08 +0100] "POST /webservice/Portal/Users/ResetPassword HTTP/1.1" 404 644 "-" "YetiForce Portal | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" 185.230.239.236 - apicrm [29/Jul/2021:11:00:02 +0100] "POST /webservice/Portal/Users/ResetPassword HTTP/1.1" 404 644 "-" "YetiForce Portal | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" . . . 91.218.65.239 - - [30/Jul/2021:14:45:46 +0100] "GET /db/index.php?lang=en HTTP/1.1" 404 210 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" 91.218.65.239 - - [30/Jul/2021:14:45:47 +0100] "GET /pma2017/index.php?lang=en HTTP/1.1" 404 215 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" . . . 141.98.83.139 - - [01/Aug/2021:10:47:27 +0100] "GET /owa/auth.owa HTTP/1.1" 404 210 "-" "Spider" 192.241.216.29 - - [01/Aug/2021:11:05:03 +0100] "GET /owa/auth/logon.aspx?url=https%3a%2f%2f1%2fecp%2f HTTP/1.1" 404 217 "-" "Mozilla/5.0 zgrab/0.x" 205.185.115.135 - - [01/Aug/2021:11:07:16 +0100] "POST /boaform/admin/formLogin HTTP/1.1" 404 221 "http://185.230.239.236:80/admin/login.asp" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0" . . . 45.146.164.110 - - [03/Aug/2021:04:42:29 +0100] "POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1" 404 248 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" 91.134.146.186 - - [03/Aug/2021:04:54:04 +0100] "GET //wp-includes/wlwmanifest.xml HTTP/1.1" 404 225 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" . . . [apache@clientes YetiForceCRM]$
The raw request is available in our comment 11 days ago:
no, this is not what a RAW request looks like see my example
PUT /webservice/Portal/Install HTTP/1.1
x-api-key: VMUwRByXHSq1bLW485ikfvcC97P6gJsz
Content-Type: application/json
x-token: a6ceaf8a37176c0b64d581ae49c61e22ef7d812afccba1b73dd6a0a95d2c8a86
Authorization: Basic cGFydG5lcjpwYXJ0bmVy
User-Agent: PostmanRuntime/7.28.2
Accept: */*
Cache-Control: no-cache
Host: yeti
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 25
{"data":"Install Wizard"}
HTTP/1.1 200 OK
Date: Tue, 03 Aug 2021 08:42:47 GMT
Server: Apache/2
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: no-referrer
Expect-CT: enforce; max-age=3600
X-Robots-Tag: none
Access-Control-Allow-Origin: *
Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, x-api-key, x-encrypted, x-token
Encrypted: 0
Content-disposition: attachment; filename="api.json"
Content-Length: 38
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json
{"status":1,"result":"Install Wizard"}
How can we generate a curl request simulating the Installation Wizard process?
e.g. Postman or another API client
see documentation https://doc.yetiforce.com/api/?urls.primaryName=Portal#/BaseAction/02a0b167fa2ba08237b79041d6c2eb40
curl -X 'PUT' \
'https://gitdeveloper.yetiforce.com/webservice/Portal/Install' \
-H 'accept: application/json' \
-H 'X-ENCRYPTED: 0' \
-H 'Authorization: Basic cG9ydGFsOnBvcnRhbA==' \
-H 'X-API-KEY: VMUwRByXHSq1bLW485ikfvcC97P6gJsz' \
-H 'Content-Type: application/json' \
-d '{"data":"Install Wizard"}'
Why this check fails in your own demo?
We requested you twice by email a budget to execute a CRM+Portal2 installation on premise in our sandbox to get a functional deployment ASAP. Can you help with this?
On this deployment we need to create contacts that can login into Customer Portal and access to its own account info: products, contracts, projects, documents, issues, etc.
We sent both emails to devs@yetiforce.com
Why this check fails in your own demo?
This is a bug in version 6.2 and has now been fixed https://github.com/YetiForceCompany/YetiForceCRM/commit/68045b233de085ebfeca1035aa8daff91739cdea
We requested you twice by email a budget to execute a CRM+Portal2 installation on premise in our sandbox to get a functional deployment ASAP. Can you help with this?
We have not received an email
We sent both emails to devs@yetiforce.com
This address is for other purposes You have the current data on the website https://yetiforce.com/en/company/contact
Hello, please send us an e-mail with a detailed description of your requirements (attach screenshots if necessary) and the ConfReport file downloaded from the system (System settings -> Logs -> Server configuration -> Download configuration). The correct e-mail address for questions and quotes is hello@yetiforce.com.
Please check your email.
Hello there, I have a related issue regarding yetiforce portal installation. when I try to install the portal it shows "An error occurred while communicating with the CRM"
I installed the latest version of yetiforce (6.20) and a portal which is available on the following link https://github.com/YetiForceCompany/YetiForcePortal2
my server is ubuntu 20.04 os.
please help. Thank you!
here is the screenshot of the above request.
Hi,
After creating the Portal type API webservice and the user to login, as you can see on the image below:
The installation wizard fails at the first step:
Where https://clientes.talecsystem.com is our testing CRM and https://clientesportal.talecsystem.com is our testing Portal2. Both are public domains and separate web server over the same Apache server in a sandbox machine.