DOTCMS REST API Question

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

DOTCMS REST API Question

Henry Versemann

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: DOTCMS REST API Question

Jason Tesser-2

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something


On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: DOTCMS REST API Question

Mark Pitely
Henry,

It looks like it is trying to use port 8082. That would normally be firewalled, nor would dotCMS answer as normally configured. The API normally would only answer on 80 or 443.
onnection failed because connected host has failed to respond 52.6.25.245:8082

Mark Pitely
Marywood University

On Tue, Oct 10, 2017 at 6:04 PM, Jason Tesser <[hidden email]> wrote:

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something


On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqOEq%3DkjVTfh1m9FbUuLBavqoNYZ28AdXoEgnbUSzOpqKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: DOTCMS REST API Question

Henry Versemann

Mark,

 

Well that probably explains it, but I got that information from our backend’s content tab, as shown when I clicked “Show query” button. So after doing a search I used the query string shown in red underneath the line label below:

 

Rest API Call URLEncoded (Use this URL for external aplications or javascript on your page):

http://stchas.edu:8082/api/content/render/false/query/+contentType:Employees%20+Employees.firstName:*henr*%20+languageId:1%20+deleted:false%20+working:true/orderby/modDate%20desc

 

So you can see it gives the same port number that I’ve been trying to use and I just copied it and kept it in my query ever since believing it to be correct, as instructed in the line above itself.

 

So if that’s not a good port number to use then is that documented somewhere(it should maybe be on this page as well)? I ask because if that’s what my problem has been all along then by not explaining it better somewhere in the documentation, I have probably wasted several hours at least between last week Friday and yesterday, trying to get it to work using that port number.

 

I’ll try it with port 8080 or 443 if you think that that would be better to use.

 

Thanks for the help.

 

Henry

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Pitely
Sent: Wednesday, October 11, 2017 9:01 AM
To: [hidden email]
Subject: Re: [dotcms] DOTCMS REST API Question

 

Henry,

It looks like it is trying to use port 8082. That would normally be firewalled, nor would dotCMS answer as normally configured. The API normally would only answer on 80 or 443.

onnection failed because connected host has failed to respond 52.6.25.245:8082


Mark Pitely

Marywood University

 

On Tue, Oct 10, 2017 at 6:04 PM, Jason Tesser <[hidden email]> wrote:

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something

 

On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqOEq%3DkjVTfh1m9FbUuLBavqoNYZ28AdXoEgnbUSzOpqKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17003A38CF2F7D8564911F0AAD4A0%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: DOTCMS REST API Question

Jason Tesser-2
The port is configurable. What port do you connect to in your browser? 

On Wed, Oct 11, 2017 at 10:17 AM Henry Versemann <[hidden email]> wrote:

Mark,

 

Well that probably explains it, but I got that information from our backend’s content tab, as shown when I clicked “Show query” button. So after doing a search I used the query string shown in red underneath the line label below:

 

Rest API Call URLEncoded (Use this URL for external aplications or javascript on your page):

http://stchas.edu:8082/api/content/render/false/query/+contentType:Employees%20+Employees.firstName:*henr*%20+languageId:1%20+deleted:false%20+working:true/orderby/modDate%20desc

 

So you can see it gives the same port number that I’ve been trying to use and I just copied it and kept it in my query ever since believing it to be correct, as instructed in the line above itself.

 

So if that’s not a good port number to use then is that documented somewhere(it should maybe be on this page as well)? I ask because if that’s what my problem has been all along then by not explaining it better somewhere in the documentation, I have probably wasted several hours at least between last week Friday and yesterday, trying to get it to work using that port number.

 

I’ll try it with port 8080 or 443 if you think that that would be better to use.

 

Thanks for the help.

 

Henry

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Pitely
Sent: Wednesday, October 11, 2017 9:01 AM
To: [hidden email]
Subject: Re: [dotcms] DOTCMS REST API Question

 

Henry,

It looks like it is trying to use port 8082. That would normally be firewalled, nor would dotCMS answer as normally configured. The API normally would only answer on 80 or 443.

onnection failed because connected host has failed to respond 52.6.25.245:8082


Mark Pitely

Marywood University

 

On Tue, Oct 10, 2017 at 6:04 PM, Jason Tesser <[hidden email]> wrote:

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something

 

On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqOEq%3DkjVTfh1m9FbUuLBavqoNYZ28AdXoEgnbUSzOpqKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17003A38CF2F7D8564911F0AAD4A0%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GPc-_%3DFrDaoMZz%3D1sn%3D1WZYEoMs04X2K2pgQszYZPQ04g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: DOTCMS REST API Question

Mark Pitely
In reply to this post by Henry Versemann
Henry,

I said 'as normally configured' - perhaps your site runs on 8082 for some reason!
On your querying machine, make sure that it is allowed to communicate out on port 8082, if that is what your webserver works on.

Mark

On Wed, Oct 11, 2017 at 10:17 AM, Henry Versemann <[hidden email]> wrote:

Mark,

 

Well that probably explains it, but I got that information from our backend’s content tab, as shown when I clicked “Show query” button. So after doing a search I used the query string shown in red underneath the line label below:

 

Rest API Call URLEncoded (Use this URL for external aplications or javascript on your page):

http://stchas.edu:8082/api/content/render/false/query/+contentType:Employees%20+Employees.firstName:*henr*%20+languageId:1%20+deleted:false%20+working:true/orderby/modDate%20desc

 

