-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting an issue in predict request #1
Comments
Can you please check that your server is running and reachable? Caused by: java.net.ConnectException: Connection refused: connect |
try using 192.168.99.100:8888 |
tried that before posting this issue.. it was not working so I tried with localhost. But either of them is not working |
after using 192.168.99.100:8888, stack trace is different: com.deepdetect.api.exceptions.DeepDetectException: |
this means |
these are the parameters I am passing to a method before calling predict : These are all string values I am reading them from a property file. This is the Entity object getting created for above data - Entity{entity={"service":"imageserv","parameters":{"input":{"width":224,"height":224},"output":{"best":5},"mllib":{"gpu":false}},"data":["https://www.google.ca/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwj_r7-B98vNAhVL5GMKHToHDBAQjRwIBw&url=https%3A%2F%2Fdavechampionsliberty.com%2F2015%2F09%2Ffact-there-is-no-war-on-police%2F&psig=AFQjCNFzfZ_mHNtPqBabXHTbl54nKr0_9g&ust=1467244811402590"]}, variant=Variant[mediaType=application/json, language=null, encoding=null], annotations=[]} |
My issue is resolved... URL I was using was invalid. I tried with different image URL and it worked. |
I need to make the error message clear |
Stack trace -
com.deepdetect.api.exceptions.DeepDetectException:
at com.deepdetect.api.request.DeepDetectRequest.process(DeepDetectRequest.java:55)
at com.imageindexer.deepdetect.service.ImageClassificationService.predictImages(ImageClassificationService.java:47)
at com.imageindexer.deepdetect.service.ImageCategoryIndexer.jsonToTwitterObjectMap(ImageCategoryIndexer.java:158)
at com.imageindexer.deepdetect.service.ImageCategoryIndexer.indexTwitterImageCategories(ImageCategoryIndexer.java:84)
at com.imageindexer.deepdetect.service.DeepDetectIndexingService.categorizeImages(DeepDetectIndexingService.java:83)
at com.spark.imageindexer.api.controller.ElasticsearchController.lambda$1(ElasticsearchController.java:79)
at spark.SparkBase$1.handle(SparkBase.java:311)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:159)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:60)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:179)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:451)
at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:252)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:266)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:240)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.ws.rs.ProcessingException: java.net.ConnectException: Connection refused: connect
at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:287)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:448)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:349)
at com.deepdetect.api.request.DeepDetectRequest.doPost(DeepDetectRequest.java:79)
at com.deepdetect.api.request.PredictRequest.internalProcess(PredictRequest.java:144)
at com.deepdetect.api.request.PredictRequest.internalProcess(PredictRequest.java:17)
at com.deepdetect.api.request.DeepDetectRequest.process(DeepDetectRequest.java:48)
... 18 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.glassfish.jersey.client.internal.HttpUrlConnector$4.getOutputStream(HttpUrlConnector.java:385)
at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:200)
at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:194)
at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:228)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:299)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
at sun.nio.cs.StreamEncoder.flush(Unknown Source)
at java.io.OutputStreamWriter.flush(Unknown Source)
at org.glassfish.jersey.message.internal.ReaderWriter.writeToAsString(ReaderWriter.java:193)
at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:130)
at org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(StringMessageProvider.java:99)
at org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(StringMessageProvider.java:59)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
at org.glassfish.jersey.client.ClientRequest.doWriteEntity(ClientRequest.java:517)
at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:499)
at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:388)
at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:285)
... 31 more
config.properties file
Properties for image prediction
baseURLHost = http://localhost:8888
serviceName = imageserv
inputParameters = {"width":224,"height":224}
outputParameters = {"best":5}
mlibParameters = {"gpu":false}
I am using above values for my predict request in following method -
public PredictResponse predictImages(String baseURLHost, String serviceName, String imageURL, String inputParameters, String outputParameters, String mlibParameters) {
PredictResponse response = null;
try {
response = PredictRequest.newPredictRequest() //
.baseURL(baseURLHost) //
.service(serviceName) //
.data(imageURL) //
.input(inputParameters)
.output(outputParameters)
.mllibParams(mlibParameters)
.build().process();
getting exception in doPost() method of DeepDetectRequest.java.
I have created service - imageserv in deepdetect and my deepdetect is running on port 8888
The text was updated successfully, but these errors were encountered: