Error event operation timed out 60 for i o session closing it

This message was posted by a user wishing to remain anonymousGood morning, I have a bit of a doozy.I am trying to establish a route-based VPN connection between


This message was posted by a user wishing to remain anonymous

This message was posted by a user wishing to remain anonymous

Good morning, I have a bit of a doozy.

I am trying to establish a route-based VPN connection between an SRX 300 and an SRX 345.  They’re configured almost identically, and the IPSec VPN link works great with static routing.  When I switch to external BGP, I get almost no traffic, and BGP resets every 90 seconds when the hold timer runs out.

The BGP trace log indicates keepalive messages are being sent properly, but most do no arrive to either side, which is why the hold timer is expiring.

I’ve tried setting MSS and MTU values with no effect.  I have found some error messages in the log that I am having trouble deciphering.  These errors are identical on both sides.  I feel like I’m missing something pretty basic.  Could someone point me in the right direction?

Error 1:

Sep 21 08:55:20.073832 bgp_rt_send_message:1826: 10.199.64.5 (External AS 1): sent 61 bytes, out updates 1
Sep 21 08:55:20.073867 bgp_output_thrashold_reached: 10.199.64.5 (External AS 1): rtt 0x40c8000 id 0x1000000, change count 0, bgp thrashold 5000
Sep 21 08:55:20.073903 bgp_rt_send_v4_flush:2219: 10.199.64.5 (External AS 1): Flushed, len=0, status=0x0, updates 166, updates_bnp 166, tokens=0
Sep 21 08:55:20.073932 bgp_send_flush:1178: send proc: Flushed, type=1, status=0x0
Sep 21 08:55:20.073961 bgp_group_send_msg_done:2635: group external-peers type External: Reset/released group send msg bld area
Sep 21 08:55:20.073988 bgp_send_handle_error:1523: group external-peers type External: Flush type=GROUPP, status=0x0, num_tokens=0
Sep 21 08:55:20.074014 bgp_send_handle_error:1627: group external-peers type External: Flush type=GROUPP, status=0x0, Return status=0x20, num_tokens=0 - exit
Sep 21 08:55:20.074049 bgp_rt_send_common: 2970: send proc: Exited mrtop loop - flushed status=0x20
Sep 21 08:55:20.074075 rt send common: END, status=0x20, visits=1, grtosdenied=0
Sep 21 08:55:20.074098 bgp_group_send_msg_done:2635: group external-peers type External: Reset/released group send msg bld area
​

