Session killed due to timeout press enter to exit terminal как исправить

  • Приглашаем на работу модератором форума за 15000+ в месяц!.

  • Игры

  • Другие онлайн игры

  • Вопросы обо всех играх

Вопрос Почему в онлайн питоне долго считает простейший код и выводит ошибку:

  • Автор темы
    Денис560464

  • Дата начала
    7 Ноя 2022

Регистрация
3 Апр 2013
Сообщения
76
Репутация
0
Спасибо
0
Монет

0


  • #1

session killed due to Timeout. Press Enter to exit terminal.?

a = float (input ('a='))

V = a * a * a

print (V)

И как быть???

Регистрация
7 Май 2013
Сообщения
88
Репутация
-3
Спасибо
0
Монет

0


  • #2

Спрашивай это там, где ты запускаешь код.

290715722_28ca3d0284f3713dbf3751871c6f6c14_800.png

Регистрация
13 Янв 2013
Сообщения
67
Репутация
6
Спасибо
0
Монет

0


  • #3

интернет медленный потому что

Регистрация
26 Окт 2013
Сообщения
78
Репутация
-2
Спасибо
0
Монет

0


  • #4

Сервер плохой попробуй на другом в серваке

Регистрация
21 Дек 2013
Сообщения
63
Репутация
0
Спасибо
0
Монет

0


Похожие темы

Whispering

Whispering

  • Игры

  • Другие онлайн игры

  • Вопросы обо всех играх

  • karulyana

Здравствуйте! Написал парсер на Python, выставил кол-во циклов от 1 до миллиона. Но время от времени появляются ошибки timeout, например:

File “D:Pythonlibsite-packagesgrabbase.py”, line 368, in go
return self.request(url=url, **kwargs)
File “D:Pythonlibsite-packagesgrabbase.py”, line 437, in request
self.transport.request()
File “D:Pythonlibsite-packagesgrabtransportcurl.py”, line 447, in request
raise error.GrabTimeoutError(ex.args[0], ex.args[1])
GrabTimeoutError: [Errno 28] Operation timed out after 15000 milliseconds with 0 bytes received

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


  • Вопрос задан

    более трёх лет назад

  • 3889 просмотров

Пригласить эксперта

def grab_all_internet():
    # много кода

while True:
    try:
        grab_all_internet()
    except:
        print 'Restart!'

и пусть интернет повесится 🙂

Как обойти эту ошибку или сделать так, чтобы парсер посылал запрос бесконечно, пока не получит ответ, но не вырубался?

Я бы на вашем месте отлавливал исключение GrabTimeoutError и повторял при необходимости запрос (с ограничением количества попыток, естественно).

while True:
    try:
        #прога
    except GrabTimeoutError:
        continue

по идее, когда ошибка появиться – прога перезапуститься


  • Показать ещё
    Загружается…

24 мая 2023, в 02:58

1500 руб./за проект

24 мая 2023, в 02:03

5000 руб./за проект

23 мая 2023, в 23:46

4000 руб./за проект

Минуточку внимания

I’m getting some errors during Install, Start and Test phase, Python script has been killed due to timeout after waiting 900 secs

attaching the log here

stderr: 
Python script has been killed due to timeout after waiting 900 secs
 stdout:
