java.io.IOException: Server returned HTTP response code

文章推薦指數: 80 %
投票人數:10人

It may give you some more ideas to you. HTTP 503 means Requested Service is Unavailable. ... If you are accessing a service and getting this error ... PostReply BookmarkTopic WatchTopic NewTopic programmingforums Java Mobile Certification Databases Caching Books Engineering MicroControllers OS Languages Paradigms IDEs BuildTools Frameworks ApplicationServers OpenSource ThisSite Careers Other PieElite allforums thisforummadepossiblebyourvolunteerstaff,including... Marshals: TimCooke CampbellRitchie JeanneBoyarsky RonMcLeod LiutaurasVilda Sheriffs: RobSpoor JuniluLacar paulwheaton SaloonKeepers: StephanvanHulst TimMoores TimHolloway CareyBrown ScottSelikoff Bartenders: PietSouris JjRoberts fredrosenberger Forum: I/OandStreams java.io.IOException:ServerreturnedHTTPresponsecode:503forURL   SarkiAmada Greenhorn Posts:5 posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send Helloeveryone,I'mnewtothisforum. Ihavesuccessfuldesignajavaprogramthatreadstockexchange,fromgoogle,whichIfoundhowtodoitonline. Hereisthelinktothevideo Ididputthegooglefinancewebsiteinaloop,whichchecksitoverandovertoensurethatthestockiscurrent while (KO>=Fan)     {       url=newURL("https://www.google.com/finance?q=EURUSD&ei=Dck0WZHIAtaXeYOonJgH");       urlConn=url.openConnection();       inStream=newInputStreamReader(urlConn.getInputStream());       buff=newBufferedReader(inStream);       line=buff.readLine();       while(line!=null){         if(line.contains("bld>"))           {           inttarget=line.indexOf("bld>");           intdeci=line.indexOf(".",target);           intstart=deci;           while(line.charAt(start)!='>'){           start--;         }           price=line.substring(start+1,deci+5);         }         line=buff.readLine();       }       ko=Double.valueOf(price); Everythingworksfineuntilafteritloopsoverathousandtimes,whichIguessgooglesenseitasabotanddeniesmeaccess,andthenitthrowsthiserror: Exceptioninthread"main"java.io.IOException:ServerreturnedHTTPresponsecode:503forURL:https://ipv4.google.com/sorry/index?continue=https://www.google.com/finance%3Fq%3DEURUSD%26ei%3DDck0WZHIAtaXeYOonJgH&q=EgS4quCrGLHm18kFIhkA8aeDS7wPSBKIVUgKVUJ9SmmbXeLbDdVOMgNyY24 atsun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) atsun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) atsun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) atxchange.Xchange.main(Xchange.java:78) C:\Users\Administrator\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53:Javareturned:1 BUILDFAILED(totaltime:7minutes1second) HowcanIsolvethis? Thanksinadvance   HenryWong author Posts:23919 142 Ilike... posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send SarkiAmadawrote: Everythingworksfineuntilafteritloopsoverathousandtimes,whichIguessgooglesenseitasabotanddeniesmeaccess. HowcanIsolvethis? Well,IwouldrecommenddoingsomeresearchonFinancialAPIs.Perhaps,thereareonesthatcanprovidethequalityofservicethatyouneed,andforareasonableprice. Henry Books:JavaThreads,3rdEdition,JiniinaNutshell,andJavaGems(contributor)   MohammedSardar. RanchHand Posts:276 2 Ilike... posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send HiSarki,WelcometoRanch.Didyoutrydebugfirstwithsomelotsfamiliardataifthecodestillundertesting?Sothatwecannarrowdowntocauseofissue.Trywithagoogleproducedfile. Todayisthefirstdayoftherestofyourlife.   MohammedSardar. RanchHand Posts:276 2 Ilike... posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send Itmaygiveyousomemoreideastoyou. HTTP503meansRequestedServiceisUnavailable. Itmightbedueto, 1)Servermightbebusy 2)Servermightbedownformaintenance Ifyouareaccessingaserviceandgettingthiserror,thentrytocontacttheserviceownertofindoutwhat'sgoingon.Ifyouaretheowneroftheservice,thenchecktheerrorsinthelogtofindouttheproblem. Ifyouarejustmakinglot'sofconnectionstotheservicefromclientclass,andgettingthiserror,thenyouneedtothinkaboutwhyyouneedtocreatesomanyconnections. Todayisthefirstdayoftherestofyourlife.   SarkiAmada Greenhorn Posts:5 posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send Well,theserverisnotbusyandisn'tdownformaintenancebecauseIopenthelinkonbrowseritworksfine,andifIconnecttoanotherwifi,theprogramworksuntiltheloopingreachesathousandplusandthenitwillthrowtheerror,Ireadonotherwebsitethatotheruserpostedwithsimilarproblem,it'sbeingsaidthatitmaybebecausetheconnectioniscomingfromajavaprogramandnotabrowserthat'swhygoogledeniestheconnectiontocontinue,soistheiranywaytosolveit,somepeoplepointouttouseuseragent,totrickgooglethatyou'recomingfromabrowser,buttruthfullyIdon'tknowhowtoimplementthat.inmycode MohammedSardar.wrote: Itmaygiveyousomemoreideastoyou. HTTP503meansRequestedServiceisUnavailable. Itmightbedueto, 1)Servermightbebusy 2)Servermightbedownformaintenance Ifyouareaccessingaserviceandgettingthiserror,thentrytocontacttheserviceownertofindoutwhat'sgoingon.Ifyouaretheowneroftheservice,thenchecktheerrorsinthelogtofindouttheproblem. Ifyouarejustmakinglot'sofconnectionstotheservicefromclientclass,andgettingthiserror,thenyouneedtothinkaboutwhyyouneedtocreatesomanyconnections.   DaveTolls Rancher Posts:4801 50 posted4yearsago 1 Numberofslicestosend: Optional'thank-you'note: Send Didyouopenthatpage? Thisiswhatitsays: Oursystemshavedetectedunusualtrafficfromyourcomputernetwork.Pleasetryyourrequestagainlater.Whydidthishappen? IPaddress:xxx.xxx.xxx.xxx Time:2017-06-06T07:39:50Z URL:https://www.google.com/finance?q=EURUSD&ei=Dck0WZHIAtaXeYOonJgH Soyes,theymonitorconnections. Ifyourbrowserdidthesamething(egusingJavascript)itwouldprobablyrespondthesameway.   SarkiAmada Greenhorn Posts:5 posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send ThanksDave,howdidyougetthesystemtoreportthatresulttoyou?? DaveTollswrote:Didyouopenthatpage? Thisiswhatitsays: Oursystemshavedetectedunusualtrafficfromyourcomputernetwork.Pleasetryyourrequestagainlater.Whydidthishappen? IPaddress:xxx.xxx.xxx.xxx Time:2017-06-06T07:39:50Z URL:https://www.google.com/finance?q=EURUSD&ei=Dck0WZHIAtaXeYOonJgH Soyes,theymonitorconnections. Ifyourbrowserdidthesamething(egusingJavascript)itwouldprobablyrespondthesameway.   DaveTolls Rancher Posts:4801 50 posted4yearsago Numberofslicestosend: Optional'thank-you'note: Send Theexceptionyoupostedsaid: Exceptioninthread"main"java.io.IOException:ServerreturnedHTTPresponsecode:503for URL:https://ipv4.google.com/sorry/index?continue=https://www.google.com/finance%3Fq%3DEURUSD%26ei%3DDck0WZHIAtaXeYOonJgH&q=EgS4quCrGLHm18kFIhkA8aeDS7wPSBKIVUgKVUJ9SmmbXeLbDdVOMgNyY24 SoIjustcopiedthatURLandpasteditintothebrowser...   Iamgoingtotestyourelectricalconductivitywiththistinyad: Free,earthfriendlyheat-fromtheCodeRanchtrailboss https://www.kickstarter.com/projects/paulwheaton/free-heat reply reply BookmarkTopic WatchTopic NewTopic Boostthisthread! SimilarThreads SendPOSTmethodbyHttpURLConnectiontoanunknowndevices howtoextractsearchengineresults Howtomakeasimpleandworkingtext-to-speech(TTS)"Hello"withgoogleAPI(orany)onJava? URLreadererrorinmywebapplication problemwithsearchengines BuildingaBetterWorldinyourBackyardbyPaulWheatonandShawnKlassen-Koop More...



請為這篇文章評分?