So you can see it gives the same port number that I’ve been trying to use and I just copied it and kept it in my query ever since believing it to be correct, as instructed in the line above itself.

 

So if that’s not a good port number to use then is that documented somewhere(it should maybe be on this page as well)? I ask because if that’s what my problem has been all along then by not explaining it better somewhere in the documentation, I have probably wasted several hours at least between last week Friday and yesterday, trying to get it to work using that port number.

 

I’ll try it with port 8080 or 443 if you think that that would be better to use.

 

Thanks for the help.

 

Henry

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Pitely
Sent: Wednesday, October 11, 2017 9:01 AM
To: [hidden email]
Subject: Re: [dotcms] DOTCMS REST API Question

 

Henry,

It looks like it is trying to use port 8082. That would normally be firewalled, nor would dotCMS answer as normally configured. The API normally would only answer on 80 or 443.

onnection failed because connected host has failed to respond 52.6.25.245:8082


Mark Pitely

Marywood University

 

On Tue, Oct 10, 2017 at 6:04 PM, Jason Tesser <[hidden email]> wrote:

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something

 

On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqOEq%3DkjVTfh1m9FbUuLBavqoNYZ28AdXoEgnbUSzOpqKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17003A38CF2F7D8564911F0AAD4A0%40BLUPR0501MB1700.namprd05.prod.outlook.com.

For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqM-eayXCiU63NYmQEk9J9qD2stFP3JK%2BmTRiirsHFmVJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: DOTCMS REST API Question

Henry Versemann
In reply to this post by Jason Tesser-2

On my browser I don’t normally specify a port number ever and just take whatever the default is.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jason Tesser
Sent: Wednesday, October 11, 2017 9:22 AM
To: [hidden email]
Subject: Re: [dotcms] DOTCMS REST API Question

 

The port is configurable. What port do you connect to in your browser? 

 

On Wed, Oct 11, 2017 at 10:17 AM Henry Versemann <[hidden email]> wrote:

Mark,

 

Well that probably explains it, but I got that information from our backend’s content tab, as shown when I clicked “Show query” button. So after doing a search I used the query string shown in red underneath the line label below:

 

Rest API Call URLEncoded (Use this URL for external aplications or javascript on your page):

<a href="http://stchas.edu:8082/api/content/render/false/query/&#43;contentType:Employees%20&#43;Employees.firstName:*henr*%20&#43;languageId:1%20&#43;deleted:false%20&#43;working:true/orderby/modDate%20desc" target="_blank">http://stchas.edu:8082/api/content/render/false/query/+contentType:Employees%20+Employees.firstName:*henr*%20+languageId:1%20+deleted:false%20+working:true/orderby/modDate%20desc

 

So you can see it gives the same port number that I’ve been trying to use and I just copied it and kept it in my query ever since believing it to be correct, as instructed in the line above itself.

 

So if that’s not a good port number to use then is that documented somewhere(it should maybe be on this page as well)? I ask because if that’s what my problem has been all along then by not explaining it better somewhere in the documentation, I have probably wasted several hours at least between last week Friday and yesterday, trying to get it to work using that port number.

 

I’ll try it with port 8080 or 443 if you think that that would be better to use.

 

Thanks for the help.

 

Henry

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Pitely
Sent: Wednesday, October 11, 2017 9:01 AM
To: [hidden email]
Subject: Re: [dotcms] DOTCMS REST API Question

 

Henry,

It looks like it is trying to use port 8082. That would normally be firewalled, nor would dotCMS answer as normally configured. The API normally would only answer on 80 or 443.

onnection failed because connected host has failed to respond 52.6.25.245:8082


Mark Pitely

Marywood University

 

On Tue, Oct 10, 2017 at 6:04 PM, Jason Tesser <[hidden email]> wrote:

seems to be saying it couldn't connect to dotcms. you could check the access log on dotcms to see if the request came through but probably a routing issue or wrong ip or something

 

On Tue, Oct 10, 2017, 5:15 PM Henry Versemann <[hidden email]> wrote:

I’m getting the following exception in response to sending a PowerShell Invoke-WebRequest to our REST API:

 

Failed to get data from DOTCMS

EXCEPTION Response=null

Exception Status=ConnectFailure

RAW EXCEPTION=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party d

id not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.SetRequestContent(WebRequest request, String content)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

INNER EXCEPTION=System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or est

ablished connection failed because connected host has failed to respond 52.6.25.245:8082

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asy

ncResult, Exception& exception)

 

The Question is, is the problem on my end or on the DOTCMS end of things?

 

I’m using basic authorization with a valid account that was just created for me just for the express purpose of hitting REST API endpoints with it.

 

Thanks for the help.

 

Henry

 

 

 

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17001A7AA35D9B2144ACE97EAD750%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GNyQQ%2BSuMXuhXt1THW9%3DSOW8o0gCCTqR1B%2B2bJ9xK3rSg%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqOEq%3DkjVTfh1m9FbUuLBavqoNYZ28AdXoEgnbUSzOpqKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB17003A38CF2F7D8564911F0AAD4A0%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GPc-_%3DFrDaoMZz%3D1sn%3D1WZYEoMs04X2K2pgQszYZPQ04g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/BLUPR0501MB1700381E0337A8B55BA35571AD4A0%40BLUPR0501MB1700.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.