2015-04-16 16:43:04,609 - Execute['mkdir -p /var/lib/ambari-agent/data/tmp/AMBARI-artifacts/;     curl -kf -x "" --retry 10     http://vagrant-centos65.vagrantup.com:8080/resources//UnlimitedJCEPolicyJDK7.zip -o /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//UnlimitedJCEPolicyJDK7.zip'] {'environment': ..., 'not_if': 'test -e /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//UnlimitedJCEPolicyJDK7.zip', 'ignore_failures': True, 'path': ['/bin', '/usr/bin/']}
2015-04-16 16:43:04,683 - Group['hadoop'] {'ignore_failures': False}
2015-04-16 16:43:04,685 - Adding group Group['hadoop']
2015-04-16 16:43:04,755 - Group['nobody'] {'ignore_failures': False}
2015-04-16 16:43:04,756 - Modifying group nobody
2015-04-16 16:43:04,816 - Group['users'] {'ignore_failures': False}
2015-04-16 16:43:04,817 - Modifying group users
2015-04-16 16:43:04,853 - Group['nagios'] {'ignore_failures': False}
2015-04-16 16:43:04,854 - Adding group Group['nagios']
2015-04-16 16:43:04,896 - Group['knox'] {'ignore_failures': False}
2015-04-16 16:43:04,896 - Adding group Group['knox']
2015-04-16 16:43:04,950 - User['nobody'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'nobody']}
2015-04-16 16:43:04,951 - Modifying user nobody
2015-04-16 16:43:05,025 - User['hive'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,026 - Adding user User['hive']
2015-04-16 16:43:05,131 - User['oozie'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'users']}
2015-04-16 16:43:05,131 - Adding user User['oozie']
2015-04-16 16:43:05,199 - User['nagios'] {'gid': 'nagios', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,200 - Adding user User['nagios']
2015-04-16 16:43:05,384 - User['ambari-qa'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'users']}
2015-04-16 16:43:05,385 - Adding user User['ambari-qa']
2015-04-16 16:43:05,504 - User['flume'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,505 - Adding user User['flume']
2015-04-16 16:43:05,612 - User['hdfs'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,613 - Adding user User['hdfs']
2015-04-16 16:43:05,682 - User['knox'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,683 - Adding user User['knox']
2015-04-16 16:43:05,738 - User['storm'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,738 - Adding user User['storm']
2015-04-16 16:43:05,806 - User['mapred'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,806 - Adding user User['mapred']
2015-04-16 16:43:05,859 - User['hbase'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,860 - Adding user User['hbase']
2015-04-16 16:43:05,916 - User['tez'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'users']}
2015-04-16 16:43:05,917 - Adding user User['tez']
2015-04-16 16:43:05,972 - User['zookeeper'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:05,972 - Adding user User['zookeeper']
2015-04-16 16:43:06,041 - User['kafka'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:06,042 - Adding user User['kafka']
2015-04-16 16:43:06,097 - User['falcon'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:06,098 - Adding user User['falcon']
2015-04-16 16:43:06,161 - User['sqoop'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:06,162 - Adding user User['sqoop']
2015-04-16 16:43:06,228 - User['yarn'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:06,229 - Adding user User['yarn']
2015-04-16 16:43:06,287 - User['hcat'] {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2015-04-16 16:43:06,287 - Adding user User['hcat']
2015-04-16 16:43:06,345 - File['/var/lib/ambari-agent/data/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2015-04-16 16:43:06,346 - Writing File['/var/lib/ambari-agent/data/tmp/changeUid.sh'] because it doesn't exist
2015-04-16 16:43:06,346 - Changing permission for /var/lib/ambari-agent/data/tmp/changeUid.sh from 644 to 555
2015-04-16 16:43:06,347 - Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 2>/dev/null'] {'not_if': 'test $(id -u ambari-qa) -gt 1000'}
2015-04-16 16:43:06,469 - File['/var/lib/ambari-agent/data/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2015-04-16 16:43:06,470 - Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/hadoop/hbase 2>/dev/null'] {'not_if': 'test $(id -u hbase) -gt 1000'}
2015-04-16 16:43:06,599 - Directory['/etc/hadoop/conf.empty'] {'owner': 'root', 'group': 'root', 'recursive': True}
2015-04-16 16:43:06,599 - Creating directory Directory['/etc/hadoop/conf.empty']
2015-04-16 16:43:06,600 - Link['/etc/hadoop/conf'] {'not_if': 'ls /etc/hadoop/conf', 'to': '/etc/hadoop/conf.empty'}
2015-04-16 16:43:06,623 - Creating symbolic Link['/etc/hadoop/conf']
2015-04-16 16:43:06,651 - File['/etc/hadoop/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs'}
2015-04-16 16:43:06,651 - Writing File['/etc/hadoop/conf/hadoop-env.sh'] because it doesn't exist
2015-04-16 16:43:06,652 - Changing owner for /etc/hadoop/conf/hadoop-env.sh from 0 to hdfs
2015-04-16 16:43:06,684 - Repository['HDP-2.2'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.4.2', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP', 'mirror_list': None}
2015-04-16 16:43:06,710 - File['/etc/yum.repos.d/HDP.repo'] {'content': Template('repo_suse_rhel.j2')}
2015-04-16 16:43:06,711 - Writing File['/etc/yum.repos.d/HDP.repo'] because it doesn't exist
2015-04-16 16:43:06,711 - Repository['HDP-UTILS-1.1.0.20'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None}
2015-04-16 16:43:06,722 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': Template('repo_suse_rhel.j2')}
2015-04-16 16:43:06,722 - Writing File['/etc/yum.repos.d/HDP-UTILS.repo'] because it doesn't exist
2015-04-16 16:43:06,722 - Package['unzip'] {}
2015-04-16 16:43:07,144 - Skipping installing existent package unzip
2015-04-16 16:43:07,145 - Package['curl'] {}
2015-04-16 16:43:07,463 - Skipping installing existent package curl
2015-04-16 16:43:07,464 - Package['hdp-select'] {}
2015-04-16 16:43:07,724 - Installing package hdp-select ('/usr/bin/yum -d 0 -e 0 -y install hdp-select')
2015-04-16 16:43:11,315 - Execute['mkdir -p /var/lib/ambari-agent/data/tmp/AMBARI-artifacts/ ;   curl -kf -x ""   --retry 10 http://vagrant-centos65.vagrantup.com:8080/resources//jdk-7u67-linux-x64.tar.gz -o /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz'] {'environment': ..., 'not_if': 'test -e /usr/jdk64/jdk1.7.0_67/bin/java', 'path': ['/bin', '/usr/bin/']}
2015-04-16 16:43:11,323 - Skipping Execute['mkdir -p /var/lib/ambari-agent/data/tmp/AMBARI-artifacts/ ;   curl -kf -x ""   --retry 10 http://vagrant-centos65.vagrantup.com:8080/resources//jdk-7u67-linux-x64.tar.gz -o /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz'] due to not_if
2015-04-16 16:43:11,324 - Execute['mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz > /dev/null 2>&1'] {'not_if': 'test -e /usr/jdk64/jdk1.7.0_67/bin/java', 'path': ['/bin', '/usr/bin/']}
2015-04-16 16:43:11,333 - Skipping Execute['mkdir -p /usr/jdk64 ; cd /usr/jdk64 ; tar -xf /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz > /dev/null 2>&1'] due to not_if
2015-04-16 16:43:11,564 - Package['hadoop_2_2_*-yarn'] {}
2015-04-16 16:43:11,825 - Installing package hadoop_2_2_*-yarn ('/usr/bin/yum -d 0 -e 0 -y install hadoop_2_2_*-yarn')

Im’ using ambari 1.7 and have been following this installation guide.

Any help would be appreciated.
Thanks

jeffthechicken

unread,

Dec 13, 2020, 4:22:35 AM12/13/20

to Ajax.org Cloud9 Editor (Ace)

Session Killed due to Timeout.

Press Enter to exit terminal

this is a message that keeps popping up while I’m running my python program. I’m pretty inexperienced as far as this stuff goes, could someone tell me how I can extend the timeout or stop it from happening?

Brad Moran

unread,

Dec 16, 2020, 7:49:42 PM12/16/20

to Ajax.org Cloud9 Editor (Ace)

the group seems useless. Last response was Aug. 

jeffthechicken

unread,

Dec 16, 2020, 8:02:01 PM12/16/20

to Ajax.org Cloud9 Editor (Ace)

Brad Moran

unread,

Dec 29, 2020, 10:25:22 PM12/29/20

to Ajax.org Cloud9 Editor (Ace)

I mean that the people that actually know stuff don’t seem to be participating regularly enough to help

Question: this error appear after running Session Killed due to Timeout. Press Enter to exit terminal

this error appear after running Session Killed due to Timeout. Press Enter to exit terminal

Expert Answer

Who are the experts?Experts are tested by Chegg as specialists in their subject area. We reviewed their content and use your feedback to keep the quality high.

1st step

All steps

Final answer

Step 1/1

Your execution of the program is showing timeout because you have not provided the value of n as input. As in the code, you have taken the value of n as input from the user. So as long a…

View the full answer

Final answer

This problem has been solved!

You’ll get a detailed solution from a subject matter expert that helps you learn core concepts.

See Answer

Добавить комментарий