Connect to local host failed

Hi Team,

I have run normal code as below:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">

	<robotics-flow>
		<robot driver="universal" close-on-completion="true"
			start-in-private="false">
			<capability name="SEARCH_ALL_WINDOWS" value="true" />
			<capability name="CLOSE_ALL_WINDOWS" value="false" />
			
		</robot>
	</robotics-flow>
	

</config>

I have come across the following error when i try to run above bot task.

14:21:52 [INFO] RoboticsFlowPlugin starts processing…
14:21:52 [INFO] SeleniumCapabilityPlugin starts processing…
14:21:52 [INFO] SeleniumCapabilityPlugin processor executed in 1ms.
14:21:52 [INFO] SeleniumCapabilityPlugin starts processing…
14:21:52 [INFO] SeleniumCapabilityPlugin processor executed in 0ms.
14:21:54 [WARN] [urn:uuid:69B7AA0F4F59F806B315687967120283] robotics-flow plugin execution exception : Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClientException: Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.executePost(RobotClient.java:169)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.access$200(RobotClient.java:150)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient.findAndLockNode(RobotClient.java:100)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:107)
at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.Scraper.execute(Scraper.java:169)
at org.webharvest.runtime.Scraper.execute(Scraper.java:182)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.processTaskInputs(SingleThreadWebHarvestProcess.java:77)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.start(SingleThreadWebHarvestProcess.java:46)
at com.workfusion.studio.launch.WebHarvestMainLauncher.launch(WebHarvestMainLauncher.java:108)
at com.workfusion.studio.launch.WebHarvestMainLauncher.main(WebHarvestMainLauncher.java:180)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.executePost(RobotClient.java:166)
… 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
… 23 more
14:21:56 [ERROR] Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClientException: Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.executePost(RobotClient.java:169)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.access$200(RobotClient.java:150)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient.unLockNode(RobotClient.java:85)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:123)
at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.Scraper.execute(Scraper.java:169)
at org.webharvest.runtime.Scraper.execute(Scraper.java:182)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.processTaskInputs(SingleThreadWebHarvestProcess.java:77)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.start(SingleThreadWebHarvestProcess.java:46)
at com.workfusion.studio.launch.WebHarvestMainLauncher.launch(WebHarvestMainLauncher.java:108)
at com.workfusion.studio.launch.WebHarvestMainLauncher.main(WebHarvestMainLauncher.java:180)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:15444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient$RequestProcessor.executePost(RobotClient.java:166)
… 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
… 23 more
14:21:56 [INFO] -------------------------------------------
14:21:56 [INFO] EXECUTION FAILED
14:21:56 [INFO] Connection refused: connect (sendmail.xml:4)
14:21:56 [INFO] -------------------------------------------

@ravikumar177 check that the server profile is populated and that the ports used by the app are open https://kb.workfusion.com/pages/viewpage.action?pageId=81396263#IntelligentAutomationCloudExpress/BusinessInstallation-Preconditions

Also, it is possible the node is hung. Restart the application and check that there are active bots in the Components tab.

1 Like

How do I check that the ports are open.
In components tab what should be active?

Hi @ravikumar177.
You should see number of bots: 1 in Components tab after restarting the application. As about opened ports it would be better to check with your local IT team.