SocketException: A system call received a parameter that is not valid + setTcpNoDelay - socketexception

I'm getting following error in my socket programming, please help me to identify the root cause of this error.
SocketException: A system call received a parameter that is not valid.
at java.net.PlainSocketImpl.socketNativeSetOption(Native Method)
at java.net.PlainSocketImpl.socketSetOption(PlainSocketImpl.java:597)
at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:340)
at java.net.Socket.setTcpNoDelay(Socket.java:894)
at com.TestSocket.run(TestSocket.java:112)

Related

How do I solve "-307" error on ZKTeco SDK?

Hello everyone and thanks for reading this problem.
I have a solution in C# using the zkemkeeper dll to get the records from some access control devices. When I "ping" them, there isn't any problem, but when I try to connect to them (Using my solution or the standalone demo to get attendance) I get the "-307" error with the "Unable to connect message". That's not very clear and I would really aprecciate if someone can explain what this error is (please!!!!). I would really like to understand these errors myself, so, where can I find all the definition of these errors?
In short:
1.- What is the problem regarding the "-307" error?
2.- Is there any place where all these errors are documented?
Thanks in advance!!
enter image description here
maybe you should check your device, you can ping them
Attention
The dwErrorCode parameter specifies the error code. The values are described as follows:
During connection, the following error codes may be returned:
0 Connected successfully
-1 Failed to invoke the interface
-2 Failed to initialize
-3 Failed to initialize parameters
-5 Data mode read error
-6 Wrong password
-7 Reply error
-8 Receive timeout
-307 Connection timeout
In invoking other interfaces, the following error codes may be returned:
-201 Device is busy
-199 New Mode
-103 device send back error of face version error
-102 face template version error, like 8.0 face template send to 7.0 device
-101 malloc memory failed
-100 Not supported or the data does not exist
-10 The length of transmitted data is incorrect
-5 Data already exists
-4 Insufficient space
-3 Wrong size
-2 File read/write error
-1 The SDK is not initialized and needs to be reconnected
0 Data not found or duplicate data
1 Correct operation
4 Parameter error
101 Buffer allocation error
102 repeat invoking
Underlying error codes:
-12001 Socket creation timeout (connection timeout)
-12002 Insufficient memory
-12003 Wrong Socket version
-12004 Not TCP protocol
-12005 Waiting timeout
-12006 Data transmission timeout
-12007 Data reading timeout
-12008 Failed to read Socket
-13009 Waiting event error
-13010 Exceeded retry attempts
-13011 Wrong reply ID
-13012 Checksum error
-13013 Waiting event timeout
-13014 DIRTY_DATA
-13015 Buffer size too small
-13016 Wrong data length
-13017 Invalid data read1
-13018 Invalid data read2
-13019 Invalid data read3
-13020 Data loss
-13021 Memory initialization error
-15001 Invoking return value of status key issued by SetShortkey interface repeatedly
-15002 Invoking return value of description issued by SetShortkey interface repeatedly
-15003 The two level menu is not opened in the device, and the data need not be issued
getdevicedata and setdevicedata invocation error codes
-15100 Error occurs in obtaining table structure
-15101 The condition field does not exist in the table structure
-15102 Inconsistency in the total number of fields
-15103 Inconsistency in sorting fields
-15104 Memory allocation error
-15105 Data parsing error
-15106 Data overflow as the transmitted data exceeds 4M
-15108 Invalid options
-15113 Data parsing error: table ID not found
-15114 A data exception is returned as the number of fields is smaller than or equal to 0
-15115 A data exception is returned as the total number of table fields is inconsistent with the
total number of fields of the data
Firmware error codes:
2000 Return OK to execute
-2001 Return Fail to execute command
-2002 Return Data
-2003 Regstered event occorred
-2004 Return REPEAT Command
-2005 Return UNAUTH Command
0xffff Return Unknown Command
-4999 Device parameter read error
-4998 Device parameter write error
-4997 The length of the data sent by the software to the device is incorrect
228
229
-4996 A parameter error exists in the data sent by the software to the device
-4995 Failed to add data to the database
-4994 Failed to update the database
-4993 Failed to read data from the database
-4992 Failed to delete data in the database
-4991 Data not found in the database
-4990 The data amount in the database reaches the limit
-4989 Failed to allocate memory to a session
-4988 Insufficient space in the memory allocated to a session
-4987 The memory allocated to a session overflows
-4986 File does not exist
-4985 File read failure
-4984 File write failure
-4983 Failed to calculate the hash value
-4982 Failed to allocate memory
Note
This interface is applicable to the new architecture firmware.

