CSWeb Server

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

CSWeb Server

Post 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
CSWeb.JPG (47.34 KiB) Viewed 10269 times
Thanks in advance.
Any comments are welcome.
Regards.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: CSWeb Server

Post 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.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSWeb Server

Post 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
Captura_1.JPG (21.34 KiB) Viewed 10239 times
But Now I get Another different error Message, and it´s the following:
Captura_2.JPG
Captura_2.JPG (96.57 KiB) Viewed 10239 times
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.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSWeb Server

Post 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.
savy
Posts: 162
Joined: December 27th, 2012, 1:36 pm

Re: CSWeb Server

Post 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.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSWeb Server

Post 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
Captura_3.JPG (39.1 KiB) Viewed 10210 times
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
Captura_5.JPG (52.88 KiB) Viewed 10210 times
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
Captura_4.JPG (29.31 KiB) Viewed 10210 times
Any comments about it are really welcome.
I really need to overcome this issues to keep promoting my survey projects.
Regards.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSWeb Server

Post 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
Captura_6.JPG (33.86 KiB) Viewed 10202 times
But on this step, when I enter my credentials to access the Web Server, again it happens the timeout error.
Captura_7.JPG
Captura_7.JPG (106.1 KiB) Viewed 10202 times
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.
savy
Posts: 162
Joined: December 27th, 2012, 1:36 pm

Re: CSWeb Server

Post 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;
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSWeb Server

Post 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.
savy
Posts: 162
Joined: December 27th, 2012, 1:36 pm

Re: CSWeb Server

Post 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
Post Reply