Socket Error in OpenShift
I tried to deploy PokemonGo-Bot in OpenShift
done validate json config
done upgrade pip
done virtualenv
done encrypt.so
done pip install -r requirements.txt with success
Expected Behavior
Bot Running
Actual Behavior
(PokemonGo-Bot)[pythonondo-backpack.rhcloud.com PokemonGo-Bot]\> python pokecli.py -cf configs/myconfigs.json
Traceback (most recent call last):
File "pokecli.py", line 39, in <module>
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException
File "/var/lib/openshift/57b1e27d7628e1c428000028/app-deployments/PokemonGo-Bot/src/pgoapi/pgoapi/__init__.py", line 50, in <module>
from pgoapi.pgoapi import PGoApi
File "/var/lib/openshift/57b1e27d7628e1c428000028/app-deployments/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 35, in <module>
from pgoapi.auth_ptc import AuthPtc
File "/var/lib/openshift/57b1e27d7628e1c428000028/app-deployments/PokemonGo-Bot/src/pgoapi/pgoapi/auth_ptc.py", line 28, in <module>
install_aliases()
File "/var/lib/openshift/57b1e27d7628e1c428000028/app-deployments/PokemonGo-Bot/lib/python2.7/site-packages/future/standard_library/__init__.py", line 487, in install_aliases
from future.moves.test import support
File "/var/lib/openshift/57b1e27d7628e1c428000028/app-deployments/PokemonGo-Bot/lib/python2.7/site-packages/future/moves/test/support.py", line 10, in <module>
from test.test_support import *
File "/opt/rh/python27/root/usr/lib64/python2.7/test/test_support.py", line 484, in <module>
IPV6_ENABLED = _is_ipv6_enabled()
File "/opt/rh/python27/root/usr/lib64/python2.7/test/test_support.py", line 475, in _is_ipv6_enabled
sock.bind((HOSTv6, 0))
File "/opt/rh/python27/root/usr/lib64/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address
Your config.json (remove your credentials and any other private info)
{
"auth_service": "ptc",
"username": "xxx",
"password": "yyy",
"location": "-6.219258, 106.801832",
"gmapkey": "zzz",
"encrypt_location": "",
"tasks": [
{
"type": "HandleSoftBan"
},
{
"type": "SleepSchedule",
"config": {
"enabled": false,
"time": "22:54",
"duration":"7:46",
"time_random_offset": "00:24",
"duration_random_offset": "00:43"
}
},
{
"type": "CollectLevelUpReward"
},
{
"type": "IncubateEggs",
"config": {
"longer_eggs_first": true
}
},
{
"type": "UpdateLiveStats",
"config": {
"enabled": false,
"min_interval": 10,
"stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
"terminal_log": true,
"terminal_title": true
}
},
{
"type": "TransferPokemon"
},
{
"type": "NicknamePokemon",
"config": {
"enabled": false,
"nickname_template": "{iv_pct}_{iv_ads}"
}
},
{
"type": "EvolvePokemon",
"config": {
"evolve_all": "none",
"first_evolve_by": "cp",
"evolve_above_cp": 500,
"evolve_above_iv": 0.8,
"logic": "or",
"evolve_speed": 20,
"use_lucky_egg": false
}
},
{
"type": "RecycleItems",
"config": {
"min_empty_space": 15,
"max_balls_keep": 150,
"max_potions_keep": 50,
"max_berries_keep": 70,
"max_revives_keep": 70,
"item_filter": {
"Pokeball": { "keep" : 100 },
"Potion": { "keep" : 10 },
"Super Potion": { "keep" : 20 },
"Hyper Potion": { "keep" : 30 },
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
}
}
},
{
"type": "CatchVisiblePokemon"
},
{
"type": "CatchLuredPokemon"
},
{
"type": "SpinFort"
},
{
"type": "MoveToFort",
"config": {
"lure_attraction": true,
"lure_max_distance": 2000
}
},
{
"type": "FollowSpiral",
"config": {
"diameter": 4,
"step_size": 70
}
}
],
"map_object_cache_time": 5,
"forts": {
"avoid_circles": true,
"max_circle_size": 50,
"cache_recent_forts": true
},
"websocket_server": false,
"walk": 4.16,
"action_wait_min": 1,
"action_wait_max": 4,
"debug": false,
"test": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"catch_randomize_reticle_factor": 1.0,
"catch_randomize_spin_factor": 1.0,
"min_ultraball_to_keep": 10,
"logging_color": true,
"catch": {
"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
"// Rattata": { "always_catch" : true }
},
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"release": {
"any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
"// Example of always releasing Rattata:": {},
"// Rattata": {"always_release": true},
"// Example of keeping 3 stronger (based on CP) Pidgey:": {},
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// any": {"keep_best_iv": 3},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
},
"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
"any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"Lapras": {},
"Moltres": {},
"Zapdos": {},
"Articuno": {},
"// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
"Mewtwo": {},
"Dragonite": {},
"Snorlax": {},
"// Mew evolves to Mewtwo": {},
"Mew": {},
"Arcanine": {},
"Vaporeon": {},
"Gyarados": {},
"Exeggutor": {},
"Muk": {},
"Weezing": {},
"Flareon": {}
}
}
Steps to Reproduce
python pokecli.py -cf configs/myconfigs.py
Other Information
OS: Redhat Linux on OpenShift Git Commit: dc9f172956eb3d23fde3610b93171781edb716aa Python Version: Python 2.7.8
@pararang I saw your closed issue #1416, have you succeed with deploying this bot in openshift?
RHEL on Openshift is currently not on the list of supported OSs (although I'm not sure if anyone has had it running on CentOS yet either), in saying that if you do get it working let us know and we'll add it to the list. Going to add the enhancement tag as support for this would be an enhancement
Nope. CentOS works well here. Openshift is not a suitable host. It seems like ipv6 error because niantic doesn't add ipv6 hosts.
Who would dare support ipv6 in 2016 - Bout time companies started supporting newer tech :(
@abusalman going to close this as this is not a bot error