ArcMap Error The requested operation invalid on a close state

Hi does anyone know what cause this error? :
The requested operation invalid on a close state ,state_id=62786

How to handle "Couldn't get any response" in mule?

I am trying to implement proper error handling in my code. There is a request component, which hits a specific api. I have to handle the scenario, where "server couldn't send a response" exception occurs.
Mule does not identify it as a HTTP:NOT FOUND error instead it identifies it as MULE:UNKNOWN.
How should I handle this case ? I want mule to identify it as a HTTP error.
EDIT:
How do I handle the MULE:UNKNOWN error type. I dont want to handle it under ANY and the compiler doesn't accept the type MULE : UNKNOWN. ?
org.mule.runtime.deployment.model.api.DeploymentException: Failed to
deploy artifact [] Caused by:
org.mule.runtime.api.exception.MuleRuntimeException:
org.mule.runtime.deployment.model.api.DeploymentInitException:
MuleRuntimeException: Could not find ErrorType for the given
identifier: 'MULE:UNKNOWN' Caused by:
org.mule.runtime.deployment.model.api.DeploymentInitException:
MuleRuntimeException: Could not find ErrorType for the given
identifier: 'MULE:UNKNOWN' Caused by:
org.mule.runtime.core.api.config.ConfigurationException: Could not
find ErrorType for the given identifier: 'MULE:UNKNOWN' Caused by:
org.mule.runtime.api.lifecycle.InitialisationException: Could not find
ErrorType for the given identifier: 'MULE:UNKNOWN' Caused by:
org.mule.runtime.api.lifecycle.LifecycleException: Could not find
ErrorType for the given identifier: 'MULE:UNKNOWN' Caused by:
org.mule.runtime.api.exception.MuleRuntimeException: Could not find
ErrorType for the given identifier: 'MULE:UNKNOWN'
HTTP:NOT FOUND means that the server returned an HTTP 404 (ie not found) response. If the server aborted the response for any reason it is not expected that the HTTP Requester to return a NOT FOUND. Having said that, the MULE:UNKNOWN error indicates an error that the component can not handle. You could try to update the version of the HTTP Connector to the last one to see if it has been improved to handle better that particular situation. Check the release notes to see if a newest one has been released.

Error while connecting to documentum source

I am new to documentum,can any one help me how to resolve the following error
DfException:: THREAD: Thread-694; MSG: [DFC_BOF_CLASS_CACHE_INIT_ERROR] Failed to initialize class cache.; ERRORCODE: ff; NEXT: null
at com.documentum.fc.client.impl.bof.cache.NullClassCacheManager.checkCacheConsistency(NullClassCacheManager.java:46)
at com.documentum.fc.client.impl.bof.compoundclass.CompoundClassMgr.getImpClass(CompoundClassMgr.java:66)
at com.documentum.fc.client.impl.objectmanager.AbstractPersistentObjectFactory.getCompoundClassEntry(AbstractPersistentObjectFactory.java:39)
at com.documentum.fc.client.impl.objectmanager.PObjectFactoryWithAspects.makeObject(PObjectFactoryWithAspects.java:49)
at com.documentum.fc.client.impl.objectmanager.PersistentObjectManager.getObjectFromServer(PersistentObjectManager.java:356)
at com.documentum.fc.client.impl.objectmanager.PersistentObjectManager.getObject(PersistentObjectManager.java:311)
at com.documentum.fc.client.impl.session.Session.getObject(Session.java:963)
at com.documentum.fc.client.impl.session.SessionHandle.getObject(SessionHandle.java:653)
at com.gsk.rd.datacoe.documentum.DocumentumBot.processBotLogic(DocumentumBot.java:193)
at com.gsk.rd.datacoe.bots.BaseBot.processMessage(BaseBot.java:542)
at com.gsk.rd.datacoe.bots.BaseBot.fetchMessages(BaseBot.java:460)
at com.gsk.rd.datacoe.bots.BaseBot$1.run(BaseBot.java:185)
at java.lang.Thread.run(Thread.java:745)
I am using dfc.properties,can any one help me what is the cause of the above error
my dfc.properties file is
dfc.data.dir=./dfc
dfc.registry.mode=file
dfc.search.ecis.enable=false
dfc.search.ecis.host=
dfc.search.ecis.port=
dfc.tokenstorage.dir=./dfc/apptoken
dfc.tokenstorage.enable=false
dfc.docbroker.host[0]=random host_name
dfc.docbroker.port[0]=1489
#Additions 3/22
dfc.security.keystore.file=./dfc/dfc.keystore
dfc.session.secure_connect_default=try_native_first
dfc.globalregistry.repository[0]=random docbase
dfc.globalregistry.username=username
dfc.globalregistry.password=password
#dfc.cache.object.size=100
#dfc.session.pool.expiration_interval=10
does any values in dfc.properties is causing the above error?? please help me
Just to be sure: do you have actual values for host and global registry properties?
A DFC client only has one global registry hence this is wrong
dfc.globalregistry.repository[0]=random docbase
and should be
dfc.globalregistry.repository=random docbase

