Page 1 of 2

CSWeb Server

Posted: July 11th, 2017, 6:16 pm
by jfigueroa
Hi everyone,

Hope you are going great.
The reason I write to you, is because I am trying to configure CSWeb server on a Windows Server Machine.
I already installed IIS, PHP and MySQL but when I am on configuration step and click next, I get this error message:

" Failed to contact API server http://localhost/csweb/api/ : Server error: `POST http://localhost/csweb/api/token` resulted in a `500 Internal Server Error` response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xml (truncated...) "

Any advice of what could be happening?
CSWeb.JPG
Thanks in advance.
Any comments are welcome.
Regards.

Re: CSWeb Server

Posted: July 18th, 2017, 6:44 am
by josh
Do you see full error message in the log files? I don't see enough of the error from the screen shot to see the problem.

Re: CSWeb Server

Posted: July 18th, 2017, 11:36 am
by jfigueroa
Hi Josh,

Thank you so much for your reply. The thing is that there is no log files when this error happens.
What I have done is that, I have installed the URL Rewrite Module on my IIS Server, because it was missing that step.
Captura_1.JPG
But Now I get Another different error Message, and it´s the following:
Captura_2.JPG
When I click Next on the configuration steps, the server stays like waitting, and then past a minute displays this error.
And the strange thing is that there is no log files.

Any comment about it is very appreciated.
Regards to you and all CSPro Team.

Re: CSWeb Server

Posted: July 18th, 2017, 5:59 pm
by jfigueroa
If it helps to figure out what is happening,
The configuration process creates the DataBase, but by some reason, it doesn´t finish the CSWeb Server Configuration, and just keeps waitting, then, when the timeout reaches, it displays the error I shown.

Re: CSWeb Server

Posted: July 18th, 2017, 6:33 pm
by savy
Did you do this step in the iis configuration?
Handle Additional Verbs
In the IIS Manager select the Features View and then double click Handler Mappings. Right-click on PHP_via_FastCGI and select edit. Click Request
Restrictions..., select the Verbs tab, select One of the following verbs and enter GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS. You may then be
prompted to double quote the path under Executable.

Re: CSWeb Server

Posted: July 19th, 2017, 10:42 am
by jfigueroa
Dear savy,

Thank you so much for your reply.
I have already done the step of adding the aditional verbs at Handler Mappings,
Captura_3.JPG
But the timeout error is still happening.

As I said before, the strange thing is that the configuration step, creates my database, but by some reason, it doesn´t finish the configuration process. It just keeps waitting for host to respond and then occurs the timeout error.
Captura_5.JPG
The other strange thing is that there is no log files on the log folder.
If it helps, my server is a Windows Server 2012
Captura_4.JPG
Any comments about it are really welcome.
I really need to overcome this issues to keep promoting my survey projects.
Regards.

Re: CSWeb Server

Posted: July 19th, 2017, 12:08 pm
by jfigueroa
Dear CSPro Team,

There is more strange things related to this. I have tried to configure the CSWeb Server, but this time with the CSWeb version from "CSWeb_20170105" this was one of the betas you posted on that date.
With this beta, it finishes all the configuration process.
Captura_6.JPG
But on this step, when I enter my credentials to access the Web Server, again it happens the timeout error.
Captura_7.JPG
This time since it finishes all the configuration process, now there is log files, and their content is as follows:
api.log file:

Code: Select all

[2017-07-19 16:21:02] CSPro API.INFO: Matched route "POST_token". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"POST_token"},"request_uri":"http://localhost/cspro-rest-api/api/token"} []
[2017-07-19 16:21:03] CSPro API.INFO: > POST /cspro-rest-api/api/token [] []
[2017-07-19 16:21:03] CSPro API.INFO: < 200 [] []
[2017-07-19 16:46:02] CSPro API.INFO: Matched route "POST_token". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"POST_token"},"request_uri":"http://localhost/cspro-rest-api/api/token"} []
[2017-07-19 16:46:02] CSPro API.INFO: > POST /cspro-rest-api/api/token [] []
[2017-07-19 16:46:03] CSPro API.INFO: < 200 [] []
ui.log file:

Code: Select all

[2017-07-19 16:06:35] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2017-07-19 16:07:21] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2017-07-19 16:07:34] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"http://localhost/cspro-rest-api/ui/login_check"} []
[2017-07-19 16:30:26] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2017-07-19 16:31:18] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"http://localhost/cspro-rest-api/ui/login_check"} []
[2017-07-19 16:46:03] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://34.226.72.119/cspro-rest-api/ui/"} []
[2017-07-19 16:47:20] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://34.226.72.119/cspro-rest-api/ui/"} []
[2017-07-19 16:52:19] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://34.226.72.119/cspro-rest-api/ui/"} []
As I said, this time I tried with the CSWeb Server Beta 20170105 which finishes all the config process, but when I login, the timeout error occurs again.

Again, any comments about it are really welcome.
Thank you so much for your time and attention.
Regards.

Re: CSWeb Server

Posted: July 19th, 2017, 12:52 pm
by savy
There seems to be a bug related to fastcgi with Php7 and Windows 2012 R2
Check if this links help you in resolving this problem
https://stackoverflow.com/questions/394 ... 7-0-9?rq=1

Please use the latest released csweb code and not the older beta version. If you want to change the loglevel to give more detail , change the line in the file csweb\src\api\app\app.php which says
$logLevel = Monolog\Logger::ERROR; to $logLevel = Monolog\Logger::DEBUG;

Re: CSWeb Server

Posted: July 19th, 2017, 4:29 pm
by jfigueroa
Thank you so much for your reply savy.
I have tried to install the update that you suggested and it seems that my system already had it.
So I have changed the log configuration that you suggested, and now I have log files during configuration process.
There is only the api.log file and it´s content is as follows:

Code: Select all

[2017-07-19 19:51:45] CSPro API.INFO: Matched route "POST_token". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"POST_token"},"request_uri":"http://localhost/csweb/api/token"} []
[2017-07-19 19:51:45] CSPro API.INFO: > POST /csweb/api/token [] []
[2017-07-19 19:51:46] CSPro API.INFO: < 200 [] []
Now I´m using the released CSWeb code.
Any comments about it are welcome.
Regards to everyone.

Re: CSWeb Server

Posted: July 19th, 2017, 4:50 pm
by savy
To get the logs for UI you need to do the same change to the loglevel in csweb\src\ui\src\app.php.
However, I see from your previous log files that the problem is not related to csweb but to do with fast cgi and windows 2012
Here is another issue related to this that might work
https://stackoverflow.com/questions/149 ... ty-timeout