TSNet error 6

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
I have two apps that normally work fine but in both an occasional user will
get an error "TSNeterr : (6) could not resolve host". What would be the
cause of this sporadic problem? We're not sure what to tell these users.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
On Fri, Sep 1, 2017 at 11:40 AM, J. Landman Gay via use-livecode <
[hidden email]> wrote:

> I have two apps that normally work fine but in both an occasional user
> will get an error "TSNeterr : (6) could not resolve host". What would be
> the cause of this sporadic problem? We're not sure what to tell these users.
>

tsNet is reporting the curl error. You should be able to google something
like “curl error (6) could not resolve host” and find some potential
answers.

--
Trevor DeVore
ScreenSteps
www.screensteps.com
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
That is a DNS error. If referring to a host, you can use the NetBIOS name locally, the FQDN locally or remotely, or the IP number (which might change so that is always a bad idea).

Now if the host name is NetBIOS, a number of things can go wrong in a non-domain environment. With a domain server acting as your local DNS, it will resolve NetBIOS names to their FQDN equivalents via the WINS service. Barring that, NetBIOS name resolution falls back on an election process, where some windows computer is elected as the Master Browser, which is then responsible for tracing all devices on the network and their current IP addresses.

If it happens to be a regular workstation, and it is set to go to sleep after a certain amount of time, well another device has to become the master browser, and it won't know about the  server in question until it requests the current master browser and it might not do that for some time. See the problem?

So there are a couple ways around that. First you can configure the local router with a static DNS entry, and make sure the primary DNS server listed is that router. Alternately you can edit the hosts file on each workstatino and make a static entry there. The latter is probably going to be the most reliable, but starting with windows 7 I think that file is locked, so it requires elevated privileges.

Sucks huh? The best thing is to have a real DNS server locally (every router these days does this but not everyone configures their routers correctly) and then via the command line you *should* be able to register with the DNS server, but I'm not sure how.

Hope that is not too much.

Bob S


