WinError 10060 - with timeout and no proxy - telegram-bot

I have a bot running for a month now...with no problems. Yesterday I started getting WinError 10060 error. It throws the exception when running the following lines:
requestUrl = self.bot_url + self.bot_token + '/getUpdates'
requestUrl = requestUrl + '?' + urllib.parse.urlencode({'offset':offset, 'timeout':timeout})
jsonString = urllib.request.urlopen(requestUrl).read().decode()
I use timeout = 100
When I restart the bot everything is fine for a couple of minutes, the bot is responding correctly, but after that it doesn't respond.
I have proxy settings turned off, in case you think that is the problem.
I don't know how to fix this issue (that was a non issue up until yesterday)
Help me... you are my only hope... :)

OK, after trying lots of things I finally fixed it (or so it seems). Restarting the computer did not help, so I restarted the modem/router.... and the problem disappeared!
Everything else on the internet worked well, so I didn't think about the modem as the source... but there you go...
Restart your router/modem ladies and gentleman!

Related

Getting a "Error Connecting to server (111): Connection refused" from CloudAMQP

I am prototyping a message queue solution developed using CodeIgniter. The code is hosted on a GoDaddy basic shared hosting plan and connects to a trial instance of RabbitMQ on CloudAMQP. I use the videlalvaro/php-amqplib library.
The solution worked fine for a few days and yesterday I started getting a connection refused error. No changes to the code, in fact the same code running on my local machine works fine and connects to CloudAMQP.
This leads me to believe that the problem could be with GoDaddy hosting. Have spent about 48 hours trying to work around this and my project is now stalled.
Does anyone have any ideas? My only option now is to move to a different hosting service and try but that's a major step and I wanted to be sure I'm not missing something small.
The relevant part of the code below:
$url = parse_url("amqp://yyyyyyyy:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#moose.rmq.cloudamqp.com/yyyyyyyy");
//Masking the user name and password for here
$conn = new AMQPStreamConnection(
$url['host'], //host - CloudAMQP_URL
5672, //port - port number of the service, 5672 is the default
$url['user'], //user - username to connect to server
$url['pass'], //password - password to connect to the server
substr($url['path'], 1) //vhost
);
For those who may face a similar problem, this could have been because of hosting on GoDaddy (could apply to any hosting service) where presumably access to post 5672 is not allowed. I moved to AWS and everything is working fine.
This question can be closed (not sure how that happens).
Thank you zaq178miami, your inputs helped.

Redis server not starting - Forked Process did not respond in a timely manner

Redis server which was working fine got stopped suddenly and the error is:
BeginForkOperation: system error caught. error code=0x00000000, message=Forked
Process did not respond in a timely manner.
Not able to figure out why it is happening, and also when I am restarting my machine then
if I start the redis-server it's working fine.
Please help me in this regard.
You should try updating your Redis version, the guys from MSOpenTech fixed a lot of bugs in the last months and this one looks related, at least the error message is identical: https://github.com/MSOpenTech/redis/issues/144

cannot connect to genymotion and getting proxy error

I have dowloaded latest version of genymotion with proxy server 2.2.2 and while connecting i am getting invalid reply from server (do you use a proxy?). I am not using proxy for sure. Any ideas?
Answer, its all about the http proxy server on the genymotion settings just UNCHECK on the genymotion setting or remover the http proxy server by UN-ticking the ability to enter HTTP PROXY and PORT let it be blank by unckecking hence login your credentials, if it doesn't work try confirming you email with genymotion.
In my case I went to Settings > Network > I checked "Use HTTP Proxy" and I filled the Http Proxy and port fields (with company proxy valid values).
After that I connect smoothly as silk.
I had the same problem in ubuntu and after some struggle when i was almost giving up i stop the docker (had one instance running in port 3337 in my PC) and for my surprise it's finally work.
I had a similar issue (invalid reply from server without Proxy, on a highly customized and quite broken ubuntu 16.04). nothing of the above helped. (seemingly)
Then I visited this site:
http://qaru.site/questions/835901/genymotion-stuck-on-splash-screen
(well, you have to let google translate it, if you are not russian)
the error described there is completely different. (computer crash resulting in different networking issues)
but it had one thing in common with my case:
everything worked fine, and then suddenly: SOME NETWORKING ERROR - without reason
well, for me, the solution was the same as described on the russian page:
removing a (corrupted?!) conf file.
the conf file was at (my home folder)/.config/Genymobile/Genymotion.conf
i deleted it (i had to do it with root, because the file was owned by root, but this might have been the case because i messed a bit with genymotion...)
Then, i restarted genymotion and logged in again and it worked like a charm.
I had to allow Genymtion.exe in windows firewall. I'm using v3
Had the same problem, managed it using a VPN.

VS2012 WCF / IIS Express 'Failed to register url / Cannot create a file when that file already exists.'

I was doing some work earlier in WCF and I finally got it all working with SSL by following this: http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx . When I rebooted my PC, my services stopped working - the browser would just say 'connection reset'.
I spent a lot of time scratching my head and playing around, and now the service won't launch at all. I get the message in the title when I try to run it.
I'm at a total loss of what to do. I've tried deleting the config folder and it has recreated it, but I just get this error every time and I don't even know what it means.
Interestingly if I make a new project of the same type (WCF Service Application) it runs and works perfectly.
Any suggestions?

CakePHP app working remotely but not on local machine

I have a CakePHP app which I have been developing on a remote server. Everything is working fine on the remote server.
I'm now trying to install it on a machine with a fresh install of XAMPP. Cake is timing out. Apache is working - other things, such as phpMyAdmin, work fine. I am running Apache through port 8000, as IIS is using port 80. The OS is Windows Server 2003.
When trying to access the app, it times out, with the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\cake\libs\debugger.php on line 247
I have turned URL rewriting off, that hasn't solved the problem.
I have been trying to track down the source of the problem by echoing things and then exiting the script in the cake core. I found that the script was timing out (with the same error) when the components were trying to load. I commented out my components array in app_controller, and the script ran a little further.
Now, I have tracked it down this far:
Dispatcher::dispatch();
Dispatcher::_invoke();
Controller::constructClasses();
Controller::loadModel();
ClassRegistry::init(); //called on line 635 of Controller in the "else" block of the if (PHP5) statement
In ClassRegistry::init(), the script times out on line 141, whic is as follows:
${$class} =& new $class($settings);
I have no idea where to go from here! Help much appreciated.
I got your problem.
To solve this you should do tw0 things.
1) Try to change the debug level 2 in the core.php from the config adn then change it to 0.
2) plz enable this line from the config.
line number 57 in core.php.
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
regards,
archit.
Well, after following the problem a bit further, I found that the problem was coming up in Model::construct. It turns out that the hostname in my database.php file was wrong! I would have expected a "could not connect to the database..." error.