"Invalid source address" exception when sending SMS using SMPP Server

Everything was working fine for us from last 8 months and suddenly we started getting this error.
We configured SMPP driver properties in Oracle EM console and sending SMS using UMS integrated with Oracle SOA server.
Found a link related to this error but it doesn't help:
https://support.nowsms.com/discus/messages/485/1176.html
[2017-10-17T10:33:16.806+05:30] [WLS_SOA] [ERROR] [SDP-25700]
[oracle.sdp.messaging.driver.smpp] [tid: Workmanager: , Version: 0,
Scheduled=false, Started=false, Wait time: 0 ms\n] [userId:
OracleSystemUser] [ecid:
49d20b62a8084325:-5336381e:15f247fea2f:-8000-000000000001c322,0] [APP:
usermessagingdriver-smpp] An unexpected exception was caught.[[
oracle.sdp.messaging.driver.DriverException: Invalid Source Address[a]
at
oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:1073)
at
oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:3268)
at
oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:2849)
at
oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:2724)
at
oracle.sdpinternal.messaging.driver.smpp.SMPPManagedConnection.send(SMPPManagedConnection.java:95)
at
oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at
oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
at sun.reflect.GeneratedMethodAccessor1629.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606) at
com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at
com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at
com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at
com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at
com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at
com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy532.onMessage(Unknown Source) at
oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean_xfokw2_MDOImpl.__WL_invoke(Unknown
Source) at
weblogic.ejb.container.internal.MDOMethodInvoker.invoke(MDOMethodInvoker.java:35)
at
oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean_xfokw2_MDOImpl.onMessage(Unknown
Source) at
oracle.sdpinternal.messaging.jmsmessagereceiver.ResourceAdapterImpl$RaMessageListener.onMessage(ResourceAdapterImpl.java:167)
at
oracle.sdpinternal.messaging.jms.QueueWorker.run(QueueWorker.java:73)
at
weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
]] [2017-10-17T10:33:16.807+05:30] [WLS_SOA] [NOTIFICATION]
[SDP-26003] [oracle.sdp.messaging.driver.dispatcher] [tid:
Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time:
0 ms\n] [userId: OracleSystemUser] [ecid:
49d20b62a8084325:-5336381e:15f247fea2f:-8000-000000000001c322,0] [APP:
usermessagingdriver-smpp] Dispatcher sent message with id:
eb50c4cdc0a800ab12d5fbbdbbbbd46a.
Network Logs (Using Wireshark):
We figured out and resolved this issue. Posting its resolution here. May be it can help someone other and save their precious time.
SMPP driver configured in Oracle EM console has a bug due to which Source address and Default source address are always null even if you pass it from driver configurations.
It was due to multiple Source Address at SMSC and our system was passing null
value in Source Address field. Due to this SMSC was not able
to recognize correct source address and throw "Invalid Source
Address" exception.
If single/static source address is configured at SMSC then you can
pass null values and SMSC will automatically recognize source address.