> On Sep 1, 2017, at 09:40 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> I have two apps that normally work fine but in both an occasional user will get an error "TSNeterr : (6) could not resolve host". What would be the cause of this sporadic problem? We're not sure what to tell these users.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
This is for an Android app that can be run from anywhere, so I don't
have control over the routers or servers. (And yeah, I didn't quite get
everything you were talking about, I'm a network novice.)

The apps run fine for most people and only get this error with a few
users. I think you're basically saying there's no cure, right?

If the web site has a static IP and the Android app uses that instead of
a domain name, will that fix it? The app is communicating with a
database on the web server.


On 9/1/17 12:12 PM, Bob Sneidar via use-livecode wrote:

> That is a DNS error. If referring to a host, you can use the NetBIOS name locally, the FQDN locally or remotely, or the IP number (which might change so that is always a bad idea).
>
> Now if the host name is NetBIOS, a number of things can go wrong in a non-domain environment. With a domain server acting as your local DNS, it will resolve NetBIOS names to their FQDN equivalents via the WINS service. Barring that, NetBIOS name resolution falls back on an election process, where some windows computer is elected as the Master Browser, which is then responsible for tracing all devices on the network and their current IP addresses.
>
> If it happens to be a regular workstation, and it is set to go to sleep after a certain amount of time, well another device has to become the master browser, and it won't know about the  server in question until it requests the current master browser and it might not do that for some time. See the problem?
>
> So there are a couple ways around that. First you can configure the local router with a static DNS entry, and make sure the primary DNS server listed is that router. Alternately you can edit the hosts file on each workstatino and make a static entry there. The latter is probably going to be the most reliable, but starting with windows 7 I think that file is locked, so it requires elevated privileges.
>
> Sucks huh? The best thing is to have a real DNS server locally (every router these days does this but not everyone configures their routers correctly) and then via the command line you *should* be able to register with the DNS server, but I'm not sure how.
>
> Hope that is not too much.
>
> Bob S
>
>
>> On Sep 1, 2017, at 09:40 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>>
>> I have two apps that normally work fine but in both an occasional user will get an error "TSNeterr : (6) could not resolve host". What would be the cause of this sporadic problem? We're not sure what to tell these users.
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
J,

I have run into many network issues on mobile. The chance that the user
might have a weak cell/wifi signal, move from cellular==>wifi or
wifi==>cellular is higher than one would think. This would be my first
guess. I always ask the user if Safari/Chrome is serving up pages. 99% of
the time network funnies are caused by weak/changing network access. The
amount of error checking and combinations thereof has been very challenging.
The first thing I do before any network access is to ping my server with a
https request to a LC backend server script that returns "OK". I set the
timeout for 2 seconds. If the returned data is not "OK" or take more than 2
seconds then I put the app into off-line mode. I try to ping the server
every time the users does "x" or the user's action again need network access
and see if the network is back online or fast enough.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of J. Landman Gay via use-livecode
Sent: Friday, September 01, 2017 4:42 PM
To: Bob Sneidar via use-livecode
Cc: J. Landman Gay
Subject: Re: TSNet error 6

This is for an Android app that can be run from anywhere, so I don't have
control over the routers or servers. (And yeah, I didn't quite get
everything you were talking about, I'm a network novice.)

The apps run fine for most people and only get this error with a few users.
I think you're basically saying there's no cure, right?

If the web site has a static IP and the Android app uses that instead of a
domain name, will that fix it? The app is communicating with a database on
the web server.


On 9/1/17 12:12 PM, Bob Sneidar via use-livecode wrote:
> That is a DNS error. If referring to a host, you can use the NetBIOS name
locally, the FQDN locally or remotely, or the IP number (which might change
so that is always a bad idea).
>
> Now if the host name is NetBIOS, a number of things can go wrong in a
non-domain environment. With a domain server acting as your local DNS, it
will resolve NetBIOS names to their FQDN equivalents via the WINS service.
Barring that, NetBIOS name resolution falls back on an election process,
where some windows computer is elected as the Master Browser, which is then
responsible for tracing all devices on the network and their current IP
addresses.
>
> If it happens to be a regular workstation, and it is set to go to sleep
after a certain amount of time, well another device has to become the master
browser, and it won't know about the  server in question until it requests
the current master browser and it might not do that for some time. See the
problem?
>
> So there are a couple ways around that. First you can configure the local
router with a static DNS entry, and make sure the primary DNS server listed
is that router. Alternately you can edit the hosts file on each workstatino
and make a static entry there. The latter is probably going to be the most
reliable, but starting with windows 7 I think that file is locked, so it
requires elevated privileges.
>
> Sucks huh? The best thing is to have a real DNS server locally (every
router these days does this but not everyone configures their routers
correctly) and then via the command line you *should* be able to register
with the DNS server, but I'm not sure how.
>
> Hope that is not too much.
>
> Bob S
>
>
>> On Sep 1, 2017, at 09:40 , J. Landman Gay via use-livecode
<[hidden email]> wrote:
>>
>> I have two apps that normally work fine but in both an occasional user
will get an error "TSNeterr : (6) could not resolve host". What would be the
cause of this sporadic problem? We're not sure what to tell these users.

>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode


On 01/09/2017 21:41, J. Landman Gay via use-livecode wrote:
>
> If the web site has a static IP and the Android app uses that instead
> of a domain name, will that fix it? The app is communicating with a
> database on the web server.
>
I think the answer is "it will stop you getting a tsnet error (6)".
That doesn't mean it will "fix" it. Most likely (as others have said in
more detail), it's a result of flaky or intermittent network connection
somewhere, making your DNS lookups fail incompletely. Using a static IP
will simply mean that no DNS lookup is needed - so your attempt to
transfer data will get started and likely fail in some other way because
of that flaky connection.

How (whether) that shows itself to the user is unpredictable :-)

Alex.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
On 9/1/17 6:18 PM, Alex Tweedly via use-livecode wrote:

>
>
> On 01/09/2017 21:41, J. Landman Gay via use-livecode wrote:
>>
>> If the web site has a static IP and the Android app uses that instead
>> of a domain name, will that fix it? The app is communicating with a
>> database on the web server.
>>
> I think the answer is "it will stop you getting a tsnet error (6)".
> That doesn't mean it will "fix" it. Most likely (as others have said in
> more detail), it's a result of flaky or intermittent network connection
> somewhere, making your DNS lookups fail incompletely. Using a static IP
> will simply mean that no DNS lookup is needed - so your attempt to
> transfer data will get started and likely fail in some other way because
> of that flaky connection.
>
> How (whether) that shows itself to the user is unpredictable :-)

