I opened a ticket with DotNetBrowser, but they will be at the office on Monday, hoping I can get some expert opnion on this from you guys.
I want to start DotNetBrowser with the chromium switches, but it is not working for me.
UPDATE #1:
My application is Console (not windows forms), Here is my full code
'Some kind of static class to hold some objects globally
Module GlobalObjects
Public browserwindobj As BrowserWindow
Public ChromeUserProfilePath as String
End Module
'Main Module
<STAThread>
Public Sub Main(args() As String)
GlobalObjects.browserwindobj= New BrowserWindow()
GlobalObjects.browserwindobj.BeginSession()
End Sub
'Browser Window Class
Public Class BrowserWindow
Dim WithEvents wb As Browser
Dim m_browsercontext As BrowserContext
Dim WithEvents NetworkDelegateObj As DelegateNetworking
Sub BeginSession()
Start.AddUILog("Starting session...")
Start.DelayCloser()
CreateBrowser()
NavigateToURL()
m_sessionstatus = TimerState.Running
End Sub
Private Sub CreateBrowser()
Try
Start.AddUILog("Creating internal browser...")
BrowserPreferences.SetUserAgent("UserAgent_HERE")
Dim chrmswitches As New List(Of String)
chrmswitches.Add("--disable-web-security")
chrmswitches.Add("--reduce-security-for-testing")
chrmswitches.Add("--allow-running-insecure-content")
chrmswitches.Add("--ignore-certificate-errors")
chrmswitches.Add("--unsafe-pac-url")
chrmswitches.Add("--no-sandbox")
GlobalObjects.ChromeUserProfilePath = modGeneral.softwarePath & "\_temp\" & modGeneral.GenerateID("Profile ", True)
Dim contextparam As New BrowserContextParams(ChromeUserProfilePath)
If GlobalObjects.SettingsObj.EnableProxies = True Then
contextparam.ProxyConfig = New URLProxyConfig("http://PAC_FILE_URL")
Else
Start.AddUILog("Proxies usage is disabled by the user")
End If
Dim context As New BrowserContext(contextparam)
context.NetworkService.ResourceHandler = New DelegateAjax
context.NetworkService.CertificateVerifier = New DelegateCertificateVerifier
NetworkDelegateObj = New DelegateNetworking()
context.NetworkService.NetworkDelegate = NetworkDelegateObj
m_browsercontext = context
If GlobalObjects.SettingsObj.CPUBased = True Then
chrmswitches.Add("--disable-gpu")
chrmswitches.Add("--disable-gpu-compositing")
chrmswitches.Add("--enable-begin-frame-scheduling")
chrmswitches.Add("--software-rendering-fps=60")
BrowserPreferences.SetChromiumSwitches(chrmswitches.ToArray)
wb = BrowserFactory.Create(context, BrowserType.LIGHTWEIGHT)
Else
BrowserPreferences.SetChromiumSwitches(chrmswitches.ToArray)
wb = BrowserFactory.Create(context, BrowserType.HEAVYWEIGHT)
End If
wb.Preferences.AllowDisplayingInsecureContent = True
wb.Preferences.AllowRunningInsecureContent = True
wb.Preferences.PluginsEnabled = True
wb.Preferences.WebAudioEnabled = True
wb.Preferences.WebRTCIPHandlingPolicy = BrowserPreferences.WebRTCIPHandlingPolicyEnum.DisableNonProxiedUdp
wb.Preferences.DatabasesEnabled = True
mous = New MouseControler(wb)
Catch ex As Exception
Start.AddUILog("Create Browser: " & ex.Message)
Process.GetCurrentProcess.Kill()
End Try
End Sub
End Class
Update #2
Here is the DotNetBrowser Logs:
4/21/2018 5:57:08 PM Information Browser - OS name: Microsoft Windows Server 2016 Standard Evaluation []
4/21/2018 5:57:08 PM Information Browser - OS version: 10.0.14393 []
4/21/2018 5:57:08 PM Information Browser - DotNetBrowser build: 1.14.2.0 []
4/21/2018 5:57:08 PM Information Browser - Verifying Chromium binaries... []
4/21/2018 5:57:08 PM Information Browser - Chromium binaries are OK. []
4/21/2018 5:57:08 PM Information IPC - Starting IPC... []
4/21/2018 5:57:08 PM Information IPC - Starting IPC Server... []
4/21/2018 5:57:08 PM Information IPC - Starting IPC Process... []
4/21/2018 5:57:08 PM Information Process - Start Chromium process... [IPC Process Thread]
4/21/2018 5:57:08 PM Information Process - Command line: C:\Users\Administrator\AppData\Local\Temp\2\dotnetbrowser-chromium\60.0.3112.113.1.14.2.0.523c\browsercore32.exe"--port=61259" "--no-sandbox" "--pid=8172" "--crash-dump-dir=C:\Users\Administrator\AppData\Roaming\DotNetBrowser\dotnetbrowser.dmp.dir" "--user-agent=Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MALCJS; rv:11.0) like Gecko" "--disable-surfaces" "--noerrdialogs" "--enable-logging" "--disable-web-security" "--reduce-security-for-testing" "--unsafe-pac-url" "--disable-gpu" "--disable-gpu-compositing" "--enable-begin-frame-scheduling" "--software-rendering-fps=60" [IPC Process Thread]
4/21/2018 2:57:08 PM Information IPC - Shared Memory Name: 7e8897cf-0d60-45fa-9411-da1ab3467321 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - Creating IPC connection. Connection ID: 0 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - IPC connection has been established. Connection ID: 17099024 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - READ: OnHelloMessage{type=OnHelloMessage, uid=1, message='cid:0,type:Main'}, []
4/21/2018 2:57:08 PM Information IPC - WRITE: SetNetworkDelegateConfigMessage{type=SetNetworkDelegateConfig, uid=0, browserContextId=0, DisableMessages=False, DisableResourceMessages=False}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - IPC is started. []
4/21/2018 2:57:08 PM Information IPC - WRITE: SetAuthServerWhiteListMessage{type=SetAuthServerWhiteList, uid=1, BrowserContextId=0, ServerWhiteList=, DelegateWhiteList=}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - Socket connection checker started for [Socket Connection Checker SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - WRITE: CreateBrowserMessage{type=CreateBrowser, uid=2, channelId=0, contextId=0, cacheDir='C:\Users\Administrator\AppData\Roaming\LKBrowser\_temp\Profile 21417577722\Cache', memoryDir='', dataDir='C:\Users\Administrator\AppData\Roaming\LKBrowser\_temp\Profile 21417577722', currentLocale='en-us', proxyType=2, proxyRules='', proxyBypassRules='', proxyAutoConfigURL='http://PACFILEURL_OMITTED', defaultZoomLevel='0', isOffScreenMode='True', storageType='DISK}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - READ: OnNetworkDelegateReadyMessage{type=OnNetworkDelegateReady, uid=2, browserContextId=0}, SocketInfo{channelId=0, browserId=-1, channelType=Main} []
4/21/2018 2:57:08 PM Information IPC - WRITE: SetNetworkDelegateConfigMessage{type=SetNetworkDelegateConfig, uid=3, browserContextId=0, DisableMessages=False, DisableResourceMessages=False}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - Shared Memory Name: 2747a61b-8340-42d3-950a-f88e01c4c4e8 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - Creating IPC connection. Connection ID: 0 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - WRITE: SetAuthServerWhiteListMessage{type=SetAuthServerWhiteList, uid=4, BrowserContextId=0, ServerWhiteList=, DelegateWhiteList=}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - READ: OnNetworkDelegateReadyMessage{type=OnNetworkDelegateReady, uid=3, browserContextId=0}, SocketInfo{channelId=0, browserId=-1, channelType=Main} []
4/21/2018 2:57:08 PM Information IPC - WRITE: SetNetworkDelegateConfigMessage{type=SetNetworkDelegateConfig, uid=5, browserContextId=0, DisableMessages=False, DisableResourceMessages=False}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - WRITE: SetAuthServerWhiteListMessage{type=SetAuthServerWhiteList, uid=6, BrowserContextId=0, ServerWhiteList=, DelegateWhiteList=}, SocketInfo{channelId=0, browserId=-1, channelType=Main} [Memory Writer SocketInfo{channelId=0, browserId=-1, channelType=Main}]
4/21/2018 2:57:08 PM Information IPC - IPC connection has been established. Connection ID: 17100944 [IPC Server Thread]
4/21/2018 2:57:08 PM Information IPC - READ: OnHelloMessage{type=OnHelloMessage, uid=4, message='cid:0,bid:0,type:Browser'}, []
4/21/2018 2:57:08 PM Information IPC - Channel is connected: SocketInfo{channelId=0, browserId=0, channelType=Browser} []
4/21/2018 2:57:08 PM Information IPC - Socket connection checker started for [Socket Connection Checker SocketInfo{channelId=0, browserId=0, channelType=Browser}]
4/21/2018 2:57:08 PM Information IPC - READ:
OnBeforeSendHeadersMessage{type=OnBeforeSendHeaders, uid=5, browserContextId=0, RequestId=1, url=PACURL_OMITTED, method=GET, originalHeaders='User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MALCJS; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Accept-Language: en-us
', overrideHeaders='', renderProcessId=-1, renderFrameId=-1}, SocketInfo{channelId=0, browserId=-1, channelType=Main} []
4/21/2018 2:57:08 PM Information IPC - WRITE: OnBeforeSendHeadersMessage{type=OnBeforeSendHeaders, uid=5, browserContextId=0, RequestId=1, url=PACURL_OMITTED, method=GET, originalHeaders='User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MALCJS; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Accept-Language: en-us
I took all the switches in the log and ran them aganist chrome.exe manually using cmd, and the switches did work (had to add space before the --port switch)
I then also using cmd, tested the switches aganist the browsercore32.exe but I got a cmd error saying that I need to add space before --port, once I added that space, the browsercore process starts.
I was wondering, is the problem is with this line:
4/21/2018 5:57:08 PM Information Process - Command line: C:\Users\Administrator\AppData\Local\Temp\2\dotnetbrowser-chromium\60.0.3112.113.1.14.2.0.523c\browsercore32.exe"--port=61259" "--no-sandbox" "--pid=8172" "--crash-dump-dir=C:\Users\Administrator\AppData\Roaming\DotNetBrowser\dotnetbrowser.dmp.dir" "--user-agent=Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MALCJS; rv:11.0) like Gecko" "--disable-surfaces" "--noerrdialogs" "--enable-logging" "--disable-web-security" "--reduce-security-for-testing" "--unsafe-pac-url" "--disable-gpu" "--disable-gpu-compositing" "--enable-begin-frame-scheduling" "--software-rendering-fps=60" [IPC Process Thread]
The "--port is right after the .exe without a space separating them.
So shouldn't it be browsercore32.exe" --port=61259"
Well, that's the only thing I see why switches are not being read.
Anyway, maybe it's something else I am missing totally.
Update #3:
Chromium logs contain only this:
[0421/191430.232:ERROR:command_processor.cpp(337)] IPC: unhandled callback with ID=568
[0421/191430.299:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown.
[0421/191430.299:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown.
[0421/191430.314:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown.
[0421/191430.314:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown.
Also if I ran --unsafe-pac-url using cmd aganist chrome.exe, it works perfectly fine.
Related
I am using testcontainers in a spring boot project (version : 1.17.2) and I am trying to spin up a rabbitmq container. It seems like rabbitmq container starts up successfully, but it releases connection as soon as it is up.
I can see some error in logs but after that I can see that the test container is started. I am kind of flummoxed as to why am I seeing this error and/or if the container is started or not ?
Pasting excerpt from logs :
15:00:44.007 [main] DEBUG org.testcontainers.containers.output.WaitingConsumer - STDOUT: 2022-06-29 05:00:24.477316+00:00 [info] <0.703.0> * rabbitmq_management_agent
15:00:44.007 [main] DEBUG org.testcontainers.containers.output.WaitingConsumer - STDOUT: 2022-06-29 05:00:24.477316+00:00 [info] <0.703.0> * rabbitmq_web_dispatch
15:00:44.007 [main] DEBUG org.testcontainers.containers.output.WaitingConsumer - STDOUT: 2022-06-29 05:00:24.477316+00:00 [info] <0.703.0> * rabbitmq_management
15:00:44.007 [main] DEBUG org.testcontainers.containers.output.WaitingConsumer - STDOUT: 2022-06-29 05:00:24.477316+00:00 [info] <0.703.0> * rabbitmq_prometheus
15:00:44.007 [main] DEBUG org.testcontainers.containers.output.WaitingConsumer - STDOUT: 2022-06-29 05:00:24.477316+00:00 [info] <0.703.0> Server startup complete; 4 plugins started.
15:00:44.007 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000C: cancel
15:00:44.007 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnection - http-outgoing-1: close connection IMMEDIATE
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000C: endpoint closed
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000C: discarding endpoint
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000C: releasing endpoint
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000C: connection is not kept alive
15:00:44.008 [docker-java-stream--540868428] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-1 << "end of stream"
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000C: connection released [route: {}->npipe://localhost:2375][total available: 0; route allocated: 0 of 2147483647; total allocated: 0 of 2147483647]
15:00:44.008 [main] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-1 << "[read] I/O error: java.nio.channels.ClosedChannelException"
15:00:44.008 [docker-java-stream--540868428] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-1 << "[read] I/O error: java.nio.channels.ClosedChannelException"
15:00:44.008 [docker-java-stream--540868428] DEBUG com.github.dockerjava.zerodep.ApacheDockerHttpClientImpl$ApacheResponse - Failed to close the response
java.io.IOException: java.nio.channels.ClosedChannelException
at java.base/java.nio.channels.Channels$2.read(Channels.java:240)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.io.LoggingInputStream.read(LoggingInputStream.java:81)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:149)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:261)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:222)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:147)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:314)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.io.Closer.close(Closer.java:48)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.impl.io.IncomingHttpEntity.close(IncomingHttpEntity.java:111)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.io.entity.HttpEntityWrapper.close(HttpEntityWrapper.java:120)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.io.Closer.close(Closer.java:48)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.message.BasicClassicHttpResponse.close(BasicClassicHttpResponse.java:93)
at com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpResponse.close(CloseableHttpResponse.java:200)
at com.github.dockerjava.zerodep.ApacheDockerHttpClientImpl$ApacheResponse.close(ApacheDockerHttpClientImpl.java:256)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:277)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.channels.ClosedChannelException: null
....................................
15:00:44.009 [main] INFO 🐳 [rabbitmq:3.9.13-management-alpine] - Container rabbitmq:3.9.13-management-alpine started in PT7.8752359S
Config Java :
public abstract class RabbitMqTestContainerConfiguration {
private static final int RABBITMQ_DEFAULT_PORT = 5672;
#Container
public static RabbitMQContainer rabbitMQContainer = new RabbitMQContainer("rabbitmq:3.9.13-management-alpine")
.withExposedPorts(RABBITMQ_DEFAULT_PORT).withStartupTimeout(Duration.ofMinutes(3));
public static class Initializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
#Override
public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(configurableApplicationContext,
"spring.rabbitmq.host=" + rabbitMQContainer.getHost(),
"spring.rabbitmq.port=" + rabbitMQContainer.getMappedPort(RABBITMQ_DEFAULT_PORT),
"spring.rabbitmq.username=" + rabbitMQContainer.getAdminUsername(),
"spring.rabbitmq.password=" + rabbitMQContainer.getAdminPassword());
}
}
} ```
I’m using Apache’s PLC4X library in order to read some tags from an Allen Bradley’s Micro820 PLC (2080-LC20-20QWB). So far, I am able to establish a connection with the device but when I try to execute a read request I’m getting the error shown in the stack trace bellow.
I’m running a Java maven based project with the following dependencies:
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-api</artifactId>
<version>0.9.1</version>
</dependency>
<!-- Ethernet / IP driver -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-eip</artifactId>
<version>0.9.1</version>
</dependency>
This is the code I'm running on a Ubuntu 18.04 width JDK 11
package com.example.plctest;
import org.apache.plc4x.java.PlcDriverManager;
import org.apache.plc4x.java.api.PlcConnection;
import org.apache.plc4x.java.api.messages.PlcReadRequest;
import org.apache.plc4x.java.api.messages.PlcReadResponse;
import org.apache.plc4x.java.eip.readwrite.field.EipField;
import org.apache.plc4x.java.eip.readwrite.types.CIPDataTypeCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ReadPlcDemo {
private static final Logger LOGGER = LoggerFactory.getLogger(ReadPlcDemo.class);
private static String connectionString = "eip://192.168.1.100?backplane=0&slot=0";
public static void main(String[] args) {
// Establish a connection with the PLC
try (PlcConnection connection = new PlcDriverManager().getConnection(connectionString)) {
if (connection.getMetadata().canRead()) {
LOGGER.info("PLC can read!");
}
// Create the read request
EipField field = new EipField("Sensor1", CIPDataTypeCode.BOOL);
// EipField field = new EipField("Sensor2", CIPDataTypeCode.SINT);
// EipField field = new EipField("Sensor3", CIPDataTypeCode.SINT);
PlcReadRequest.Builder builder = connection.readRequestBuilder();
builder.addItem("value-" + field.getTag(), field);
PlcReadRequest readRequest = builder.build();
// Execute the request
PlcReadResponse response;
try {
response = readRequest.execute().get();
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
This is the result from my stack trace, I set the log level to 'trace' in order to get a better insight of what's going on:
/home/ghinojosa/.jdks/corretto-11.0.14.1/bin/java -Dio.netty.tryReflectionSetAccessible=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -javaagent:/home/ghinojosa/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/213.6777.52/lib/idea_rt.jar=44017:/home/ghinojosa/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/213.6777.52/bin -Dfile.encoding=UTF-8 -classpath /home/ghinojosa/IdeaProjects/plc-test/target/classes:/home/ghinojosa/Downloads/eeip-library.jar:/home/ghinojosa/.m2/repository/org/apache/plc4x/plc4j-api/0.9.1/plc4j-api-0.9.1.jar:/home/ghinojosa/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:/home/ghinojosa/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.12.5/jackson-annotations-2.12.5.jar:/home/ghinojosa/.m2/repository/org/apache/plc4x/plc4j-driver-eip/0.9.1/plc4j-driver-eip-0.9.1.jar:/home/ghinojosa/.m2/repository/org/apache/plc4x/plc4j-spi/0.9.1/plc4j-spi-0.9.1.jar:/home/ghinojosa/.m2/repository/io/netty/netty-codec/4.1.67.Final/netty-codec-4.1.67.Final.jar:/home/ghinojosa/.m2/repository/io/netty/netty-common/4.1.67.Final/netty-common-4.1.67.Final.jar:/home/ghinojosa/.m2/repository/io/netty/netty-transport/4.1.67.Final/netty-transport-4.1.67.Final.jar:/home/ghinojosa/.m2/repository/io/netty/netty-resolver/4.1.67.Final/netty-resolver-4.1.67.Final.jar:/home/ghinojosa/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar:/home/ghinojosa/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/ghinojosa/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/home/ghinojosa/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.12.5/jackson-core-2.12.5.jar:/home/ghinojosa/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.12.5/jackson-databind-2.12.5.jar:/home/ghinojosa/.m2/repository/io/vavr/vavr/0.10.4/vavr-0.10.4.jar:/home/ghinojosa/.m2/repository/io/vavr/vavr-match/0.10.4/vavr-match-0.10.4.jar:/home/ghinojosa/.m2/repository/com/github/jinahya/bit-io/1.4.3/bit-io-1.4.3.jar:/home/ghinojosa/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:/home/ghinojosa/.m2/repository/org/apache/plc4x/plc4j-transport-tcp/0.9.1/plc4j-transport-tcp-0.9.1.jar:/home/ghinojosa/.m2/repository/io/netty/netty-buffer/4.1.67.Final/netty-buffer-4.1.67.Final.jar:/home/ghinojosa/.m2/repository/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar:/home/ghinojosa/.m2/repository/org/slf4j/slf4j-simple/1.8.0-beta4/slf4j-simple-1.8.0-beta4.jar com.example.plctest.ReadPlcDemo
[main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC Driver Manager with class loader jdk.internal.loader.ClassLoaders$AppClassLoader#5c8da962
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available drivers...
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for Protocol eip (EthernetIP)
[main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
[main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
[main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
[main] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector#4de5031f
[main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
[main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11
[main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/home/ghinojosa/.m2/repository/io/netty/netty-common/4.1.67.Final/netty-common-4.1.67.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
[main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
[main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
[main] DEBUG io.netty.util.internal.PlatformDependent - maxDirectMemory: 8390705152 bytes (maybe)
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 8390705152 bytes
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: 1024
[main] DEBUG io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
[main] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
[main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
[main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
[main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
[main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
[main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#76505305
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#7b98f307
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#4802796d
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#34123d65
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#59474f18
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#65fb9ffc
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#3e694b3f
[main] TRACE io.netty.channel.nio.NioEventLoop - instrumented a special java.util.Set into: sun.nio.ch.EPollSelectorImpl#1bb5a082
[main] INFO org.apache.plc4x.java.transport.tcp.TcpChannelFactory - Configuring Bootstrap with org.apache.plc4x.java.eip.readwrite.configuration.EIPConfiguration#5aa9e4eb
[main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 10908 (auto-detected)
[main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
[main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
[main] DEBUG io.netty.util.NetUtilInitializations - Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)
[main] DEBUG io.netty.util.NetUtil - /proc/sys/net/core/somaxconn: 4096
[main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: f4:06:69:ff:fe:d6:97:69 (auto-detected)
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 8
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 8
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true
[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
[main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
[main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
[main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
[main] TRACE org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection - Channel was created, firing ChannelCreated Event
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.Plc4xNettyWrapper - User Event triggered org.apache.plc4x.java.spi.events.ConnectEvent#645e8927
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.eip.readwrite.protocol.EipProtocolLogic - Sending RegisterSession EIP Package
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Adding Response Handler ...
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Sending to wire EipConnectionRequest[sessionHandle=0,status=0,senderContext={0,0,0,0,0,0,0,0},options=0]
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.Plc4xNettyWrapper - Forwarding request to plc EipConnectionRequest[sessionHandle=0,status=0,senderContext={0,0,0,0,0,0,0,0},options=0]
[nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
[nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
[nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
[nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
[nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.delayedQueue.ratio: 8
[nioEventLoopGroup-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkAccessible: true
[nioEventLoopGroup-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkBounds: true
[nioEventLoopGroup-2-1] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector#20edcbc7
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Sending bytes to PLC for message EipConnectionRequest[sessionHandle=0,status=0,senderContext={0,0,0,0,0,0,0,0},options=0] as data 65000400000000000000000000000000000000000000000001000000
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Receiving bytes, trying to decode Message...
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Decoding EipConnectionRequest[sessionHandle=3604940806,status=0,senderContext={0,0,0,0,0,0,0,0},options=0]
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Checking handler HandlerRegistration#0 for Object of type EipConnectionRequest
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Handler HandlerRegistration#0 has right expected type EipPacket, checking condition
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Handler HandlerRegistration#0 accepts element EipConnectionRequest[sessionHandle=3604940806,status=0,senderContext={0,0,0,0,0,0,0,0},options=0], calling handle method
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.eip.readwrite.protocol.EipProtocolLogic - Got assigned with Session 3604940806
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Firing Connected!
[main] INFO com.example.plctest.ReadPlcDemo - PLC can read!
[main] TRACE org.apache.plc4x.java.spi.transaction.RequestTransactionManager - Submission of transaction 0
[pool-2-thread-1] TRACE org.apache.plc4x.java.spi.transaction.RequestTransactionManager - Start execution of transaction 0
[pool-2-thread-1] TRACE org.apache.plc4x.java.spi.Plc4xNettyWrapper - Adding Response Handler ...
[pool-2-thread-1] TRACE org.apache.plc4x.java.spi.transaction.RequestTransactionManager - Completed execution of transaction 0
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.Plc4xNettyWrapper - Forwarding request to plc CipRRData[sessionHandle=3604940806,status=0,senderContext={0,0,0,0,0,0,0,0},options=0,exchange=CipExchange[service=CipUnconnectedRequest[unconnectedService=CipReadRequest[RequestPathSize=5,tag={-111,7,83,101,110,115,111,114,49,0},elementNb=1],backPlane=0,slot=0]]]
[nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Sending bytes to PLC for message CipRRData[sessionHandle=3604940806,status=0,senderContext={0,0,0,0,0,0,0,0},options=0,exchange=CipExchange[service=CipUnconnectedRequest[unconnectedService=CipReadRequest[RequestPathSize=5,tag={-111,7,83,101,110,115,111,114,49,0},elementNb=1],backPlane=0,slot=0]]] as data 6f002c000608dfd600000000000000000000000000000000000000000000020000000000b2001c00520220062401059d0e004c05910753656e736f723100010001000000
[nioEventLoopGroup-2-1] TRACE org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Receiving bytes, trying to decode Message...
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.eip.readwrite.io.CipRRDataIO - Expected constant value 0 but got 5 for reserved field.
[nioEventLoopGroup-2-1] WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [6f0016000608dfd600000000000000000000000000000000000000000500020000000000b2000600d20001011103]: Unsupported case for discriminated type
org.apache.plc4x.java.spi.generation.ParseException: Unsupported case for discriminated type
at org.apache.plc4x.java.eip.readwrite.io.CipServiceIO.staticParse(CipServiceIO.java:100)
at org.apache.plc4x.java.eip.readwrite.io.CipExchangeIO.staticParse(CipExchangeIO.java:96)
at org.apache.plc4x.java.eip.readwrite.io.CipRRDataIO.staticParse(CipRRDataIO.java:80)
at org.apache.plc4x.java.eip.readwrite.io.EipPacketIO.staticParse(EipPacketIO.java:101)
at org.apache.plc4x.java.eip.readwrite.io.EipPacketIO.parse(EipPacketIO.java:48)
at org.apache.plc4x.java.eip.readwrite.io.EipPacketIO.parse(EipPacketIO.java:42)
at org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:79)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
I'd appreciate any help or if someone could point me in the right direction, in terms of how to solve this. Thanks in advance!
Guillermo
For anyone having the same issue:
Apparently, from what I've read, the Micro820 series have limitations reading tags. In the case of the PLC I was using (2080-LC20-20QWB) I had to:
Establish a session by sending a "Forward_Open" request. The details of the request is in page 105 of the CIP specification.
Once the connection is established, multiple "Read Data" requests can be send with the names of the tags that you wish the read.
Finally, a "Forward_Close" request is send in order to close the connection.
And that's it.
I cloned this project and implemented the steps that I just described. You can find my version here.
And here's an example showing how to use it:
try {
EtherNetIP plc = new EtherNetIP("10.0.1.100", 0);
plc.connectTcp();
List<TagReadReply> tags = plc.connectAndReadTags("Sensor1", "Sensor2" , "Sensor10");
tags.forEach(each -> {
logger.info("Tag name:" + each.getTag() + " is valid ? " + each.isValid());
});
} catch (Exception e) {
e.printStackTrace();
logger.severe("Exception occurred:" + e.getMessage());
}
I have two test tests, one reading and one writing on the blockchain. I'm getting two different errors, one at the start of the test and one at the writing test. The reading test is working normally without problems.
Initial error:
2021.12.21-16:43:01.870 info [caliper] [round-orchestrator] Preparing worker connections
2021.12.21-16:43:01.870 info [caliper] [worker-orchestrator] Launching worker 1 of 2
2021.12.21-16:43:01.878 info [caliper] [worker-orchestrator] Launching worker 2 of 2
2021.12.21-16:43:01.884 info [caliper] [worker-orchestrator] Messenger not configured, entering configure phase...
2021.12.21-16:43:01.885 info [caliper] [worker-orchestrator] No existing workers detected, entering worker launch phase...
2021.12.21-16:43:01.885 info [caliper] [worker-orchestrator] Waiting for 2 workers to be connected...
2021.12.21-16:43:02.426 info [caliper] [cli-launch-worker] Set workspace path: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set benchmark configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/config.yaml
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set network configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/network.yaml
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set SUT type: fabric
2021.12.21-16:43:02.444 info [caliper] [cli-launch-worker] Set workspace path: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.21-16:43:02.446 info [caliper] [cli-launch-worker] Set benchmark configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/config.yaml
2021.12.21-16:43:02.446 info [caliper] [cli-launch-worker] Set network configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/network.yaml
2021.12.21-16:43:02.447 info [caliper] [cli-launch-worker] Set SUT type: fabric
2021.12.21-16:43:02.505 info [caliper] [worker-orchestrator] 2 workers connected, progressing to worker assignment phase.
2021.12.21-16:43:02.505 info [caliper] [worker-orchestrator] Workers currently unassigned, awaiting index assignment...
2021.12.21-16:43:02.506 info [caliper] [worker-orchestrator] Waiting for 2 workers to be assigned...
2021.12.21-16:43:02.559 info [caliper] [worker-orchestrator] 2 workers assigned, progressing to worker initialization phase.
2021.12.21-16:43:02.560 info [caliper] [worker-orchestrator] Waiting for 2 workers to be ready...
2021.12.21-16:43:03.629 info [caliper] [worker-message-handler] Initializing Worker#1...
2021.12.21-16:43:03.629 info [caliper] [fabric-connector] Initializing gateway connector compatible with installed SDK: 2.2.3
2021.12.21-16:43:03.629 info [caliper] [IdentityManager] Adding User1 (admin=false) as User1 for organization Org1MSP
2021.12.21-16:43:03.629 info [caliper] [worker-message-handler] Worker#1 initialized
2021.12.21-16:43:03.683 info [caliper] [worker-orchestrator] 2 workers ready, progressing to test preparation phase.
2021.12.21-16:43:03.684 info [caliper] [round-orchestrator] Started round 1 (Set)
2021.12.21-16:43:03.690 info [caliper] [worker-message-handler] Preparing Worker#1 for Round#0
2021.12.21-16:43:03.696 info [caliper] [connectors/v2/FabricGateway] Connecting user with identity User1 to a Network Gateway
2021.12.21-16:43:04.005 info [caliper] [worker-message-handler] Initializing Worker#0...
2021.12.21-16:43:04.005 info [caliper] [fabric-connector] Initializing gateway connector compatible with installed SDK: 2.2.3
2021.12.21-16:43:04.005 info [caliper] [IdentityManager] Adding User1 (admin=false) as User1 for organization Org1MSP
2021.12.21-16:43:04.005 info [caliper] [worker-message-handler] Worker#0 initialized
2021.12.21-16:43:04.006 info [caliper] [worker-message-handler] Preparing Worker#0 for Round#0
2021.12.21-16:43:04.006 info [caliper] [connectors/v2/FabricGateway] Connecting user with identity User1 to a Network Gateway
2021.12.21-16:43:04.007 info [caliper] [connectors/v2/FabricGateway] Successfully connected user with identity User1 to a Network Gateway
2021.12.21-16:43:04.008 info [caliper] [connectors/v2/FabricGateway] Generating contract map for user User1
2021.12.21-16:43:04.018 info [caliper] [connectors/v2/FabricGateway] Successfully connected user with identity User1 to a Network Gateway
2021.12.21-16:43:04.019 info [caliper] [connectors/v2/FabricGateway] Generating contract map for user User1
2021-12-21T16:43:07.083Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.086Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer.example.com:7050 url:grpc://localhost:7050 timeout:3000
2021-12-21T16:43:07.088Z - error: [DiscoveryService]: _buildOrderer[channelall] - Unable to connect to the discovered orderer orderer.example.com:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.085Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.090Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer.example.com:7050 url:grpc://localhost:7050 timeout:3000
2021-12-21T16:43:07.092Z - error: [DiscoveryService]: _buildOrderer[channelall] - Unable to connect to the discovered orderer orderer.example.com:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
The second error that occurs in the writing test is the following:
2021.12.21-16:43:07.112 info [caliper] [worker-orchestrator] 2 workers prepared, progressing to test phase.
2021.12.21-16:43:07.112 info [caliper] [round-orchestrator] Monitors successfully started
2021.12.21-16:43:07.115 info [caliper] [worker-message-handler] Worker#1 is starting Round#0
2021.12.21-16:43:07.116 info [caliper] [worker-message-handler] Worker#0 is starting Round#0
2021.12.21-16:43:07.123 info [caliper] [caliper-worker] Worker #1 starting workload loop
2021.12.21-16:43:07.126 info [caliper] [caliper-worker] Worker #0 starting workload loop
2021.12.21-16:43:07.941 error [caliper] [connectors/v2/FabricGateway] Failed to perform submit transaction [set] using arguments [node1,{'CPU':50,'MEM':50,'STG':50.0,'DAT':'2020-11-17T00:10:00Z'}], with error: Error: No endorsement plan available
at DiscoveryHandler.endorse (/home/ubuntu/caliper/node_modules/fabric-network/node_modules/fabric-common/lib/DiscoveryHandler.js:208:10)
at process._tickCallback (internal/process/next_tick.js:68:7)
Connection File
---
name: fabric
version: 2.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca.org1.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
tlsCACerts:
path: peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: https://192.169.0.7:7054
caName: ca-org1
tlsCACerts:
path: peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
httpOptions:
verify: false
Network File
name: Fabric
version: '2.0.0'
caliper:
blockchain: fabric
sutOptions:
mutualTls: false
organizations:
- mspid: Org1MSP
identities:
certificates:
- name: 'User1'
clientPrivateKey:
path: 'peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/keystore/priv_sk'
clientSignedCert:
path: 'peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/signcerts/User1#org1.example.com-cert.pem'
connectionProfile:
path: 'connection_files/connection-org1.yaml'
discover: true
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
channels:
- channelName: channelall
contracts:
- id: monitor
I kindly ask for any tips so that I can solve these problems and follow the development.
From the network file you posted a couple of points
you can't define any nodes in it (for example you've added orderers). They are ignored
you've specified that your connection profile is a dynamic profile by setting discover to true in your network file, this means it will use discovery to determine the network topology and may not use the nodes you have explicitly defined in your connection profile. If you want to be explicit in your connection profile (and thus define a static connection profile) like you have in your above example, you should set discover to false, which hopefully will solve your problem.
As a side note, if you use discovery then the node-sdk (used by caliper) and caliper by default converts all discovered node hosts to localhost, which is why you see it trying to contact localhost. To disable this see Runtime settings in https://hyperledger.github.io/caliper/v0.4.2/fabric-config/new/
The issue was in the connection file.
The old file was:
---
name: fabric
version: 2.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
orderer: '10000'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca.org1.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
tlsCACerts:
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://192.169.0.7:7054
caName: ca-org1
tlsCACerts:
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
httpOptions:
verify: false
The new connection file that I created is this:
---
name: fabric
description: "Sample connection profile for documentation topic"
version: 2.0.0
channels:
channelall:
orderers:
- orderer.example.com
peers:
peer0.org1.example.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer0.org2.example.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer0.org3.example.com:
endorsingPeer: false
chaincodeQuery: false
ledgerQuery: true
eventSource: true
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
Org2:
mspid: Org2MSP
peers:
- peer0.org2.example.com
Org3:
mspid: Org3MSP
peers:
- peer0.org3.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
request-timeout: 120001
peer0.org2.example.com:
url: grpc://192.169.0.10:7051
grpcOptions:
ssl-target-name-override: peer0.org2.example.com
request-timeout: 120001
peer0.org3.example.com:
url: grpc://192.169.0.11:7051
grpcOptions:
ssl-target-name-override: peer0.org3.example.com
request-timeout: 120001
With all information about peers and orderers.
Thanks everybody for the help.
Setup Information:
OS - MacOS HighSierra - 10.13.3
DockerCE for Mac - 17.12.0-ce-mac49
Selenoid, Selenoid-ui - Latest
Firefox - 58, geckodriver - 0.191 (0.190,0.170)
Chrome - 63, ChromeDriver 2.34.522932
Selenium standalone server - 3.9.1
On Local setup the test runs successsfully with Firefox and Chrome
using the same geckodriver.
On Remote setup the test fails while I use Firefox and succeeds using Chrome.
Verbose log from NightwatchJS
Prasannas-MacBook-Air:sim1 prvenkat$ ./node_modules/nightwatch/bin/nightwatch ./src/test/login.js --verbose
[Test / Login] Test Suite
=============================
Running: Validate Login page
INFO Request: POST /wd/hub/session
- data: {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","moz:firefoxOptions":{"log":{"level":"trace"}},"version":"57.0","name":"Test / Login"}}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":199}
INFO Response 200 POST /wd/hub/session (3439ms) { value:
{ sessionId: '43ba7a2a-8fac-4ebb-8a8f-e046e5534944',
capabilities:
{ acceptInsecureCerts: false,
browserName: 'firefox',
browserVersion: '57.0',
'moz:accessibilityChecks': false,
'moz:headless': false,
'moz:processID': 37,
'moz:profile': '/tmp/rust_mozprofile.i3MIoxBzkGAM',
'moz:webdriverClick': false,
pageLoadStrategy: 'normal',
platformName: 'linux',
platformVersion: '4.9.60-linuxkit-aufs',
rotatable: false,
timeouts: { implicit: 0, pageLoad: 300000, script: 30000 } } } }
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ value:
{ sessionId: '43ba7a2a-8fac-4ebb-8a8f-e046e5534944',
capabilities:
{ acceptInsecureCerts: false,
browserName: 'firefox',
browserVersion: '57.0',
'moz:accessibilityChecks': false,
'moz:headless': false,
'moz:processID': 37,
'moz:profile': '/tmp/rust_mozprofile.i3MIoxBzkGAM',
'moz:webdriverClick': false,
pageLoadStrategy: 'normal',
platformName: 'linux',
platformVersion: '4.9.60-linuxkit-aufs',
rotatable: false,
timeouts: [Object] } } }
Trace log from the Docker container
Initialize...
Connecting to ws://localhost:8080/ws/logs/43ba7a2a-8fac-4ebb-8a8f-e046e5534944...
Connected!
--- x11vnc loop: 1 ---
2018/02/22 05:20:47 Loading configuration files...
2018/02/22 05:20:47 Loaded configuration from [/etc/selenoid/browsers.json]
2018/02/22 05:20:47 Using default containers log configuration because of:read error: open config/container-logs.json: no such file or directory
2018/02/22 05:20:47 Timezone: UTC
2018/02/22 05:20:47 Listening on :4444
2018/02/22 05:20:47 [NEW_REQUEST]
2018/02/22 05:20:47 [NEW_REQUEST_ACCEPTED]
2018/02/22 05:20:47 [0] [LOCATING_SERVICE] [firefox-57.0]
2018/02/22 05:20:47 [0] [USING_DRIVER] [firefox-57.0]
2018/02/22 05:20:47 [0] [ALLOCATING_PORT]
2018/02/22 05:20:47 [0] [ALLOCATED_PORT] [41809]
2018/02/22 05:20:47 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --host :: --log debug --port=41809]]
1519276847981 geckodriver INFO geckodriver 0.19.1
1519276847981 webdriver::httpapi DEBUG Creating routes
1519276847986 geckodriver INFO Listening on [::]:41809
1519276848032 webdriver::server DEBUG -> HEAD /
1519276848160 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"unknown command","message":"HEAD / did not match a known command","stacktrace":"stack backtrace:\n 0: 0x4edb3c - backtrace::backtrace::trace::hc4bd56a2f176de7e\n 1: 0x4edb72 - backtrace::capture::Backtrace::new::he3b2a15d39027c46\n 2: 0x440ac8 - webdriver::error::WebDriverError::new::ha0fbd6d1a1131b43\n 3: 0x43a665 - <webdriver::server::HttpHandler<U> as hyper::server::Handler>::handle::h343049f2e1aa3f13\n 4: 0x404b4d - std::sys_common::backtrace::__rust_begin_short_backtrace::he840f14c79c8e321\n 5: 0x40bee6 - std::panicking::try::do_call::hdd1d6b985699ef9d\n 6: 0x5e6a6c - panic_unwind::__rust_maybe_catch_panic\n at /checkout/src/libpanic_unwind/lib.rs:99\n 7: 0x41ef02 - <F as alloc::boxed::FnBox<A>>::call_box::hae8ac6ade91dedb6\n 8: 0x5df13b - alloc::boxed::{{impl}}::call_once<(),()>\n at /checkout/src/liballoc/boxed.rs:692\n - std::sys_common::thread::start_thread\n at /checkout/src/libstd/sys_common/thread.rs:21\n - std::sys::imp::thread::{{impl}}::new::thread_start\n at /checkout/src/libstd/sys/unix/thread.rs:84"}}
2018/02/22 05:20:48 [0] [PROCESS_STARTED] [32] [181.491408ms]
2018/02/22 05:20:48 [0] [PROXYING_REQUESTS] [http://127.0.0.1:41809]
2018/02/22 05:20:48 [0] [SESSION_ATTEMPTED] [unknown] [http://127.0.0.1:41809] [1]
1519276848161 webdriver::server DEBUG -> POST /session {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","moz:firefoxOptions":{"log":{"level":"trace"}},"version":"57.0","name":"Test / Login"}}
1519276848167 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.i3MIoxBzkGAM"
1519276848171 geckodriver::marionette TRACE connection attempt 0/600
1519276848271 geckodriver::marionette TRACE connection attempt 1/600
--- x11vnc loop: waiting for: 61
1519276848372 geckodriver::marionette TRACE connection attempt 2/600
PORT=5900
1519276848474 geckodriver::marionette TRACE connection attempt 3/600
1519276848575 geckodriver::marionette TRACE connection attempt 4/600
1519276848677 geckodriver::marionette TRACE connection attempt 5/600
1519276848694 Marionette DEBUG Received observer notification "profile-after-change"
1519276848755 Marionette DEBUG Received observer notification "command-line-startup"
1519276848756 Marionette INFO Enabled via --marionette
1519276848778 geckodriver::marionette TRACE connection attempt 6/600
1519276848880 geckodriver::marionette TRACE connection attempt 7/600
1519276848980 geckodriver::marionette TRACE connection attempt 8/600
1519276849081 geckodriver::marionette TRACE connection attempt 9/600
1519276849183 geckodriver::marionette TRACE connection attempt 10/600
1519276849285 geckodriver::marionette TRACE connection attempt 11/600
1519276849386 geckodriver::marionette TRACE connection attempt 12/600
1519276849487 geckodriver::marionette TRACE connection attempt 13/600
1519276849589 geckodriver::marionette TRACE connection attempt 14/600
1519276849690 geckodriver::marionette TRACE connection attempt 15/600
1519276849792 geckodriver::marionette TRACE connection attempt 16/600
1519276849894 geckodriver::marionette TRACE connection attempt 17/600
1519276849930 Marionette DEBUG Received observer notification "sessionstore-windows-restored"
1519276849996 geckodriver::marionette TRACE connection attempt 18/600
1519276850097 geckodriver::marionette TRACE connection attempt 19/600
1519276850197 geckodriver::marionette TRACE connection attempt 20/600
1519276850298 geckodriver::marionette TRACE connection attempt 21/600
1519276850399 geckodriver::marionette TRACE connection attempt 22/600
1519276850499 geckodriver::marionette TRACE connection attempt 23/600
1519276850600 geckodriver::marionette TRACE connection attempt 24/600
1519276850679 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1519276850681 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1519276850681 Marionette DEBUG Setting recommended pref extensions.e10sBlocksEnabling to false
1519276850682 Marionette DEBUG New connections are accepted
1519276850683 Marionette INFO Listening on port 37569
1519276850702 geckodriver::marionette DEBUG Connected to Marionette onlocalhost:37569
1519276850712 Marionette DEBUG Accepted connection 0 from 127.0.0.1:42836
1519276850714 geckodriver::marionette TRACE <- {"applicationType":"gecko","marionetteProtocol":3}
1519276850714 geckodriver::marionette TRACE -> 315:[0,1,"newSession",{"acceptSslCerts":true,"browserName":"firefox","capabilities":{"desiredCapabilities":{"acceptSslCerts":true,"browserName":"firefox","javascriptEnabled":true,"name":"Test / Login","platform":"ANY","version":"57.0"}},"javascriptEnabled":true,"name":"Test / Login","platform":"ANY","version":"57.0"}]
1519276850717 Marionette TRACE 0 -> [0,1,"newSession",{"acceptSslCerts":true,"browserName":"firefox","capabilities":{"desiredCapabilities":{"acceptSslCerts":true,"browserName":"firefox","javascriptEnabled":true,"name":"Test / Login","platform":"ANY","version":"57.0"}},"javascriptEnabled":true,"name":"Test / Login","platform":"ANY","version":"57.0"}]
1519276850783 Marionette DEBUG Register listener.js for window 2147483649
1519276850806 Marionette TRACE 0 <- [1,1,null,{"sessionId":"43ba7a2a-8fac-4ebb-8a8f-e046e5534944","capabilities":{"browserName":"firefox","browserVersion":"57.0","platformName":"linux","platformVersion":"4.9.60-linuxkit-aufs","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":37,"moz:profile":"/tmp/rust_mozprofile.i3MIoxBzkGAM","moz:webdriverClick":false}}]
1519276850809 geckodriver::marionette TRACE <- [1,1,null,{"sessionId":"43ba7a2a-8fac-4ebb-8a8f-e046e5534944","capabilities":{"browserName":"firefox","browserVersion":"57.0","platformName":"linux","platformVersion":"4.9.60-linuxkit-aufs","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":37,"moz:profile":"/tmp/rust_mozprofile.i3MIoxBzkGAM","moz:webdriverClick":false}}]
1519276850809 webdriver::server DEBUG <- 200 OK {"value": {"sessionId":"43ba7a2a-8fac-4ebb-8a8f-e046e5534944","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"57.0","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":37,"moz:profile":"/tmp/rust_mozprofile.i3MIoxBzkGAM","moz:webdriverClick":false,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"4.9.60-linuxkit-aufs","rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
2018/02/22 05:20:50 [0] [SESSION_CREATED] [unknown] [43ba7a2a-8fac-4ebb-8a8f-e046e5534944] [http://127.0.0.1:41809] [1] [2.832759113s]
2018/02/22 05:21:50 [SESSION_DELETED] [43ba7a2a-8fac-4ebb-8a8f-e046e5534944]
1519276910817 webdriver::server DEBUG -> DELETE /session/43ba7a2a-8fac-4ebb-8a8f-e046e5534944
1519276910819 geckodriver::marionette TRACE -> 37:[0,2,"quit",{"flags":["eForceQuit"]}]
1519276910827 Marionette TRACE 0 -> [0,2,"quit",{"flags":["eForceQuit"]}]
1519276910830 Marionette DEBUG New connections will no longer be accepted
1519276910973 Marionette TRACE 0 <- [1,2,null,{"cause":"shutdown"}]
1519276911015 geckodriver::marionette TRACE <- [1,2,null,{"cause":"shutdown"}]
1519276911015 webdriver::server DEBUG Deleting session
1519276911015 geckodriver::marionette DEBUG Stopping browser process
1519276911077 webdriver::server DEBUG <- 200 OK {"value": {}}
2018/02/22 05:21:51 [0] [TERMINATING_PROCESS] [32]
2018/02/22 05:21:51 [0] [TERMINATED_PROCESS] [32]
Disconnected
I had tested the scenario with three different geckodriver but the result was same.
Please help.
The error says it all :
1519276847986 geckodriver INFO Listening on [::]:41809
1519276848032 webdriver::server DEBUG -> HEAD /
1519276848160 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"unknown command","message":"HEAD / did not match a known command","stacktrace":"stack backtrace:\n 0: 0x4edb3c - backtrace::backtrace::trace::hc4bd56a2f176de7e\n 1: 0x4edb72 - backtrace::capture::Backtrace::new::he3b2a15d39027c46\n 2: 0x440ac8 - webdriver::error::WebDriverError::new::ha0fbd6d1a1131b43\n 3: 0x43a665 - <webdriver::server::HttpHandler<U> as hyper::server::Handler>::handle::h343049f2e1aa3f13\n 4: 0x404b4d - std::sys_common::backtrace::__rust_begin_short_backtrace::he840f14c79c8e321\n 5: 0x40bee6 - std::panicking::try::do_call::hdd1d6b985699ef9d\n 6: 0x5e6a6c - panic_unwind::__rust_maybe_catch_panic\n at /checkout/src/libpanic_unwind/lib.rs:99\n 7: 0x41ef02 - <F as alloc::boxed::FnBox<A>>::call_box::hae8ac6ade91dedb6\n 8: 0x5df13b - alloc::boxed::{{impl}}::call_once<(),()>\n at /checkout/src/liballoc/boxed.rs:692\n - std::sys_common::thread::start_thread\n at /checkout/src/libstd/sys_common/thread.rs:21\n - std::sys::imp::thread::{{impl}}::new::thread_start\n at /checkout/src/libstd/sys/unix/thread.rs:84"}}
Due to this issue the SESSION gets DELETED as follows :
2018/02/22 05:20:50 [0] [SESSION_CREATED] [unknown] [43ba7a2a-8fac-4ebb-8a8f-e046e5534944] [http://127.0.0.1:41809] [1] [2.832759113s]
2018/02/22 05:21:50 [SESSION_DELETED] [43ba7a2a-8fac-4ebb-8a8f-e046e5534944]
The error stack trace clearly mentions that Selenium Language Binding Art is attempting to connect on the IPv6 loopback address ([::]:41809), which won't work at all with 3.9.x as per #JimEvans comment in the discussion thread Can't launch Selenium IE Driver after upgrading to version 3.9
Solution
A possible solution would be to disable IPv6 loopback address and enable IPv4 on the Remote setup and execute your Test.
Have a look here:
https://github.com/nightwatchjs/nightwatch/issues/1628#issuecomment-357746215
That means you will have to fallback to 3.8 and a selenium Grid setup.
Simple script:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class sanity {
public static void main (String[] args) throws InterruptedException
{
System.setProperty("webdriver.gecko.driver", "C:\\Selenium Purely\\geckodriver\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://facebook.com");
driver.quit();//closes the browser
} }
On execution completion, it throws below error in console.
1489404845805 geckodriver INFO Listening on 127.0.0.1:34461
1489404846478 mozprofile::profile INFO Using profile path C:\Users\jshaikh\AppData\Local\Temp\rust_mozprofile.ZsJREdq3xMm4
1489404846494 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args []
1489404846525 geckodriver::marionette INFO Connecting to Marionette on localhost:60729
1489404848161 Marionette INFO Listening on port 60729
Mar 13, 2017 5:04:12 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1489404862119 Marionette INFO New connections will no longer be accepted
[Child 4856] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143
Mar 13, 2017 5:04:23 PM org.openqa.selenium.os.UnixProcess destroy
SEVERE: Unable to kill process with PID 11728
What could be the issue?
Try to use the latest version of selenium-java (version 3.3.1 at the time of this writing).