Attempt to read data from the server failed...
I'm getting the following error on one of my email accounts:
+There may be a problem with the mail server or network. Verify the settings for account “[my account]” or try again.+
+The server returned the error: The attempt to read data from the server “[my account]” failed.+
I'd like to find out more about the error, so that I can start to track this down and see if there is a problem with the mail server settings, or if the problem is on my end.
I don't see any reference to this error in the logs – would it be somewhere else?
I've just solved a similar issue.
I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click "get mail" and I'd get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:
The server error encountered was: The attempt to read data from the server...
I found solutions for those using IMAP mail:
modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.
I'd made this change on my server but it didn't seem to have any effect. It dawned on me that I'm using POP, no IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.
This has taken me more than two days to fix and I hope posting this helps someone else with the same issue.
Similar Messages
-
The attempt to read data from the server failed
Today I was looking into an error with several IMAP accounts in Apple Mail:
+The attempt to read data from the server "<<servername.tld>>" failed.+
At first I thought this was an Apple Mail problem, as the accounts in question seemed to work just fine when not used in combination. One possible answer to this problem is rather short:
Apple Mail uses IMAP caching, which uses more than 4 connections at the same time to the mail server. Some mail servers (like courier-imap in its default configuration) do not allow that much connections from the same IP address. The more accounts you are trying to connect to at the same time raises this number of connections. Meaning while you could probably check one account for new mails, the second will ultimately fail for no obvious reasons. The only solution to this problem is to raise the connections allowed by your IMAP server software. this solution only applies to people who have root access to their mail server.
in courier-imap you have to edit /etc/courier-imap/imapd
and change MAXPERIP=4 to a higher number (5 to 10 times the number of accounts you want to check simultaneously)
and change MAXDAEMONS=40 to a higher number (with only one user 200 might work, whereas if you serve multiple users, something like 500 or higher might be better suited).
of course increasing the numbers increases load on your server. this is why there are these restrictions in place.MY SOLUTION REPOSTED FROM ANOTHER THREAD:
I've just solved a similar issue.
I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click "get mail" and I'd get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:
"The server error encountered was: The attempt to read data from the server..."
I found solutions for those using IMAP mail:
modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.
I'd made this change on my server but it didn't seem to have any effect. It dawned on me that I'm using POP, not IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.
This has taken me more than two days to fix and I hope posting this helps someone else with the same issue. -
Server error: "The attempt to read data from the server '(null)' failed"
Multiple times during each day my client (Mail.app) puts up a little exclamation mark "!" next to the mail account hosted on our Leopard Server. Clicking on this little alert icon pops up a message that reads:
+There may be a problem with the mail server or network. Verify the settings for account “Leopard Server Account” or try again.+
+The server returned the error: The attempt to read data from the server “(null)” failed.+
I can make the "!" go away by choosing Mailbox>Synchronize>Leopard Server Account. And everything seems peachy but it inevitably pops up again in another hour or two. It's annoying because I'm not sure if mail is getting through or not when the "!" is up.
Any ideas why this is happening?MY SOLUTION REPOSTED FROM ANOTHER THREAD:
I've just solved a similar issue.
I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click "get mail" and I'd get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:
"The server error encountered was: The attempt to read data from the server..."
I found solutions for those using IMAP mail:
modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.
I'd made this change on my server but it didn't seem to have any effect. It dawned on me that I'm using POP, not IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.
This has taken me more than two days to fix and I hope posting this helps someone else with the same issue. -
<rant>I have seen many people complaining about this. I've seen lots of suggestions; change your POP3 SSL number, twist your knee backwards whilst standing on just your little finger. Nothing works. I'd like to not have to migrate to a new Mail software.
</rant>
I thank you.
<Edited by Host>MY SOLUTION REPOSTED FROM ANOTHER THREAD:
I've just solved a similar issue.
I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click "get mail" and I'd get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:
"The server error encountered was: The attempt to read data from the server..."
I found solutions for those using IMAP mail:
modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.
I'd made this change on my server but it didn't seem to have any effect. It dawned on me that I'm using POP, not IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.
This has taken me more than two days to fix and I hope posting this helps someone else with the same issue. -
TT16060: Failed to read data from the network. select() timed out
hi!
i am working on active standby pair.....i created
[activedsn]
Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
DataStore=/d01/oracle/tt70/TimesTen/tt70/info/activedsn
DatabaseCharacterSet=WE8MSWIN1252
PermSize=10
[standbydsn]
Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
DataStore=/d01/oracle/tt70/TimesTen/tt70/info/standbydsn
DatabaseCharacterSet=WE8MSWIN1252
PermSize=10
[sub3]
Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
DataStore=/d01/oracle/tt70/TimesTen/tt70/info/sub3
DatabaseCharacterSet=WE8MSWIN1252
PermSize=10
replication schemes; .............all are on same hosts..........
activedsn datastore.............
Command> create table readtab(a number not null primary key,b varchar2(31));
Command> insert into readtab values(101,'aaaa');
1 row inserted.
Command> commit;
command>create active standby pair activedsn on "tap2.test3.com",standbydsn on "tap2.test3.com" return receipt subscriber sub3 on "tap2.test3.com";
standbydsn datastore..........
command>ttrepadmin -duplicate -from activedsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=standbydsn";
sub3 datastore..........
command>ttrepadmin -duplicate -from standbydsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=sub3";
now they are working fine when i insert something from activedsn it is replicated to standbydsn and from standbydsn to sub3 ......
problem:
but when i test "Recovering from a failure of the standby master data store"
i ttdestroy standbydsn..............and on activedsn i executed
command>call ttrepstatesave('failed','standbydsn','tap2.test3.com');
after that all updates from activedsn were replicated to sub3....in the meanwhile i again duplicated standbydsn from activedsn
command>ttrepadmin -duplicate -from activedsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=standbydsn";
now what happens updates from activedsn are replicated to standbydsn but no updates are replicated to sub3 it is giving error
15:24:29.29 Warn: REP: 7077: SUB3:receiver.c(1931): TT16060: Failed to read data from the network. select() timed out
15:29:36.09 Warn: REP: 7008: STANDBYDSN:receiver.c(1931): TT16060: Failed to read data from the network. TimesTen replication agent is stopping
replication agents for all are running.............
please helppppp..........
Edited by: Muhammad.Usman on Oct 13, 2009 2:57 AM
Edited by: Muhammad.Usman on Oct 13, 2009 3:08 AM[timesten@tap2 bin]$ ttrepadmin -showconfig activedsn
Self host "TAP2.TEST3.COM", port auto, name "ACTIVEDSN", LSN 0/916688, timeout 120, threshold 0
List of subscribers
Peer name Host name Port State Proto
SUB3 TAP2.TEST3.COM Auto Start 24
Last Msg Sent Last Msg Recv Latency TPS RecordsPS
00:00:03 - -1.00 -1 -1
Peer name Host name Port State Proto
STANDBYDSN TAP2.TEST3.COM Auto Start 24
Last Msg Sent Last Msg Recv Latency TPS RecordsPS
00:00:03 00:00:04 -1.00 -1 -1
List of objects and subscriptions
Table details
Table : ADM.READTAB Timestamp updates : -
Master Name Subscriber name
STANDBYDSN SUB3
STANDBYDSN ACTIVEDSN
Table details
Table : ADM.READTAB Timestamp updates : -
Master Name Subscriber name
ACTIVEDSN SUB3
ACTIVEDSN STANDBYDSN
Datastore details
Master Name Subscriber name
STANDBYDSN SUB3
STANDBYDSN ACTIVEDSN
Datastore details
Master Name Subscriber name
ACTIVEDSN SUB3
ACTIVEDSN STANDBYDSN
[timesten@tap2 bin]$ ttrepadmin -showstatus activedsn
Replication Agent Status as of: 2009-10-13 20:42:02
DSN : activedsn
Process ID : 19000 (Started)
Replication Agent Policy : manual
Host : TAP2.TEST3.COM
RepListener Port : 58698 (AUTO)
Last write LSN : 0.973840
Last LSN forced to disk : 0.973840
Replication hold LSN : 0.968456
Replication Peers:
Name : SUB3
Host : TAP2.TEST3.COM
Port : 58371 (AUTO) (Connected)
Replication State : STARTED
Communication Protocol : 24
Name : STANDBYDSN
Host : TAP2.TEST3.COM
Port : 59000 (AUTO) (Connected)
Replication State : STARTED
Communication Protocol : 24
TRANSMITTER thread(s):
For : SUB3
Start/Restart count : 6
Send LSN : 0.971432
Transactions sent : 2
Total packets sent : 158
Tick packets sent : 112
MIN sent packet size : 48
MAX sent packet size : 568
AVG sent packet size : 59
Last packet sent at : 20:42:00
Total Packets received: 158
MIN rcvd packet size : 48
MAX rcvd packet size : 96
AVG rcvd packet size : 64
Last packet rcvd'd at : 20:42:00
TRANSMITTER thread(s):
For : STANDBYDSN
Start/Restart count : 4
Send LSN : 0.971432
Transactions sent : 2
Total packets sent : 106
Tick packets sent : 84
MIN sent packet size : 48
MAX sent packet size : 560
AVG sent packet size : 63
Last packet sent at : 20:42:00
Total Packets received: 104
MIN rcvd packet size : 48
MAX rcvd packet size : 96
AVG rcvd packet size : 66
Last packet rcvd'd at : 20:42:00
Most recent errors (max 5):
TT16122 in transmitter.c (line 3313) at 20:28:28 on 10-13-2009
TT16121 in transmitter.c (line 3048) at 20:28:28 on 10-13-2009
TT16060 in transmitter.c (line 5028) at 20:33:59 on 10-13-2009
TT16122 in transmitter.c (line 3313) at 20:33:59 on 10-13-2009
TT16121 in transmitter.c (line 3048) at 20:33:59 on 10-13-2009
RECEIVER thread(s):
For : STANDBYDSN
Start/Restart count : 1
Transactions received : 0
Total packets sent : 33
Tick packets sent : 0
MIN sent packet size : 48
MAX sent packet size : 68
AVG sent packet size : 67
Last packet sent at : 20:42:00
Total Packets received: 33
MIN rcvd packet size : 48
MAX rcvd packet size : 135
AVG rcvd packet size : 51
Last packet rcvd'd at : 20:42:00
[timesten@tap2 bin]$
[timesten@tap2 bin]$ ttrepadmin -showstatus standbydsn
Replication Agent Status as of: 2009-10-13 20:42:35
DSN : standbydsn
Process ID : 19102 (Started)
Replication Agent Policy : manual
Host : TAP2.TEST3.COM
RepListener Port : 59000 (AUTO)
Last write LSN : 0.1007904
Last LSN forced to disk : 0.1007904
Replication hold LSN : 0.1002472
Replication Peers:
Name : SUB3
Host : TAP2.TEST3.COM
Port : 58371 (AUTO) (Connected)
Replication State : STARTED
Communication Protocol : 24
Name : ACTIVEDSN
Host : TAP2.TEST3.COM
Port : 58698 (AUTO) (Connected)
Replication State : STARTED
Communication Protocol : 24
TRANSMITTER thread(s):
For : SUB3
Start/Restart count : 2
Send LSN : 0.1005496
Transactions sent : 1
Total packets sent : 48
Tick packets sent : 33
MIN sent packet size : 48
MAX sent packet size : 568
AVG sent packet size : 65
Last packet sent at : 20:42:30
Total Packets received: 48
MIN rcvd packet size : 48
MAX rcvd packet size : 96
AVG rcvd packet size : 64
Last packet rcvd'd at : 20:42:30
Most recent errors (max 5):
TT16229 in transmitter.c (line 6244) at 20:38:01 on 10-13-2009
TRANSMITTER thread(s):
For : ACTIVEDSN
Start/Restart count : 1
Send LSN : 0.1005496
Transactions sent : 0
Total packets sent : 36
Tick packets sent : 34
MIN sent packet size : 48
MAX sent packet size : 135
AVG sent packet size : 50
Last packet sent at : 20:42:30
Total Packets received: 36
MIN rcvd packet size : 48
MAX rcvd packet size : 68
AVG rcvd packet size : 67
Last packet rcvd'd at : 20:42:30
RECEIVER thread(s):
For : ACTIVEDSN
Start/Restart count : 1
Transactions received : 1
Total packets sent : 42
Tick packets sent : 0
MIN sent packet size : 48
MAX sent packet size : 96
AVG sent packet size : 66
Last packet sent at : 20:42:30
Total Packets received: 47
MIN rcvd packet size : 48
MAX rcvd packet size : 190
AVG rcvd packet size : 58
Last packet rcvd'd at : 20:42:30
[timesten@tap2 bin]$
[timesten@tap2 bin]$ ttrepadmin -showstatus sub3
Replication Agent Status as of: 2009-10-13 20:43:05
DSN : sub3
Process ID : 18898 (Started)
Replication Agent Policy : manual
Host : TAP2.TEST3.COM
RepListener Port : 58371 (AUTO)
Last write LSN : 0.707088
Last LSN forced to disk : 0.707088
Replication hold LSN : -1.-1
Replication Peers:
Name : ACTIVEDSN
Host : TAP2.TEST3.COM
Port : 0 (AUTO)
Replication State : STARTED
Communication Protocol : 24
Name : STANDBYDSN
Host : TAP2.TEST3.COM
Port : 0 (AUTO)
Replication State : STARTED
Communication Protocol : 24
RECEIVER thread(s):
For : ACTIVEDSN
Start/Restart count : 1
Transactions received : 0
Total packets sent : 46
Tick packets sent : 0
MIN sent packet size : 48
MAX sent packet size : 96
AVG sent packet size : 65
Last packet sent at : 20:43:00
Total Packets received: 46
MIN rcvd packet size : 48
MAX rcvd packet size : 134
AVG rcvd packet size : 51
Last packet rcvd'd at : 20:43:00
RECEIVER thread(s):
For : STANDBYDSN
Start/Restart count : 1
Transactions received : 1
Total packets sent : 45
Tick packets sent : 0
MIN sent packet size : 48
MAX sent packet size : 96
AVG sent packet size : 66
Last packet sent at : 20:43:00
Total Packets received: 50
MIN rcvd packet size : 48
MAX rcvd packet size : 190
AVG rcvd packet size : 56
Last packet rcvd'd at : 20:43:00
[timesten@tap2 bin]$
[timesten@tap2 bin]$
Edited by: Muhammad.Usman on Oct 13, 2009 9:57 PM -
Hi Everybody,
i'm playing a little bit with Windows Azure and I'm blocked with a really simple issue (or maybe not).
I've created a Cloud Service containing one simple Worker Role. I've configured an EndPoint in the WorkerRole configuration, which allows Input connections via tcp on port 10100.
Here the ServiceDefinition.csdef file content:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="EmacCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3">
<WorkerRole name="TcpListenerWorkerRole" vmsize="Small">
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="tcp" port="10100" />
</Endpoints>
</WorkerRole>
</ServiceDefinition>
This WorkerRole is just creating a TcpListener object listening to the configured port (using the RoleEnvironment instance) and waits for an incoming connection. It receives a message and returns a hardcoded message (see code snippet below).
namespace TcpListenerWorkerRole
using System;
using System.Net;
using Microsoft.WindowsAzure.ServiceRuntime;
using System.Net.Sockets;
using System.Text;
using Roche.Emac.Infrastructure;
using System.IO;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Diagnostics;
using System.Linq;
public class WorkerRole : RoleEntryPoint
public override void Run()
// This is a sample worker implementation. Replace with your logic.
LoggingProvider.Logger.Info("TcpListenerWorkerRole entry point called");
TcpListener listener = null;
try
listener = new TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint);
listener.ExclusiveAddressUse = false;
listener.Start();
LoggingProvider.Logger.Info(string.Format("TcpListener started at '{0}:{1}'", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Address, RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Port));
catch (SocketException ex)
LoggingProvider.Logger.Exception("Unexpected exception while creating the TcpListener", ex);
return;
while (true)
Task.Run(async () =>
TcpClient client = await listener.AcceptTcpClientAsync();
LoggingProvider.Logger.Info(string.Format("Client connected. Address='{0}'", client.Client.RemoteEndPoint.ToString()));
NetworkStream networkStream = client.GetStream();
StreamReader reader = new StreamReader(networkStream);
StreamWriter writer = new StreamWriter(networkStream);
writer.AutoFlush = true;
string input = string.Empty;
while (true)
try
char[] receivedChars = new char[client.ReceiveBufferSize];
LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
char[] validChars = new char[readedChars];
Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
input = new string(validChars);
LoggingProvider.Logger.Info("This is what the host sent to you: " + input+". Readed chars=" + readedChars);
try
string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
writer.Write(orderResultFormat);
catch (Exception e)
LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
client.Close();
break;
catch (Exception ex)
LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
client.Close();
break;
}).Wait();
public override bool OnStart()
// Set the maximum number of concurrent connections
ServicePointManager.DefaultConnectionLimit = 12;
DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");
RoleEnvironment.Changing += RoleEnvironment_Changing;
return base.OnStart();
private void RoleEnvironment_Changing(object sender, RoleEnvironmentChangingEventArgs e)
// If a configuration setting is changing
LoggingProvider.Logger.Info("RoleEnvironment is changing....");
if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
// Set e.Cancel to true to restart this role instance
e.Cancel = true;
As you can see, nothing special is being done. I've used the RoleEnvironment.CurrentRoleInstance.InstanceEndpoints to retrieve the current IPEndpoint.
Running the Cloud Service in the Windows Azure Compute Emulator everything works fine, but when I deploy it in Azure, then I receive the following Exception:
2014-08-06 14:55:23,816 [Role Start Thread] INFO EMAC Log - TcpListenerWorkerRole entry point called
2014-08-06 14:55:24,145 [Role Start Thread] INFO EMAC Log - TcpListener started at '100.74.10.55:10100'
2014-08-06 15:06:19,375 [9] INFO EMAC Log - Client connected. Address='196.3.50.254:51934'
2014-08-06 15:06:19,375 [9] INFO EMAC Log - Buffer size: 65536
2014-08-06 15:06:45,491 [9] FATAL EMAC Log - Unexpected exception while Reading the request
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at TcpListenerWorkerRole.WorkerRole.<>c__DisplayClass0.<<Run>b__2>d__0.MoveNext() in C:\Work\Own projects\EMAC\AzureCloudEmac\TcpListenerWorkerRole\WorkerRole.cs:line 60
I've already tried to configure an internal port in the ServiceDefinition.csdef file, but I get the same exception there.
As you can see, the client can connect to the service (the log shows the message: Client connected with the address) but when it tries to read the bytes from the stream, it throws the exception.
For me it seems like Azure is preventing the retrieval of the message. I've tried to disable the Firewall in the VM in Azure and the same continues happening.
I'm using Windows Azure SDK 2.3
Any help will be very very welcome!
Thanks in advance!
Javier
En caso de que la respuesta te sirva, porfavor, márcala como válida
Muchas gracias y suerte!
Javier Jiménez Roda
Blog: http://jimenezroda.wordpress.comhi Javier,
I changed your code like this:
private AutoResetEvent connectionWaitHandle = new AutoResetEvent(false);
public override void Run()
TcpListener listener = null;
try
listener = new TcpListener(
RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint"].IPEndpoint);
listener.ExclusiveAddressUse = false;
listener.Start();
catch (SocketException se)
return;
while (true)
IAsyncResult result = listener.BeginAcceptTcpClient(HandleAsyncConnection, listener);
connectionWaitHandle.WaitOne();
The HandleAsync method is your "While (true)" code:
private void HandleAsyncConnection(IAsyncResult result)
TcpListener listener = (TcpListener)result.AsyncState;
TcpClient client = listener.EndAcceptTcpClient(result);
connectionWaitHandle.Set();
NetworkStream netStream = client.GetStream();
StreamReader reader = new StreamReader(netStream);
StreamWriter writer = new StreamWriter(netStream);
writer.AutoFlush = true;
string input = string.Empty;
try
char[] receivedChars = new char[client.ReceiveBufferSize];
// LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
char[] validChars = new char[readedChars];
Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
input = new string(validChars);
// LoggingProvider.Logger.Info("This is what the host sent to you: " + input + ". Readed chars=" + readedChars);
try
string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
writer.Write(orderResultFormat);
catch (Exception e)
// LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
client.Close();
catch (Exception ex)
//LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
client.Close();
Please try it. For this error message, I suggest you could refer to this thread (http://stackoverflow.com/questions/6173763/using-windows-azure-to-use-as-a-tcp-server
) and this post (http://stackoverflow.com/a/5420788).
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
GUI_UPLOAD NOT READING DATA FROM PRESENTATION SERVER
H HI IN MY APPLICATION I HAVE USED GUI _UPLOAD TO READ DATA FROM PRESENTATION SERVER IT WAS WORKING FINE BUT NOW I HAVE SCHEDULED IT IN BACK BACKGROUND WHEN I DEBUGGED IT GUI _UPLOADI NOT READING DATA FROM PRESENTATION SERVER
Edited by: ravikumar1006 on Mar 10, 2012 1:18 PM
Moderator message: FAQ, please search before posting, do not write in all upper case.
Edited by: Thomas Zloch on Mar 10, 2012 3:17 PMThe issue is that, when you schedule a program as background job runs on application server not on local pc for that program use the application server resurces and its not possible to read files from pc. You can find a lot of answers in forum for this
-
Error reading data from the MS Dos Console.
Hi,
We have a legacy application which is launched via a 3rd-party Telnet Server - the app acts as a remote shell for an RF device. The system has been functioning for many years but now we have migrated to Server 2012 the system no longer launches.
The RF device successfully connects to the telnet server, logs-in with embedded credentails but drops the connection when the shell application is launched.
The server has the following Application error
Error reading data from the MS Dos Console.
The pipe has been ended. 109 (0x6d)
The application can successfully be launched locally outside of the shell on the server. The error is reproducable across RF devices and desktop telnet connections.
The firewalls are off.
Are there some additional protections in Server 2012 which would cause the pipe-based link to be stopped when launching the exe? Am I missing something? The 3rd-party telnet server is certified for Server 2012.
Thnak youI'd ask in the
Windows Server General Forum, or ask the third party vendor.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
My Blog: http://unlockpowershell.wordpress.com
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"}) -
Unable to read data from the SAP marketplace
Hi All,
These days, certain packages in my download basketball cannot be downloaded, while others can be downloaded normally.
After serveral redirecting, the SAP download manager keeps informing me that "Unable to read data from the SAP marketplace, check your settings and try again".
Anyone knows how to solve it?
Thanks,
YiningHi Yining,
You user on SAP MarketPlace is locked.
You have to unlock it but I do not know the way.
Check in user data maintenance on SAP MarketPlace who is your responsible and perhaps he wwill be able to solve to unlock our user.
Regards,
Ronan -
Unable to read data from the SAP Service Marketplace issue
Good morning, experts.
I´ve just installed the SAP Download Manager, but I can´t get connected to Marketplace.
First I tried downloading a file I could see in my Basket Download. Then I deleted it from the basket so I could test only the connection. In both situations I got the same error message: "Unable to read data from the SAP Service Marketplace (...)".
It is probably due to wrong settings, but I can´t figure it out. My settings are:
Address: https://websmp205.sap-ag.de/
User name: S0005951541
Password: (my password)
Proxy (my proxy settings)
Any ideas?Thanks for your answer.
I can see my download basket online. I realize I didn´t delete the items so I could test purely the connection. I am going to do it again.
I found out I dind´t have permission to download those items, and with the right permission I could download them directly online.
As long as I have more information I am going to repost this issue on a new forum.
Thanks. -
Failed to read data from report file, failed to read parameter object
Error message when doing a u201CSchedule List of Valuesu201D
failed to read data from report file,
c:\docume~1\user........
failed to read parameter object
Earlier in the day it worked just fine nothing had been changed.
I have admin right on the windows server and in central management console
Can someone please help with this issue.Hi Glenn
Please let us know the following:
1.What is the exact version of Crystal Reports Designer?
2.What is the version of Business objects Enterprise installed on the machine?
3.Are reports based on Business views,Deski,Webi?
4.Are the reports migrated from older version of Crystal Reports to new Version?
Thanks
Shraddha -
Problem to read data from application server.
read dataset reads data only up tp 255 char.
her i want to read more data .
and i am executing that in background so i can not use gui_upload then what is the solution.Read datasets should be able to read any length. Are you sure it is not your program that is truncating it?
GUI_UPLOAD is a FM to read files from the presentation server (your PC), at the end, it performs READ DATASET anyways.
Please provide code example.
Leonardo De Araujo -
Reading Data from SQL Server 2000 Linked Servers
Hello,
I have a colleague who wants to read data from a OO4O driver Linked Server my FRENCH_FRANCE.US7ASCII Oracle 8i database.
He's got some troubles to read data with "é", "à", and so on. They always replaced by "?"
Since I have ask him to use SQL Developer on his server to see if he has got configuration problems, his PL/SQL queries return "square figure" characters (not the usual "²") instead of "?".
For info, I've said it to use CONVERT(column, 'FR8DEC', 'US7ASCII) but it doesn't work too (also try with 'UTF8' or 'WE8MSWIN1252')
Is there a way with the SQL Server collation ???
How can I solve his problem ???The select query returns the following infos :
PARAMETER VALUE
NLS_CHARACTERSET US7ASCII
NLS_NCHAR_CHARACTERSET US7ASCII
My colleague uses the 10.2.0.1.0 client with ODAC 10.2.0.2.20.
His SQL Server linked server is 2000 with the SQL_Latin1_General_CP437_BIN (he tried the use of the distant NLS_LANG option and the no set the NLS_LANG too with no results).
Thanks in advance,
Yours,
Mickaël -
How to read data from the PDF file
Hi
i need pdf related API details and sample program to retrive the data from the pdf.Did you even try looking this one up yourself? Google "java pdf" and you get plenty of results. The first one looks pretty promising, and I'm sure there is plenty of documentation with the API.
-
How to read data from the data provider using javascript
Hi,
Please let me know how to read the data from the dataprovider using javascript(query assigned to the data provider).
My query has filter charateristics, free charateristics, charateristics in rows and key figure in column.
Thanks a lot for your kind help
Regards
KandasamyKandaswamy,
Assign an ID to your table item , then in JavaScript , you can use ID.innerHTML and you will get the HTML code within that table for the same , then you can find out how best to get the exact value you desire from the innerHTML value which is a string with the entire HTML from within the table item.
Arun
Hope it helps....
Maybe you are looking for
-
I need to move my itunes library to another computer. How do I do it?
How do I move my itunes library from one computer to another one?
-
TS3988 I erased my ipad iCloud account by accident. How can I get it restored?
I accidentally erased my iPad back ups from my iCloud account when I was attempting to erase my iPad because I was getting it replaced with a new one. How can I get that account back so I don't have to go through all my set ups again?
-
Living with the HDMI Logo Freeze
As many of you using HDMI know, switching to the AppleTV sometimes causes a Logo freeze. For me this has been happening since upgrading to 2.x software. I use an HDMI switcher box (not ONKYO related) and have the ATV set to 1080p. I sometimes use the
-
i have an iMac on OS X Yosemite 10.10. i have two equal user accounts and have just upgrade and installed the latest version of iPhoto to use on yosemite, every thing was fine and when i opened iPhoto it said i needed to upgrade the library which it
-
LDB selection screen -Diff b/w Data selection / person selection period
Hi Experts, Want to know what is the difference between Data Selection Period Person Selection Period in the other period , in the selection screen of the LDB PNP. Thanx in Advance. Regards, IFF