That's a problem, the app needs to be dead reliable. But see my other
note about https connections. Those appear to have something to do with
the problem, but my tester won't get back to the coffee house for a
couple of days to find out for sure.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
Ralph

I'm just about to implement this in our new app.

I was only checking  on init and some other navigation points in the app, but it's clear now we have to check *everytime* we call the server. because, as you say, use can walk from his desk (wifi) to outside (drop to bad 3G) and then out into the open (suddenly gets 3 bars LTE) and the to the café (back up with 5 bar wifi)

all in a 10 minute walk!

how do you "see if…( it is)  fast enough"

is the assumption  that if you get something in under 2000 milliseconds than things should work OK, or are you tracking some packet stream?

Also why not just put a text file on the server

https://www.mydomain.com/ping.text

with the word "true"

Apple does this this… but their little static page just has the word "success" returned.

does your script give some advantage?

Brahmanathswami

 

On 9/1/17, 11:10 AM, "use-livecode on behalf of Ralph DiMola via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    The first thing I do before any network access is to ping my server with a
    https request to a LC backend server script that returns "OK". I set the
    timeout for 2 seconds. If the returned data is not "OK" or take more than 2
    seconds then I put the app into off-line mode. I try to ping the server
    every time the users does "x" or the user's action again need network access
    and see if the network is back online or fast enough.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
I would zero in on the https thing. If the user can get to an https web-site via Safari/Chrome on the same server as your DB then tsNet should work unless there is a bug in tsNet. The slack also problem has me concerned with the router. If we eliminate the tin-foil-hat possibilities then could there be a router issue in the coffee shop? Does this happen with other users in other places? I've seen routers do some strange things until a re-boot. The age of the router(or a pending firmware update) could also be in play. It's just so hard when you have no/zero/nada control over network connectivity.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: J. Landman Gay [mailto:[hidden email]] On Behalf Of J. Landman Gay
Sent: Friday, September 01, 2017 11:21 PM
To: [hidden email]
Subject: Re: TSNet error 6

In today's episode, the user was in a coffee house using the free wifi (it was one of my testers, there on purpose for testing). The app could not resolve the host though the connection would have been constant.
When he tests from his own home everything works, as it does for all of us on the team.

We're wondering if https has anything to do with it. He could connect to anything with Chrome but both my app and Slack would not work using https. Could that be a factor?

We need to keep testing to see if https is really the cause, we're not quite sure yet.

On 9/1/17 4:10 PM, Ralph DiMola wrote:

