How curl is connecting the plugin to the solr server ?
-
Hi,
I’m opening this thread after a discussion on the live chat on the site WPSOLR.
When I configure the WPSOLR plugin for the connection to the Solr server installed locally (localhost), I get a 502 error, with a statement about the proxy of my institution. This means that curl is trying to make a request outside of the local network and is blocked by the institution’s proxy.
Igor
-
Can you cURL your Solr with a query from your WP server ?
(WPSOLR uses cURL)
I’m not sure about the “WP server”. But when logged in, I can get the localhost:port/solr/#/ webpage with curl.
Can I see the full proxy error message ?
(remove sensitive parts)Sure :
“Solr HTTP error: OK (502)
Explanation: The Web server refused the connection.Try the following:
Refresh page: Search for the page again by clicking the Refresh button. The timeout could have occurred due to Internet congestion.
Check spelling: Check that the Web page address is spelled correctly. The address may have been mistyped.
Access from a link: If there is a link to the page you are looking for, try accessing the page from that link.
Contact website: You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page.If you are still not able to view the requested page, try contacting your administrator or Helpdesk.
Technical Information (for support personnel)
Error Code 10061: Connection refused
Background: The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.
Date: 12/9/2015 10:19:18 AM
Server: [domain name of our institutionnal proxy]
Source: Remote server(502)”
And the I have the same message, but in html format :
Solr HTTP error: OK (502) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Error Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=UTF-8"> <STYLE id=L_10061_1>A { FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #005a80; FONT-FAMILY: tahoma } A:hover { FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #0d3372; FONT-FAMILY: tahoma } TD { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } TD.titleBorder { BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LEFT: #955319 0px solid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left } TD.titleBorder_x { BORDER-RIGHT: #955319 0px solid; BORDER-TOP: #955319 1px solid; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LEFT: #955319 1px solid; COLOR: #978c79; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left } .TitleDescription { FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: tahoma } SPAN.explain { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225 } SPAN.TryThings { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225 } .TryList { MARGIN-TOP: 5px; FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: tahoma } .X { BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid; COLOR: #7b3807; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #d1c2b4 } .adminList { MARGIN-TOP: 2px } </STYLE> <META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD> <BODY bgColor=#f3f3ed> <TABLE cellSpacing=0 cellPadding=0 width="100%"> <TBODY> <TR> <TD class=titleborder_x width=30> <TABLE height=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black> <TBODY> <TR> <TD class=x vAlign=center align=middle>X</TD> </TR> </TBODY> </TABLE> </TD> <TD class=titleBorder id=L_10061_2>Network Access Message:<SPAN class=TitleDescription> The page cannot be displayed</SPAN> </TD> </TR> </TBODY> </TABLE> <TABLE id=spacer> <TBODY> <TR> <TD height=10></TD></TR></TBODY></TABLE> <TABLE width=400> <TBODY> <TR> <TD noWrap width=25></TD> <TD width=400><SPAN class=explain><ID id=L_10061_3><B>Explanation:</B></ID></SPAN><ID id=L_10061_4> The Web server refused the connection. </ID><BR><BR> <B><SPAN class=tryThings><ID id=L_10061_5><B>Try the following:</B></ID></SPAN></B> <UL class=TryList> <LI id=L_10061_6><B>Refresh page:</B> Search for the page again by clicking the Refresh button. The timeout could have occurred due to Internet congestion. <LI id=L_10061_7><B>Check spelling:</B> Check that the Web page address is spelled correctly. The address may have been mistyped. <LI id=L_10061_8><B>Access from a link:</B> If there is a link to the page you are looking for, try accessing the page from that link. <LI id=L_10061_9><B>Contact website:</B> You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page. </UL> <ID id=L_10061_10>If you are still not able to view the requested page, try contacting your administrator or Helpdesk.</ID> <BR><BR> </TD> </TR> </TBODY> </TABLE> <TABLE id=spacer><TBODY><TR><TD height=15></TD></TR></TBODY></TABLE> <TABLE width=400> <TBODY> <TR> <TD noWrap width=25></TD> <TD width=400 id=L_10061_11><B>Technical Information (for support personnel)</B> <UL class=adminList> <LI id=L_10061_12>Error Code 10061: Connection refused <LI id=L_10061_13>Background: The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server. <LI id=L_10061_14>Date: 12/9/2015 10:19:18 AM <LI id=L_10061_15>Server: [domain name of our institutionnal proxy] <LI id=L_10061_16>Source: Remote server </UL> </TD> </TR> </TBODY> </TABLE> </BODY> </HTML> 0
Sure :
“Solr HTTP error: OK (502)
Explanation: The Web server refused the connection.Try the following:
Refresh page: Search for the page again by clicking the Refresh button. The timeout could have occurred due to Internet congestion.
Check spelling: Check that the Web page address is spelled correctly. The address may have been mistyped.
Access from a link: If there is a link to the page you are looking for, try accessing the page from that link.
Contact website: You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page.If you are still not able to view the requested page, try contacting your administrator or Helpdesk.
Technical Information (for support personnel)
Error Code 10061: Connection refused
Background: The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.
Date: 12/9/2015 10:19:18 AM
Server: [domain name of our institutionnal proxy]
Source: Remote server(502)”
And the I have the same message, but in html format.
can you show me your wpsolr index configuration ?
In
wp-admin/admin.php?page=solr_settings
I’ve put :Index name : collection1
Solr Protocol : http
Solr Host : localhost
Solr Port : 8926 [or 9026]
Solr Path : /solr/collection1Is your cURL is ok from the server (ssh) ?
curl "https://localhost:8926/solr/collection1/select?q=*:*"
I have an answer which seems ok, as long as nothing is yet indexed.
Can you replace ‘/solr/collection1’ by ‘/solr/collectionx’ in WPSOLR ?
What is the error now ?
The same error.
Can you launch your Solr on a ‘standard’ port ? (80, 443)
This is a usual pb that arise with hosted servers, non standard ports are blocked.
It’s not an hosted server, the server is run by our IT. Theses ports are open on the server and are accessible locally.
But it’s fairly possible that the problem comes from our infrastructure. I think that we have to find it out here.
As soon as we have an answer, I will tell you.
fine
Finally we were able to make it work, but we had to open on the Internet the ports that we wanted to use, and to configure the plugin with the domain name of the server, not “localhost”.
It strange, I think, as long as the WordPress installation and the Solr installation are on the same machine.
- The topic ‘How curl is connecting the plugin to the solr server ?’ is closed to new replies.