Error 2 (keepalive behavior, follwed by error and reset:

Sep 21 08:55:20.279700 bgp_handle_update:4766: 10.199.64.5 (External AS 1) received one update: 68 octets 10 routes
Sep 21 08:55:20.279820 bgp_handle_update:4766: 10.199.64.5 (External AS 1) received one update: 4 octets 0 routes
Sep 21 08:55:45.283039 99-220-BGP_1.10.199.64.5: BGP SEND 10.199.64.6+179 -> 10.199.64.5+50986 {bgp-io}
Sep 21 08:55:45.283138 99-220-BGP_1.10.199.64.5: BGP SEND message type 4 (Keepalive) length 19  {bgp-io}
Sep 21 08:56:11.307068 99-220-BGP_1.10.199.64.5: BGP SEND 10.199.64.6+179 -> 10.199.64.5+50986 {bgp-io}
Sep 21 08:56:11.307166 99-220-BGP_1.10.199.64.5: BGP SEND message type 4 (Keepalive) length 19  {bgp-io}
Sep 21 08:56:41.006884 99-220-BGP_1.10.199.64.5: BGP SEND 10.199.64.6+179 -> 10.199.64.5+50986 {bgp-io}
Sep 21 08:56:41.006982 99-220-BGP_1.10.199.64.5: BGP SEND message type 4 (Keepalive) length 19  {bgp-io}
Sep 21 08:56:50.277401 {bgp-io} th-99-220-BGP_1.10.199.64.5: Recv heartbeat timer expired @bgp-io
Sep 21 08:56:50.277718 BGP_IO_ERROR_CLOSE_SESSION: BGP peer 10.199.64.5 (External AS 1): Error event Operation timed out(60) for I/O session - closing it (instance master)
Sep 21 08:56:50.278189 BGP_1.10.199.64.5: send proc: send via threaded I/O
Sep 21 08:56:50.278208 sending 21 bytes
Sep 21 08:56:50.278239
Sep 21 08:56:50.278239 BGP SEND 10.199.64.6+179 -> 10.199.64.5+50986
Sep 21 08:56:50.278270 BGP SEND message type 3 (Notification) length 21
Sep 21 08:56:50.278355  wrote 21 bytes to I/O queue
Sep 21 08:56:50.278390 finished number of messages 1, write qidx 0 rc 1
Sep 21 08:56:50.278423 bgp_send_deactivate:3466: 10.199.64.5 (External AS 1) ,flags=0x1: removed from active list
Sep 21 08:56:50.281621 bgp_rt_unsync_all:409: 10.199.64.5 (External AS 1): entered v4nsync 1
Sep 21 08:56:50.281694 bgp_oq_ready_enqueue:147: group external-peers type External: called for ribix 1, inserted node on thread
Sep 21 08:56:50.281733 bgp_rt_unsync_all:422: 10.199.64.5 (External AS 1): end v4nsync 0
Sep 21 08:56:52.337676 advertising graceful restart receiving-speaker-only capability to neighbor 10.199.64.5 (External AS 1)
Sep 21 08:56:52.337767 advertising LLGR receiving-speaker-only capability to neighbor 10.199.64.5 (External AS 1)
Sep 21 08:56:52.337814 BGP_1.10.199.64.5: send proc: sending 63 bytes​

Relevant BGP Configuration:

policy-options {
    policy-statement send-direct {
        term 1 {
            from protocol direct;
            then accept;
        }
    }
}

protocols {
    bgp {
        group external-peers {
            type external;
            export send-direct;
            peer-as 1;
            neighbor 10.199.64.5;
        }
    }​

Thank you!

When I connect to nsqd using gnsq.Nsqd, 60 seconds after the connection, I see the following on nsqd logs

[nsqd] 2016/10/28 12:01:08.655200 PROTOCOL(V2): [127.0.0.1:53326] exiting ioloop
[nsqd] 2016/10/28 12:01:08.655677 ERROR: client(127.0.0.1:53326) - failed to read command - read tcp 127.0.0.1:4150->127.0.0.1:53326: i/o timeout
[nsqd] 2016/10/28 12:01:08.655987 PROTOCOL(V2): [127.0.0.1:53326] exiting messagePump

The message sent using publish_tcp doesn’t reach the nsqd and neither does it throw an error. However, the second message I send through publish_tcp raises a gnsq.errors.NSQSocketError: [Errno 107] Socket is not connected. I think this error should be raised on the first message and not the second.

System Info

gnsq version

0.3.3

operating system and version

$ uname -a
Linux ant-Dell-n411z 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty

nsqd versions

I’ve noticed this happening on nsqd v0.3.8 (built w/go1.6.2) and nsqd v0.2.30 (built w/go1.3)

Scripts to reproduce behaviour

test_gnsq.py

from gevent import monkey; monkey.patch_all()

import gnsq
import gevent

def on_error(reader, error):
    print "got error %s" % error

def on_close(reader):
    print "closed..."

conn = gnsq.Nsqd(address="127.0.0.1", tcp_port=4150, http_port=4151)
conn.ping()
conn.connect()
conn.on_error.connect(on_error)
conn.on_close.connect(on_close)

try:
    print "publising message 1"
    conn.publish_tcp("TestTopic", "Did you get message 1?")
    print "successfully published message 1"

    # sleep for two minutes in main thread
    print "sleeping for 1 minute and 2 seconds"
    gevent.sleep(62)
    print "awake!"

    print "publishing message 2"
    conn.publish_tcp("TestTopic", "Did you get message 2?")
    print "successfully published message 2"

    print "publishing message 3"
    conn.publish_tcp("TestTopic", "Did you get message 3?")
    print "successfully published message 2"

finally:
    conn.close()

run.sh

$1/nsqd -verbose -verbose &
sleep 2
$1/nsq_tail -channel default -nsqd-tcp-address 127.0.0.1:4150 -topic TestTopic &
sleep 2
python test_gnsq.py
curl http://localhost:4151/stats?format=json | python -m json.tool
echo ""
sleep 3

jobs -p | xargs kill -9

commands and output

run.sh requires a path to the nsqd binary directory ( I tested it on different nsqd versions )

wget https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.3.8.linux-amd64.go1.6.2.tar.gz
tar -xvzf nsq-0.3.8.linux-amd64.go1.6.2.tar.gz
bash run.sh nsq-0.3.8.linux-amd64.go1.6.2/bin/

Alternatively, you could run bash run.sh /usr/bin if nsq binaries are present there.

output

The entire output is available here https://gist.github.com/algrebe/5d715eb031f110905b9b2335e0ca52fe
Here are the relevant portions

$ bash run.sh nsq-0.3.8.linux-amd64.go1.6.2/bin/

# nsq_tail connects
[nsqd] 2016/10/28 12:00:06.256774 TCP: new client(127.0.0.1:53323)
[nsqd] 2016/10/28 12:00:06.256930 CLIENT(127.0.0.1:53323): desired protocol magic '  V2'
[nsqd] 2016/10/28 12:00:06.259701 PROTOCOL(V2): [127.0.0.1:53323] [SUB TestTopic default]
[nsqd] 2016/10/28 12:00:06.260200 TOPIC(TestTopic): created
[nsqd] 2016/10/28 12:00:06.260692 TOPIC(TestTopic): new channel(default)
[nsqd] 2016/10/28 12:00:06.261209 PROTOCOL(V2): [127.0.0.1:53323] [RDY 200]

# python gnsq.Nsqd connects
[nsqd] 2016/10/28 12:00:08.652703 TCP: new client(127.0.0.1:53326)
[nsqd] 2016/10/28 12:00:08.653426 CLIENT(127.0.0.1:53326): desired protocol magic '  V2'

# python script - gnsq.Nsqd sends message and then sleeps
publising message 1
successfully published message 1
sleeping for 1 minute and 2 seconds

# nsqd sends this message to nsq_tail
[nsqd] 2016/10/28 12:00:08.654558 PROTOCOL(V2): [127.0.0.1:53326] [PUB TestTopic]
[nsqd] 2016/10/28 12:00:08.655044 PROTOCOL(V2): writing msg(070155f1855b1000) to client(127.0.0.1:53323) - Did you get message 1?
[nsqd] 2016/10/28 12:00:08.655153 [127.0.0.1:53323] state rdy:  200 inflt:    1
[nsqd] 2016/10/28 12:00:08.655323 [127.0.0.1:53323] state rdy:  200 inflt:    1

# nsq_tail recieves message
Did you get message 1?
[nsqd] 2016/10/28 12:00:08.655820 PROTOCOL(V2): [127.0.0.1:53323] [FIN 070155f1855b1000]

# after one minute, this message comes w.r.t gnsq.Nsqd client
[nsqd] 2016/10/28 12:01:08.655200 PROTOCOL(V2): [127.0.0.1:53326] exiting ioloop
[nsqd] 2016/10/28 12:01:08.655677 ERROR: client(127.0.0.1:53326) - failed to read command - read tcp 127.0.0.1:4150->127.0.0.1:53326: i/o timeout
[nsqd] 2016/10/28 12:01:08.655987 PROTOCOL(V2): [127.0.0.1:53326] exiting messagePump

# python script - out of sleep
awake!
publishing message 2
successfully published message 2
# NOTE no error was generated here, it thinks that the message was successfully sent when it hasnt !

publishing message 3
# NOTE only on publishing this message does it raise the exception and close the socket
closed...
Traceback (most recent call last):
  File "test_gnsq.py", line 37, in <module>
    conn.close()
  File ".virtualenvs/gnsq/local/lib/python2.7/site-packages/gnsq/nsqd.py", line 470, in close
    self.send(nsq.close())
  File ".virtualenvs/gnsq/local/lib/python2.7/site-packages/gnsq/nsqd.py", line 239, in send
    return self.stream.send(data, async)
  File ".virtualenvs/gnsq/local/lib/python2.7/site-packages/gnsq/stream/stream.py", line 90, in send
    self.ensure_connection()
  File ".virtualenvs/gnsq/local/lib/python2.7/site-packages/gnsq/stream/stream.py", line 49, in ensure_connection
    raise NSQSocketError(ENOTCONN, 'Socket is not connected')
gnsq.errors.NSQSocketError: [Errno 107] Socket is not connected

# examining the curl output shows us that nsqd only recieved one message
{
    "data": {
        "start_time": 1477636204,
        "topics": [
            {
                "channels": [
                    {
                        "channel_name": "default",
                        "clients": [
                            {
                                "deflate": false,
                                "finish_count": 1,
                                "in_flight_count": 0,
                                "message_count": 1,
                                "remote_address": "127.0.0.1:53323",
                                "state": 3,
                                "user_agent": "nsq_tail/0.3.8 go-nsq/1.0.5",
                                "version": "V2"
                            }
                        ],
                        "deferred_count": 0,
                        "depth": 0,
                        "e2e_processing_latency": {
                            "count": 0,
                            "percentiles": null
                        },
                        "in_flight_count": 0,
                        "message_count": 1,
                        "paused": false,
                        "requeue_count": 0,
                        "timeout_count": 0
                    }
                ],
                "depth": 0,
                "e2e_processing_latency": {
                    "count": 0,
                    "percentiles": null
                },
                "message_count": 1,
                "paused": false,
                "topic_name": "TestTopic"
            }
        ],
        "version": "0.3.8"
    },
    "status_code": 200,
    "status_txt": "OK"
}

Following code/s is giving TimeoutError: [Errno 60] Operation timed out.

The url is working fine when accessed via Chrome or Postman.

url : https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY

option1

import http.client

conn = http.client.HTTPSConnection("www.nseindia.com")
payload = ''
headers = {}
try:
    conn.request("GET", "/api/option-chain-indices?symbol=NIFTY", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
except http.client.error as e:
    print("exception occurred", e)

option2

import requests

url = "https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY"
payload = {}
headers = {}

try:
    response = requests.request("GET", url, headers=headers, data=payload)
    response.raise_for_status()
    print(response.text.encode('utf8'))
except requests.HTTPError as exception:
    print("exception occurred", exception)

error : requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='www.nseindia.com', port=443): Read timed out. (read timeout=None)

asked Jun 15, 2020 at 16:31

Akhil Pakkath's user avatar

Below code works for me. I am using Python 3.8.

import requests
import time
import pprint

def fire_get_request(url, headers, timeout=(5,25)):
    start_time = time.time()
    response=requests.get(url, timeout=timeout,headers=headers)
    end_time=time.time() - start_time
    return {'responsetime':end_time,'response':response.text}

url = "https://www.nseindia.com/api/quote-equity?symbol=DHFL&section=trade_info"
# url = "https://httpbin.org/user-agent"
headers = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36'
            ,"accept": "application/json"
            }
pprint.pprint(fire_get_request(url=url, headers=headers))

answered Jul 29, 2020 at 15:53

Krishna's user avatar

Forums / NoMachine for Linux / Encountered Error 60: Operation timed out when trying to connect to Centos 6.7

  • This topic has 6 replies, 3 voices, and was last updated 5 years, 1 month ago by Britgirl.

Viewing 7 posts — 1 through 7 (of 7 total)

  • Author

    Posts

  • November 9, 2017 at 10:32

    #16353

    Greeting,

    I was trying to connect to a server running in Centos 6.7 using NoMachine 5.3.12 client on my macOS (10.12.6). The NoMachine server version on the Centos is also 5.3.12, I installed it on the command line via SSH.

    The connection encountered an error: Could not connect to the server. Error is 60: Operation timed out

    I’ve checked the firewall, the TCP port 4000 should be opened. I also restarted the NoMachine server several times, it didn’t work.

    The log file is in the attachment, I appreciate any help.

    November 9, 2017 at 11:13

    #16364

    We didn’t receive any logs. Is nxserver is running after restart? Can you enable debug, restart nxserver (sudo /etc/NX/nxserver –restart), reproduce problem, collect logs from server and client side and send them to forum[at]nomachine[dot]com? Instructions about debug and collecting logs you can find there: https://www.nomachine.com/DT07M00098.

    November 10, 2017 at 13:54

    #16380

    Hello,

    The information returned after restarting the NoMachine server is in the attachment.

    I’ve collected the log from client side and server side, the log files are also in the attachment if I uploaded them correctly. Not sure how to send them to forum[at]nomachine[dot]com, if the attachments don’t work can I send them via email?

    Thanks a lot!

    Attachments:

    November 13, 2017 at 13:55

    #16402

    forum[at]nomachine[dot]com

    This is the email address. Replace the [at] with the usual email address symbol and a ‘.’ before the ‘com’. Anyway, we’ll take a look at what you sent. Thanks.

    November 13, 2017 at 18:24

    #16419

    It looks that port 4000 is already used on server host. You need to change port for that program or change port for the NoMachine. Here is information about default ports used by NoMachine: https://www.nomachine.com/AR01L00770. To change NX Port click nxclient monitor on tray -> Show the server status -> Server preferences -> choose NX service, click Configure and change the port. After that restart nxserver.

    November 15, 2017 at 15:56

    #16445

    Hi,

    I set the port to 4001 by changing “#NXPort 4000” to “NXPort 4001” in /usr/NX/etc/server.cfg (not sure if I was doing it right) and restart the server. The connection still fails, I’ve sent the logs to you.

    Thanks.

    January 9, 2018 at 10:53

    #17104

    In the logs we see:

    2017-11-16 03:10:52 591.999 12555 NXNODE   NXTryBindLocal for port: 4001 return: -1
    2017-11-16 03:10:52 592.047 12555 NXNODE   tcp port ‘4001’ is used by another application

    Try allocating a different port.

  • Author

    Posts

Viewing 7 posts — 1 through 7 (of 7 total)

This topic was marked as solved, you can’t post.

Related Article:

Update macOS on Mac

Looks like no one’s replied in a while. To start the conversation again, simply

ask a new question.

Error 60 Operation timed out. What does this mean and can you help?

Seems my airport is not working (direct connect is fine) I got a message in my antivirus software that reads- path: /net/localhost infection details:Error 60 Operation timed out. What does this mean and can you help?

MacBook,

Mac OS X (10.5.8)

Posted on Oct 20, 2012 7:42 AM

1 reply

Oct 20, 2012 9:02 AM in response to peony19

I do not use Airport.

/net/localhost is empty on my Leopard.

I suspect that either Airport is misconfigured or your anti-virus software is causing a problem.

Does Airport work with anti-virus turned off?

Error 60 Operation timed out. What does this mean and can you help?

Ошибка ERR_CONNECTION_TIMED_OUT появляется, когда вы открываете какой-то сайт или страницу в социальной сети. Это может произойти на любом веб-сервере, независимо от его популярности, качества и наличия обновлений.

Ошибка соединения

Что это за ошибка ERR_CONNECTION_TIMED_OUT

Когда открывается сайт, ваш ПК обращается к серверу, чтобы отобразить содержимое. На это отводится определенное время, когда оно заканчивается, вам сообщают, что страница недоступна, т.к., время соединения истекло – описание ошибки именно так звучит в переводе.

Ошибка Err connection timed out

Ошибка Err connection timed out

Фактически, это означает, что возникли какие-то проблемы на сайте или конкретно с вашим подключением. Причем, ошибка касается только одного ресурса, например, Facebook, а с другими всё в порядке, можно спокойно просмотреть содержимое.

Ошибка может быть вызвана:

  • большим количеством одновременных обращений к серверу (чаще всего в играх, а также в определенные периоды, например, в Новогоднюю ночь, когда все поздравляют друг друга в социальных сетях и совершают много одинаковых действий в одно и то же время);
  • сбоем маршрутизатора;
  • блокировкой антивируса.

Как исправить ошибку ERR_CONNECTION_TIMED_OUT

Есть несколько способов справиться с возникшей проблемой, если только это не связано с самим сайтом. В противном случае лучше написать в службу поддержки.

Сброс интернет-соединения

При появлении CONNECTION_TIMED_OUT_CONNECT первое, что нужно сделать – выключить роутер и оставить его на 1-2 минуты, а затем снова включить. После перезагрузки ситуация может исправиться.

Обновление IP и сброс Winsock

Если первый метод не помог, попробуем менее очевидный:

  1. В «Пуске» найдите Command Line, кликните дополнительной кнопкой мыши и выберите Run As Administrator.
  2. В поле впишите ipconfig /release + «Enter».
  3. Не дожидаясь сообщения о ходе операции, наберите также: ipconfig /all + «Enter».
  4. Затем впишите: ipconfig /flushdns + «Enter».
  5. Снова не ждите отчета системы, вбивайте: ipconfig /renew + «Enter» и netsh int ip set dns + «Enter» (сохраняйте все знаки и пробелы).
  6. И, наконец, последняя команда, позволяющая сбросить предустановки Windows Sockets: netsh winsock reset + «Enter».

Перезапустите систему и попробуйте зайти на проблемный сайт, чтобы убедиться, что ошибка исправлена.

Переход на публичные DNS-серверы

Публичные DNS сервера

Публичные DNS сервера

В этом случае мы воспользуемся серверами, которые предлагает Google:

  1. Кликните дополнительной кнопкой манипулятора по «Пуску» и нажмите Network connection.
  2. Найдите название существующего, щелкните по нему дважды и выберите вкладку Properties.
  3. Здесь нужно развернуть ссылку, подписанную Internet Protocol version 4 и отметить, что вы самостоятельно впишите сервер.
  4. Вы увидите две строчки: в первую впишите 8.8.8.8., а во вторую — 8.8.4.4.
  5. Согласитесь с изменениями и перезагрузите ПК.
  6. Попробуйте открыть сайт.

Если ничто не помогло, обязательно проверьте, не фильтрует ли антивирус сайт, на который вы безуспешно пытаетесь попасть. Откройте настройки брандмауэра и создайте правило для сайта, в котором будет прописано разрешение на установление соединения.

Также блокировать сайт может встроенный брандмауэр Windows. Его можно отключить, если у вас есть антивирус или вписать адрес ресурса в список исключений.

Понравилась статья? Поделить с друзьями:
  • Error event bpmn
  • Error event args
  • Error evaluation limit reached post processing failed перевод
  • Error evaluation limit reached post processing failed sheetcam
  • Error evaluating symlinks from mount source