> J,
>
> I have run into many network issues on mobile. The chance that the
> user might have a weak cell/wifi signal, move from cellular==>wifi or
> wifi==>cellular is higher than one would think. This would be my first
> guess. I always ask the user if Safari/Chrome is serving up pages. 99%
> of the time network funnies are caused by weak/changing network
> access. The amount of error checking and combinations thereof has been very challenging.
> The first thing I do before any network access is to ping my server
> with a https request to a LC backend server script that returns "OK".
> I set the timeout for 2 seconds. If the returned data is not "OK" or
> take more than 2 seconds then I put the app into off-line mode. I try
> to ping the server every time the users does "x" or the user's action
> again need network access and see if the network is back online or fast enough.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On
> Behalf Of J. Landman Gay via use-livecode
> Sent: Friday, September 01, 2017 4:42 PM
> To: Bob Sneidar via use-livecode
> Cc: J. Landman Gay
> Subject: Re: TSNet error 6
>
> This is for an Android app that can be run from anywhere, so I don't
> have control over the routers or servers. (And yeah, I didn't quite
> get everything you were talking about, I'm a network novice.)
>
> The apps run fine for most people and only get this error with a few users.
> I think you're basically saying there's no cure, right?
>
> If the web site has a static IP and the Android app uses that instead
> of a domain name, will that fix it? The app is communicating with a
> database on the web server.
>
>
> On 9/1/17 12:12 PM, Bob Sneidar via use-livecode wrote:
>> That is a DNS error. If referring to a host, you can use the NetBIOS
>> name
> locally, the FQDN locally or remotely, or the IP number (which might
> change so that is always a bad idea).
>>
>> Now if the host name is NetBIOS, a number of things can go wrong in a
> non-domain environment. With a domain server acting as your local DNS,
> it will resolve NetBIOS names to their FQDN equivalents via the WINS service.
> Barring that, NetBIOS name resolution falls back on an election
> process, where some windows computer is elected as the Master Browser,
> which is then responsible for tracing all devices on the network and
> their current IP addresses.
>>
>> If it happens to be a regular workstation, and it is set to go to
>> sleep
> after a certain amount of time, well another device has to become the
> master browser, and it won't know about the  server in question until
> it requests the current master browser and it might not do that for
> some time. See the problem?
>>
>> So there are a couple ways around that. First you can configure the
>> local
> router with a static DNS entry, and make sure the primary DNS server
> listed is that router. Alternately you can edit the hosts file on each
> workstatino and make a static entry there. The latter is probably
> going to be the most reliable, but starting with windows 7 I think
> that file is locked, so it requires elevated privileges.
>>
>> Sucks huh? The best thing is to have a real DNS server locally (every
> router these days does this but not everyone configures their routers
> correctly) and then via the command line you *should* be able to
> register with the DNS server, but I'm not sure how.
>>
>> Hope that is not too much.
>>
>> Bob S
>>
>>
>>> On Sep 1, 2017, at 09:40 , J. Landman Gay via use-livecode
> <[hidden email]> wrote:
>>>
>>> I have two apps that normally work fine but in both an occasional
>>> user
> will get an error "TSNeterr : (6) could not resolve host". What would
> be the cause of this sporadic problem? We're not sure what to tell these users.
>>>
>>> --
>>> Jacqueline Landman Gay         |     [hidden email]
>>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
One other note. My banking app(RBS) on my phone sometimes(rarely) does not work even when I have connectivity while on the road. It honks that it can't get a secure connection. Then I move to another cell tower(I presume) and it works. Secure mobile communication requires a ton of app error checking and might not function in all circumstances.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: J. Landman Gay [mailto:[hidden email]] On Behalf Of J. Landman Gay
Sent: Friday, September 01, 2017 11:21 PM
To: [hidden email]
Subject: Re: TSNet error 6

In today's episode, the user was in a coffee house using the free wifi (it was one of my testers, there on purpose for testing). The app could not resolve the host though the connection would have been constant.
When he tests from his own home everything works, as it does for all of us on the team.

We're wondering if https has anything to do with it. He could connect to anything with Chrome but both my app and Slack would not work using https. Could that be a factor?

We need to keep testing to see if https is really the cause, we're not quite sure yet.

On 9/1/17 4:10 PM, Ralph DiMola wrote:

> J,
>
> I have run into many network issues on mobile. The chance that the
> user might have a weak cell/wifi signal, move from cellular==>wifi or
> wifi==>cellular is higher than one would think. This would be my first
> guess. I always ask the user if Safari/Chrome is serving up pages. 99%
> of the time network funnies are caused by weak/changing network
> access. The amount of error checking and combinations thereof has been very challenging.
> The first thing I do before any network access is to ping my server
> with a https request to a LC backend server script that returns "OK".
> I set the timeout for 2 seconds. If the returned data is not "OK" or
> take more than 2 seconds then I put the app into off-line mode. I try
> to ping the server every time the users does "x" or the user's action
> again need network access and see if the network is back online or fast enough.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On
> Behalf Of J. Landman Gay via use-livecode
> Sent: Friday, September 01, 2017 4:42 PM
> To: Bob Sneidar via use-livecode
> Cc: J. Landman Gay
> Subject: Re: TSNet error 6
>
> This is for an Android app that can be run from anywhere, so I don't
> have control over the routers or servers. (And yeah, I didn't quite
> get everything you were talking about, I'm a network novice.)
>
> The apps run fine for most people and only get this error with a few users.
> I think you're basically saying there's no cure, right?
>
> If the web site has a static IP and the Android app uses that instead
> of a domain name, will that fix it? The app is communicating with a
> database on the web server.
>
>
> On 9/1/17 12:12 PM, Bob Sneidar via use-livecode wrote:
>> That is a DNS error. If referring to a host, you can use the NetBIOS
>> name
> locally, the FQDN locally or remotely, or the IP number (which might
> change so that is always a bad idea).
>>
>> Now if the host name is NetBIOS, a number of things can go wrong in a
> non-domain environment. With a domain server acting as your local DNS,
> it will resolve NetBIOS names to their FQDN equivalents via the WINS service.
> Barring that, NetBIOS name resolution falls back on an election
> process, where some windows computer is elected as the Master Browser,
> which is then responsible for tracing all devices on the network and
> their current IP addresses.
>>
>> If it happens to be a regular workstation, and it is set to go to
>> sleep
> after a certain amount of time, well another device has to become the
> master browser, and it won't know about the  server in question until
> it requests the current master browser and it might not do that for
> some time. See the problem?
>>
>> So there are a couple ways around that. First you can configure the
>> local
> router with a static DNS entry, and make sure the primary DNS server
> listed is that router. Alternately you can edit the hosts file on each
> workstatino and make a static entry there. The latter is probably
> going to be the most reliable, but starting with windows 7 I think
> that file is locked, so it requires elevated privileges.
>>
>> Sucks huh? The best thing is to have a real DNS server locally (every
> router these days does this but not everyone configures their routers
> correctly) and then via the command line you *should* be able to
> register with the DNS server, but I'm not sure how.
>>
>> Hope that is not too much.
>>
>> Bob S
>>
>>
>>> On Sep 1, 2017, at 09:40 , J. Landman Gay via use-livecode
> <[hidden email]> wrote:
>>>
>>> I have two apps that normally work fine but in both an occasional
>>> user
> will get an error "TSNeterr : (6) could not resolve host". What would
> be the cause of this sporadic problem? We're not sure what to tell these users.
>>>
>>> --
>>> Jacqueline Landman Gay         |     [hidden email]
>>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
B,

Yes I assume that if I get a response in 2000 ms the link is fast enough. The text file should work but seeing I need the backend server for app functionality this test also makes sure that there is good connectivity and the web server/LC server is functioning in one test.

In one of my apps the user can save notes about each location retrieved from a static local DB. These notes a saved in a second local DB and also uploaded to the server for backup. So... I need to keep "last update" dates on both the device and the server and resolve this with every transaction and also on app startup just in case the user lost connectivity and saved a note locally to the device. I try to deal with all combination but I'm sure there some obscure race conditions that I am not handling, but it's not moving money, air traffic control or launching the space shuttle.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
Sent: Saturday, September 02, 2017 12:22 AM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: TSNet error 6

Ralph

I'm just about to implement this in our new app.

I was only checking  on init and some other navigation points in the app, but it's clear now we have to check *everytime* we call the server. because, as you say, use can walk from his desk (wifi) to outside (drop to bad 3G) and then out into the open (suddenly gets 3 bars LTE) and the to the café (back up with 5 bar wifi)

all in a 10 minute walk!

how do you "see if…( it is)  fast enough"

is the assumption  that if you get something in under 2000 milliseconds than things should work OK, or are you tracking some packet stream?

Also why not just put a text file on the server

https://www.mydomain.com/ping.text

with the word "true"

Apple does this this… but their little static page just has the word "success" returned.

does your script give some advantage?

Brahmanathswami

 

On 9/1/17, 11:10 AM, "use-livecode on behalf of Ralph DiMola via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    The first thing I do before any network access is to ping my server with a
    https request to a LC backend server script that returns "OK". I set the
    timeout for 2 seconds. If the returned data is not "OK" or take more than 2
    seconds then I put the app into off-line mode. I try to ping the server
    every time the users does "x" or the user's action again need network access
    and see if the network is back online or fast enough.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
Another Gotch ya... If you connect to a MySql DB (although https to back-end server is preferred) every time you do a query of some sort first do something simple like "SELECT 'I am Here'" or list the tables and see if you get back a number for the record set or a list of tables. If not then close the connection(found this keeps things from going sideways) and then re-connect to the MySql server.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
Sent: Saturday, September 02, 2017 12:22 AM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: TSNet error 6

Ralph

I'm just about to implement this in our new app.

I was only checking  on init and some other navigation points in the app, but it's clear now we have to check *everytime* we call the server. because, as you say, use can walk from his desk (wifi) to outside (drop to bad 3G) and then out into the open (suddenly gets 3 bars LTE) and the to the café (back up with 5 bar wifi)

all in a 10 minute walk!

how do you "see if…( it is)  fast enough"

is the assumption  that if you get something in under 2000 milliseconds than things should work OK, or are you tracking some packet stream?

Also why not just put a text file on the server

https://www.mydomain.com/ping.text

with the word "true"

Apple does this this… but their little static page just has the word "success" returned.

does your script give some advantage?

Brahmanathswami

 

On 9/1/17, 11:10 AM, "use-livecode on behalf of Ralph DiMola via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    The first thing I do before any network access is to ping my server with a
    https request to a LC backend server script that returns "OK". I set the
    timeout for 2 seconds. If the returned data is not "OK" or take more than 2
    seconds then I put the app into off-line mode. I try to ping the server
    every time the users does "x" or the user's action again need network access
    and see if the network is back online or fast enough.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
RalphM wrote:
> The first thing I do before any network access is to ping my server with a
> https request to a LC backend server script that returns "OK". I set the
> timeout for 2 seconds. If the returned data is not "OK" or take more than 2
> seconds then I put the app into off-line mode.


On IOS this is a bit easier.

See

reachabilityChanged
iphoneReachabilityTarget
iphoneSetReachabilityTarget

 in LC’s dictionary.

"The network connection on iOS devices is generally more transient than normal network connections and can change between wireless and wide-area wireless (GPRS, 3G, EDGE etc.) transport as it moves, and indeed be lost entirely. As the behavior of an application may vary depending on what kind of network connection is present it is useful to be able to monitor a given server for the type of connection the device currently has to it."

Jim Lambert
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
It happens to other users in other places, but only occasionally --
though we haven't got a whole lot of users yet, mostly just the client
and some testers. The reason we started looking into this is because the
client was giving a demo and it totally failed (ouch. He was trying to
sell it.) So we started trying to reproduce the problem. None of us had
any trouble on our home networks. One of us went to a coffee shop and
could reproduce it there. The client had the problem at the location of
his demo, went home and still had the problem, then suddenly at home it
started working again. Up until that day he'd had no issues on his home
network (I wonder if it was storing the DNS from the demo site. Is that
a thing?)

It is always the same error and is unpredictable. We're sending the
tester back to the coffee shop on Monday so we can experiment with
turning off https.

On 9/2/17 8:39 AM, Ralph DiMola wrote:
> I would zero in on the https thing. If the user can get to an https web-site via Safari/Chrome on the same server as your DB then tsNet should work unless there is a bug in tsNet. The slack also problem has me concerned with the router. If we eliminate the tin-foil-hat possibilities then could there be a router issue in the coffee shop? Does this happen with other users in other places? I've seen routers do some strange things until a re-boot. The age of the router(or a pending firmware update) could also be in play. It's just so hard when you have no/zero/nada control over network connectivity.


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
On 9/2/17 8:39 AM, Ralph DiMola wrote:
> I would zero in on the https thing.

I found this on stackOverflow
<https://stackoverflow.com/questions/1341644/curl-and-https-cannot-resolve-host>:
       
***
I found that CURL can decide to use IPv6, in which case it tries to
resolve but doesn't get an IPv6 answer (or something to that effect) and
times out.

You can try the command line switch -4 to test this out.

In PHP, you can configure this line by setting this:

curl_setopt($_h, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
***

Several people in that thread report the problem started suddenly in
March of this year. Could this be related?

Charles W: does TSNet add an IPv4 option to https requests?

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
On 9/3/17 2:45 PM, J. Landman Gay via use-livecode wrote:

> On 9/2/17 8:39 AM, Ralph DiMola wrote:
>> I would zero in on the https thing.
>
> I found this on stackOverflow
> <https://stackoverflow.com/questions/1341644/curl-and-https-cannot-resolve-host>:
>
>
> ***
> I found that CURL can decide to use IPv6, in which case it tries to
> resolve but doesn't get an IPv6 answer (or something to that effect) and
> times out.
>
> You can try the command line switch -4 to test this out.
>
> In PHP, you can configure this line by setting this:
>
> curl_setopt($_h, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
> ***
>
> Several people in that thread report the problem started suddenly in
> March of this year. Could this be related?
>
> Charles W: does TSNet add an IPv4 option to https requests?
>


And more: <https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1674532>

A regression bug in Ubuntu in a March release which has been fixed, but
not every server has been updated. I'm not sure there's much us peons
can do about that, but hoping Charles knows.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
That seems to be a Linux specific library issue from what I can tell....

Are you having issues on just one Android device?

Regards,
   
Charles

On 4 Sep 2017 at 05:58:17 AEST, J. Landman Gay via use-livecode <[hidden email]> wrote:
   
On 9/3/17 2:45 PM, J. Landman Gay via use-livecode wrote:

> On 9/2/17 8:39 AM, Ralph DiMola wrote:
>> I would zero in on the https thing.
> > I found this on stackOverflow > <https://stackoverflow.com/questions/1341644/curl-and-https-cannot-resolve-host>: > > > ***
> I found that CURL can decide to use IPv6, in which case it tries to > resolve but doesn't get an IPv6 answer (or something to that effect) and > times out.
> > You can try the command line switch -4 to test this out.
> > In PHP, you can configure this line by setting this:
> > curl_setopt($_h, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
> ***
> > Several people in that thread report the problem started suddenly in > March of this year. Could this be related?
> > Charles W: does TSNet add an IPv4 option to https requests?
>

And more: <https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1674532>

A regression bug in Ubuntu in a March release which has been fixed, but not every server has been updated. I'm not sure there's much us peons can do about that, but hoping Charles knows.

-- Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
Two different Android phones so far, one is a Samsung S4 and the other
is a non-Samsung, some type of HP phone I think.

Not much info, I know. Neither of the two phones with the error had it
on the owner's home network. Both our app and the server use https.
We're going to see what happens with plain http tomorrow.

Thanks so much for jumping in, I was hoping you would.

On 9/3/17 4:06 PM, Charles Warwick via use-livecode wrote:

> That seems to be a Linux specific library issue from what I can tell....
>
> Are you having issues on just one Android device?
>
> Regards,
>      
> Charles
>
> On 4 Sep 2017 at 05:58:17 AEST, J. Landman Gay via use-livecode <[hidden email]> wrote:
>      
> On 9/3/17 2:45 PM, J. Landman Gay via use-livecode wrote:
>> On 9/2/17 8:39 AM, Ralph DiMola wrote:
>>> I would zero in on the https thing.
>>> I found this on stackOverflow > <https://stackoverflow.com/questions/1341644/curl-and-https-cannot-resolve-host>: > > > ***
>> I found that CURL can decide to use IPv6, in which case it tries to > resolve but doesn't get an IPv6 answer (or something to that effect) and > times out.
>>> You can try the command line switch -4 to test this out.
>>> In PHP, you can configure this line by setting this:
>>> curl_setopt($_h, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
>> ***
>>> Several people in that thread report the problem started suddenly in > March of this year. Could this be related?
>>> Charles W: does TSNet add an IPv4 option to https requests?
>>
>
> And more: <https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1674532>
>
> A regression bug in Ubuntu in a March release which has been fixed, but not every server has been updated. I'm not sure there's much us peons can do about that, but hoping Charles knows.
>
> -- Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
What does, "a server being monitored" mean? How do I monitor a server??

Bob S


> On Sep 2, 2017, at 13:44 , Jim Lambert via use-livecode <[hidden email]> wrote:
>
> reachabilityChanged


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: TSNet error 6

Sannyasin Brahmanathaswami via use-livecode
In reply to this post by Sannyasin Brahmanathaswami via use-livecode
If you are referring to the server using an IP address, then DNS is out of the equation, unless tsnet is internally trying to resolve a DNS name, which it might if signed SSL certificates are involved. If that is the case, then yes, it is out of your control, much like my Forms Generator app, when the local IT at a site has locked down outbound connections to SQL servers, or all DNS queries go through their content management system.

In these cases, knowing the IP of the certificate server (like go daddy or network solutions) would not help as these are usually server farms and the IP address can change moment to moment. DNS is essential. It is possible (though definitely not prescribed) to create a hosts entry for one of the IP addresses of the cert authority, but there is no guarantee that server will be online in the future.

Bob S


> On Sep 1, 2017, at 13:41 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> This is for an Android app that can be run from anywhere, so I don't have control over the routers or servers. (And yeah, I didn't quite get everything you were talking about, I'm a network novice.)
>
> The apps run fine for most people and only get this error with a few users. I think you're basically saying there's no cure, right?
>
> If the web site has a static IP and the Android app uses that instead of a domain name, will that fix it? The app is communicating with a database on the web server.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12