I’m working with 2022R1.
I’m getting “connectionID” string for a while, everything is okay.
but after a while, I get one of these 2 errors when I try to get connectionID without any changes.
I use java for calling the server(soap)–>/XProtectMobile/Communication
1)“The processing instruction target matching \”[xX][mM][lL]\" is not allowed."
I checked this error number, you don’t have this error number in your document and as I can see it looks like some unhandled error because the error code gets the default value I guess.
First one has nothing to do with Mobile Server or mobile SDK. It looks Java-specific issue related to xml’s content and possible invalid whitespaces at the beginning of it. Did you try to google it and/or have a look at StackOverflow?
Second error (2147483646) is internal server error. Can you please provide the request?
regarding your answer about 1, I already mentioned if u send the same request for a couple of times, sometimes u get this error, so It means sometimes you send a response in the wrong way, and yes, I google it
regarding 2)
It’s for login–> then getting connectionID
step1)
step2)
same as the previous error, if u do this request a couple of times, sometimes you get this error but the rest u get connectionId
and sorry if I posted the issue in a wrong branch
Hi Mohammad,
What you’re describing is quite strange. Can you provide a wireshark capture so I can try to find what is different between various ‘Connect’ requests and responses?
Hi Nikolay
I’ll try to do it, but at least for part 1–> it’s obvious that you have an internal error, so If you have a logging system, let me know, and I can send the error log for you to check it
As you can see, you send :
2147483646 = (0x7FFFFFFF = Unknown)-1 = Unknown – 1 = Internal Error
Log files are located in %programdata%\Milestone\XProtect Mobile Server\Logs and are organized by date.
Dear Nikolay
One more point: If I restart the mobile server, everything works fine for a while.
I attached the mobile server log.
This is Wireshark(error):
POST /XProtectMobile/Communication HTTP/1.1
Content-Type: text/xml
Connection: keep-alive
Host: demo-milestone
Accept-Encoding: gzip, x-gzip, deflate
Content-Length: 491
User-Agent: Apache-HttpClient/5.1 (Java/1.8.0_332)
<?xml version="1.0" encoding="UTF-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Command SequenceId="1"><Type>Request</Type><Name>Connect</Name><InputParams><Param Name="PublicKey" Value="fmFhDEj4rqRLq6EV49KxLhifZLoTe+1JkfgOBE7qutFF2CmTa4HCjRb3zmoKI1H88k1nYSk8j4c50LVuh49Tjgo11ZEf+di1p1Ru/7sA9rBMBivVW7qLVeU+YALfRAw6gAgszRxQql7GFyM1JsfF78YHp+zYCScAB9m9oO8ufDc="/></InputParams><OutputParams/></Command></Communication>HTTP/1.1 200 OK
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: text/xml
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; script-src 'self' https://www.gstatic.com http://www.googletagmanager.com/gtag/js; connect-src 'self' ws://*:* wss://*:* https://www.google-analytics.com/ https://firebaseinstallations.googleapis.com/; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self'; media-src data: blob: 'self' mediastream:;
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
Date: Mon, 18 Jul 2022 07:16:50 GMT
608
<?xml version="1.0" encoding="utf-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Command SequenceId="1"><Type>Response</Type><Name>Connect</Name><InputParams /><OutputParams><Param Name="ConnectionId" Value="23c2f176-dbc6-46d6-8f8a-7ca2053ede9a" /><Param Name="Timeout" Value="30" /><Param Name="ProtocolVersion" Value="3.1.0.0" /><Param Name="ServerVersion" Value="22.1.5403.1" /><Param Name="ServerId" Value="5a698325-c954-4a4e-b93d-643e44b11d63" /><Param Name="ServerProductCode" Value="1" /><Param Name="ChangePasswordRelativePath" Value="/IDP/Identity/Account/Manage/ChangePassword" /><Param Name="PublicKey" Value="3/G0xNBBwUWOWTjnhSGFWr1+f4Ce4ZyYHV59Rc/zQpn3ONwsrHJjmIfAd39UtvMLJEOV7KSg/yLDml0vbP3lZ3krrmUyaTQNaAbWgJpbPWj3d2TwtxGrbhg4XaIpIsF0HbmHJ947wegLFCgofDUEtM5ciLTEQpcRu6hvRzjwmrYA" /><Param Name="WebSocketSupport" Value="Yes" /><Param Name="EnableOemedClients" Value="Yes" /><Param Name="SecurityEnabled" Value="Yes" /><Param Name="CHAPSupported" Value="Yes" /><Param Name="CommandEncryptionSupported" Value="Yes" /><Param Name="JsonSupported" Value="No" /><Param Name="CollectUsageData" Value="No" /></OutputParams><Items><Item Id="00000000-0000-0000-0000-000000000000" Type="Endpoint" Folder="Yes"><Properties /><Items><Item Id="00000000-0000-0000-0000-000000000000" Type="Endpoint"><Properties ConnectionString="http://demo-milestone:8081/" EndpointType="AutomaticUrl" /><Items /></Item></Items></Item></Items><Result>OK</Result></Command></Communication>
4
0
POST /XProtectMobile/Communication HTTP/1.1
Content-Type: text/xml
Connection: keep-alive
Host: demo-milestone
Accept-Encoding: gzip, x-gzip, deflate
Content-Length: 462
User-Agent: Apache-HttpClient/5.1 (Java/1.8.0_332)
<?xml version="1.0" encoding="UTF-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ConnectionId>23c2f176-dbc6-46d6-8f8a-7ca2053ede9a</ConnectionId><Command SequenceId="2"><Type>Request</Type><Name>LogIn</Name><InputParams><Param Name="Username" Value="SgtsuohfxZLW9hu5cKHKDA=="/><Param Name="Password" Value="cZm3+Y85FD6wI9Nw65sIvw=="/></InputParams><OutputParams/></Command></Communication>HTTP/1.1 200 OK
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: text/xml
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; script-src 'self' https://www.gstatic.com http://www.googletagmanager.com/gtag/js; connect-src 'self' ws://*:* wss://*:* https://www.google-analytics.com/ https://firebaseinstallations.googleapis.com/; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self'; media-src data: blob: 'self' mediastream:;
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
Date: Mon, 18 Jul 2022 07:16:51 GMT
191
<?xml version="1.0" encoding="utf-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ConnectionId>23c2f176-dbc6-46d6-8f8a-7ca2053ede9a</ConnectionId><Command SequenceId="2"><Type>Response</Type><Name>LogIn</Name><InputParams /><OutputParams /><Items /><Result>Error</Result><ErrorCode>2147483646</ErrorCode></Command></Communication>
4
0
This is Wireshark(Success):
POST /XProtectMobile/Communication HTTP/1.1
Content-Type: text/xml
Connection: keep-alive
Host: demo-milestone
Accept-Encoding: gzip, x-gzip, deflate
Content-Length: 491
User-Agent: Apache-HttpClient/5.1 (Java/1.8.0_332)
<?xml version="1.0" encoding="UTF-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Command SequenceId="1"><Type>Request</Type><Name>Connect</Name><InputParams><Param Name="PublicKey" Value="fmFhDEj4rqRLq6EV49KxLhifZLoTe+1JkfgOBE7qutFF2CmTa4HCjRb3zmoKI1H88k1nYSk8j4c50LVuh49Tjgo11ZEf+di1p1Ru/7sA9rBMBivVW7qLVeU+YALfRAw6gAgszRxQql7GFyM1JsfF78YHp+zYCScAB9m9oO8ufDc="/></InputParams><OutputParams/></Command></Communication>HTTP/1.1 200 OK
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: text/xml
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; script-src 'self' https://www.gstatic.com http://www.googletagmanager.com/gtag/js; connect-src 'self' ws://*:* wss://*:* https://www.google-analytics.com/ https://firebaseinstallations.googleapis.com/; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self'; media-src data: blob: 'self' mediastream:;
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
Date: Mon, 18 Jul 2022 07:36:31 GMT
608
<?xml version="1.0" encoding="utf-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Command SequenceId="1"><Type>Response</Type><Name>Connect</Name><InputParams /><OutputParams><Param Name="ConnectionId" Value="4ffd5a90-e170-4931-8b11-2132fffba52c" /><Param Name="Timeout" Value="30" /><Param Name="ProtocolVersion" Value="3.1.0.0" /><Param Name="ServerVersion" Value="22.1.5403.1" /><Param Name="ServerId" Value="5a698325-c954-4a4e-b93d-643e44b11d63" /><Param Name="ServerProductCode" Value="1" /><Param Name="ChangePasswordRelativePath" Value="/IDP/Identity/Account/Manage/ChangePassword" /><Param Name="PublicKey" Value="q07GcJrDhvc2gpAMVqMJ2hLneLn9vPIHjQJPb4WUNZcpUjTDG5Qx0uX11paLW5BMkj3WRv0Cm+TXVgy/qpaYcT5B5OHxHeLYQYJYW5lTiTHwejxDzXUZVP6zeughBXp8yXy/2+bpLOYs18wt+kb5FzVX/+ZsE7PhdjgSPaDwTVM=" /><Param Name="WebSocketSupport" Value="Yes" /><Param Name="EnableOemedClients" Value="Yes" /><Param Name="SecurityEnabled" Value="Yes" /><Param Name="CHAPSupported" Value="Yes" /><Param Name="CommandEncryptionSupported" Value="Yes" /><Param Name="JsonSupported" Value="No" /><Param Name="CollectUsageData" Value="No" /></OutputParams><Items><Item Id="00000000-0000-0000-0000-000000000000" Type="Endpoint" Folder="Yes"><Properties /><Items><Item Id="00000000-0000-0000-0000-000000000000" Type="Endpoint"><Properties ConnectionString="http://demo-milestone:8081/" EndpointType="AutomaticUrl" /><Items /></Item></Items></Item></Items><Result>OK</Result></Command></Communication>
4
0
POST /XProtectMobile/Communication HTTP/1.1
Content-Type: text/xml
Connection: keep-alive
Host: demo-milestone
Accept-Encoding: gzip, x-gzip, deflate
Content-Length: 462
User-Agent: Apache-HttpClient/5.1 (Java/1.8.0_332)
<?xml version="1.0" encoding="UTF-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ConnectionId>4ffd5a90-e170-4931-8b11-2132fffba52c</ConnectionId><Command SequenceId="2"><Type>Request</Type><Name>LogIn</Name><InputParams><Param Name="Username" Value="LOBIZ8PyN3WOLnTq2hyaqA=="/><Param Name="Password" Value="oaRehgXGu4ZtykJWnpv/3g=="/></InputParams><OutputParams/></Command></Communication>HTTP/1.1 200 OK
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: text/xml
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; script-src 'self' https://www.gstatic.com http://www.googletagmanager.com/gtag/js; connect-src 'self' ws://*:* wss://*:* https://www.google-analytics.com/ https://firebaseinstallations.googleapis.com/; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self'; media-src data: blob: 'self' mediastream:;
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
Date: Mon, 18 Jul 2022 07:36:33 GMT
a7c
<?xml version="1.0" encoding="utf-8"?><Communication xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ConnectionId>4ffd5a90-e170-4931-8b11-2132fffba52c</ConnectionId><Command SequenceId="2"><Type>Response</Type><Name>LogIn</Name><InputParams /><OutputParams><Param Name="VideoPush" Value="No" /><Param Name="VideoPushAudio" Value="No" /><Param Name="Bookmark" Value="No" /><Param Name="SupportsBookmarks" Value="No" /><Param Name="SupportsBookmarkExtendedSearchCameraIds" Value="No" /><Param Name="VideoPushLocation" Value="No" /><Param Name="OutputsAndEvents" Value="Yes" /><Param Name="Exports" Value="Yes" /><Param Name="ViewOthersExports" Value="No" /><Param Name="ExportToAvi" Value="No" /><Param Name="ExportToDb" Value="No" /><Param Name="ExportToMkv" Value="No" /><Param Name="Investigations" Value="Yes" /><Param Name="ViewOthersInvestigations" Value="No" /><Param Name="AllCamerasView" Value="Yes" /><Param Name="NativeStreamingAvailable" Value="No" /><Param Name="NativeStreamingRequired" Value="No" /><Param Name="NativeStreamingSuggested" Value="No" /><Param Name="TranscodedStreamingAvailable" Value="Yes" /><Param Name="SegmentedStreamingAvailable" Value="No" /><Param Name="FakeSegmentedStreamingNotSupported" Value="Yes" /><Param Name="SupportsCarousel" Value="Yes" /><Param Name="SupportsMap" Value="Yes" /><Param Name="SupportsExtendedResamplingFactor" Value="Yes" /><Param Name="MultiCameraPlayback" Value="Yes" /><Param Name="SupportsAlarms" Value="Yes" /><Param Name="AllViewsAndCamerasEnabled" Value="Yes" /><Param Name="Footages" Value="No" /><Param Name="SupportsAccessControl" Value="Yes" /><Param Name="SupportsOutgoingAudio" Value="Yes" /><Param Name="SupportsOutgoingPTTAudio" Value="Yes" /><Param Name="SupportsIncomingAudio" Value="Yes" /><Param Name="SupportsCommaSeparatedItemIds" Value="Yes" /><Param Name="PtzGestures" Value="Yes" /><Param Name="BasicUserManagementEnabled" Value="Yes" /><Param Name="ServerDescription" Value="XProtect Corporate 2022 R1 Test" /><Param Name="ServerType" Value="600" /><Param Name="DirectStreamingLive" Value="Yes" /><Param Name="DirectStreamingPlayback" Value="No" /><Param Name="SupportsH264InFmp4" Value="Yes" /><Param Name="SupportsH265InFmp4" Value="No" /><Param Name="DirectStreamingValidLicense" Value="Yes" /><Param Name="SupportsAdaptiveStreaming" Value="Yes" /><Param Name="SupportsPlaybackInfoHeader" Value="Yes" /><Param Name="SupportsPlaybackInTimeRange" Value="Yes" /><Param Name="ConfigurationId" Value="f7d88d3e-5bb9-4b89-a383-2d9a478fc9cf" /><Param Name="CoBranding" Value="No" /></OutputParams><Items /><Result>OK</Result></Command></Communication>
4
0
Hi Mohammad,
I see nothing suspicious in Log file. Also - your Login requests look good.
A user connection gets closed by the server if LiveMessage command is not sent by the client for more than 30 seconds.
Can you confirm that you’re sending such LiveMessage requests regularly?
You can change this setting from Management Client → Mobile Servers → Connectivity tab. If it’s not easy for you to send LiveMessage regularly, increase the value to a huge number, and see if the problem persists. Beware - this is not a permanent solution. Timeout should be kept low, to prevent from too many ungracefully closed connections.
![Client timeout]()
I think it’s a totally different subject,
I think I can get different connectionIDs per one user, and if I don’t send liveMessage to that connectionId, it should be close. so for example I can not get stream from that connectionId.
But here it’s a starting point, getting 2 connectionIds at the beginning point
so I don’t talk about that my connection is going to be close–> I talk about that sometimes when I request a connectionId after less than 1-second login, I get this error
please make me correct if I’m thinking wrong
OK, I see you point. But are you trying to have two simultaneous connections open from the same JS SDK? This is not a supported scenario.
This is my scenario:
I don’t want to share user/pass with clients.
So I get connectionId in my server side(Java spring) and send it to clients for getting a stream
Our clients use different Languages such as C#, javaScript or …
And this error does not relate to js or…,
I got it in my server side(java spring)
But I got the same with the postman
As u can see in Wireshark which I sent, first I request a login request, then I request to get connection Id in less than 1second
About the mobile server log, I think somehow u forgot to log the internal error because I can’t see any errors in the log file.
Just an offer, Can you make a hotfix about this logging problem, then maybe we can find this issue.
Let me know what do u think:)
From what I can see in sources, InternalError is already logged in the Login command. So I cannot make a hotfix for that, it’s already there.
Of course it’s possible that in your case the error occurs at different part of the code and that’s why it’s not logged. Currently I cannot explain with certainty why you log is missing the error.
So any idea how can we resolve this issue?
Ps: I checked other log files (for example for recording server and …)
I can’t see any related errors in the specific date/time
Several more ideas:
1. Please provide MIP SDK logs (together with new logs from Mobile server). Location is by default [C:\ProgramData\Milestone\MIPSDK](file:C:/ProgramData/Milestone/MIPSDK)
2. Try to reproduce the issue using WebClient. If it’s a general server error, it will appear when using any client. Otherwise it must be something client-specific.
3. The username you’re using, is it completely unique? I mean, is it possible that you have a basic VMS user and a domain user with the same name?
4. Try to login without encryption. To do that you need to open the mobile server configuration (usually [C:\Program Files\Milestone\XProtect](file:C:/Program%C2%A0Files/Milestone/XProtect) Mobile Server\VideoOS.MobileServer.Service.exe.config.xml) and add
…
<add key="Encrypted" value="False"/>
<add key="Username" value=""/>
<add key="Password" value=""/>
<add key="Authtype" value="Negotiate"/>
<add key="PlainTextAuthenticationEnabled" value="**True**"/>
<!--add key = "Authtype" value = "Digest"/-->
<!--add key = "Authtype" value = "Basic"/-->
…
then change
<add key="Enabled" value="True" />
to
<add key="Enabled" value="False" />
and restart Mobile server.
After that you should be able to log in without any encryption. Let’s see if this makes any change.