I have setup the PubSub emulator to run a Python script locally pointing to it.
The emulator is run following the tutorial and it seems to be working fine:
ā gcloud beta emulators pubsub start --project=tokyo-rain-123 --host-port=127.0.0.1:8085
Executing: /Users/pabloruiz/Downloads/google-cloud-sdk/platform/pubsub-emulator/bin/cloud-pubsub-emulator --host=127.0.0.1 --port=8085
[pubsub] This is the Google Pub/Sub fake.
[pubsub] Implementation may be incomplete or differ from the real system.
[pubsub] Nov 17, 2022 3:32:04 PM com.google.cloud.pubsub.testing.v1.Main main
[pubsub] INFO: IAM integration is disabled. IAM policy methods and ACL checks are not supported
[pubsub] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[pubsub] SLF4J: Defaulting to no-operation (NOP) logger implementation
[pubsub] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[pubsub] Nov 17, 2022 3:32:04 PM com.google.cloud.pubsub.testing.v1.Main main
[pubsub] INFO: Server started, listening on 8085
It is working fine using curl:
ā curl -X PUT http://localhost:8085/v1/projects/tokyo-rain-123/topics/topic-data1
{
"name": "projects/tokyo-rain-123/topics/topic-data1"
}
Although it is displaying this warning on the emulator:
[pubsub] INFO: Server started, listening on 8085
[pubsub] Nov 17, 2022 4:00:57 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Nov 17, 2022 4:00:57 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected HTTP/2 connection.
I can't reach it using Postman. I receive this response:
{
"error": {
"code": 500,
"message": "RST_STREAM closed stream. HTTP/2 error code: PROTOCOL_ERROR",
"status": "INTERNAL"
}
}
And this is the log from the emulator:
[pubsub] WARNING: Metadata key is 'Connection', which should not be used. That is used by HTTP/1 for connection-specific headers which are not to be forwarded. There is probably an HTTP/1 conversion bug. Simply removing the Connection header is not enough; you should remove all headers it references as well. See RFC 7230 section 6.1
[pubsub] java.lang.RuntimeException: exception to show backtrace
[pubsub] at io.grpc.Metadata$Key.validateName(Metadata.java:740)
[pubsub] at io.grpc.Metadata$Key.<init>(Metadata.java:762)
[pubsub] at io.grpc.Metadata$Key.<init>(Metadata.java:671)
[pubsub] at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:971)
[pubsub] at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:966)
[pubsub] at io.grpc.Metadata$Key.of(Metadata.java:708)
[pubsub] at io.grpc.Metadata$Key.of(Metadata.java:704)
[pubsub] at io.gapi.emulators.grpc.HttpAdapter$StubMethodHandler.handle(HttpAdapter.java:537)
[pubsub] at io.gapi.emulators.grpc.HttpAdapter$UnaryMethodHandler.handle(HttpAdapter.java:572)
[pubsub] at io.gapi.emulators.grpc.HttpAdapter.handleRequest(HttpAdapter.java:195)
[pubsub] at io.gapi.emulators.netty.HttpHandler.channelRead(HttpHandler.java:52)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[pubsub] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[pubsub] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[pubsub] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
[pubsub] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
[pubsub] at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
[pubsub] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
[pubsub] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
[pubsub] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
[pubsub] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
[pubsub] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[pubsub] at java.base/java.lang.Thread.run(Thread.java:1589)
[pubsub]
[pubsub] Nov 17, 2022 4:02:20 PM io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener shouldIgnoreHeadersOrDataFrame
[pubsub] INFO: [id: 0xde374c44, L:/127.0.0.1:56005 - R:/127.0.0.1:56628] ignoring DATA frame for stream RST_STREAM sent.
[pubsub] Nov 17, 2022 4:02:20 PM io.gapi.emulators.netty.HttpHandler$1 onError
[pubsub] INFO: Exception when handling request: INTERNAL: RST_STREAM closed stream. HTTP/2 error code: PROTOCOL_ERROR
If I try it with the Python client, it just never reaches the server, since I can't see anything in the logs. This is the Python scripts:
import logging
import os
from dotenv import load_dotenv
from google.cloud import pubsub_v1
load_dotenv()
logger = logging.getLogger(__name__)
HOST, PROJECT_ID = os.environ.get("PUBSUB_EMULATOR_HOST"), os.environ.get("PUBSUB_PROJECT_ID")
print(f"Host: {HOST}, Project ID: {PROJECT_ID}")
publisher = pubsub_v1.PublisherClient()
def list_topics(project_id):
project_path = f"projects/{project_id}"
all_topics = list(publisher.list_topics(
request={"project": project_path},
timeout=5
))
print(f"Found {len(all_topics)}")
return all_topics
logger.info("Listing topics for project:")
topics = list_topics(project_id=PROJECT_ID)
for topic in topics:
logger.info(topics)
which is just printing the correct env variables, but the client never gets a response for the rpc call.
Host: [::1]:8085, Project ID: tokyo-rain-123
Any idea why this is happening ?
Thanks in advance !
Can't comment, but found a relevant issue tracked by google: https://issuetracker.google.com/issues/259505258
It seems like you are starting the emulator on --host-port=127.0.0.1:8085, not [::1]:8085. If you specify the Host as localhost:8085, it should work.
Through Postman, uncheck the Connection key.
The reason why it works through curl is because you don't have Connection metadata.
Related
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
1657025991848 geckodriver INFO Listening on 127.0.0.1:36420
1657025992206 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "--remote-debugging-port" "43580" "--remote-allow-hosts" "localhost" "--remote-allow-origins" "http://localhost:43580/" "-no-remote" "-profile" "/tmp/rust_mozprofileVtrviY"
1657025995486 Marionette INFO Marionette enabled
WebDriver BiDi listening on ws://localhost:43580
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofileVtrviY/search.json.mozlz4", (void 0)))
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
1657026001387 Marionette INFO Listening on port 39037
DevTools listening on ws://localhost:43580/devtools/browser/86e2982c-398b-49ef-bcc7-b7e66cf0b620
Read port: 39037
1657026001714 RemoteAgent WARN TLS certificate errors will be ignored for this session
Jul 05, 2022 6:30:01 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
Exception in thread "main" java.lang.NoSuchMethodError: 'org.openqa.selenium.ImmutableCapabilities org.openqa.selenium.ImmutableCapabilities.copyOf(org.openqa.selenium.Capabilities)'
at org.openqa.selenium.PersistentCapabilities.(PersistentCapabilities.java:47)
at org.openqa.selenium.PersistentCapabilities.(PersistentCapabilities.java:41)
at org.openqa.selenium.firefox.FirefoxDriver.lambda$new$2(FirefoxDriver.java:150)
at java.base/java.util.Optional.map(Optional.java:265)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:149)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:94)
at FrameTest.main(FrameTest.java:13)
I'm using selenium-standalone-server-2.39 as RemoteWebDriver[server is running on different machine] with firefox 26 on windows 7.test execution is working fine but when code try to close or quit the driver/browser during suite teardown then it gives UnreachableBrowserException. although If I use webdriver locally[server is running on same machine] it works perfectly.
I have already tried with different version of webdriver 2.36,2.37,2.38 with ff 26 but same exception comes every time.
If someone help me to resolve this problem it will be very helpful.
what combination of selenium webdriver and firefox which works perfectly?
EDIT: This simple piece of code i'm trying to run-
public static void main(String s[]) throws Exception {
URL url = new URL( "http", ip, 4444, "/wd/hub" );
FirefoxProfile pf = new FirefoxProfile(new File("D:\\ffprofile"));
DesiredCapabilities capabilities =DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, pf);
System.out.println("1");
capabilities.setJavascriptEnabled(true);
System.out.println("2");
WebDriver driver = new RemoteWebDriver(url,capabilities);
System.out.println("4");
driver.get("http://www.google.com");
driver.close();
}
Exception:
Jan 07, 2014 1:10:32 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:10:32 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Jan 07, 2014 1:10:51 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:10:51 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Jan 07, 2014 1:11:10 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:11:10 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.38.0', revision: 'bd32d4e', time: '2013-12-05 16:15:38'
System info: host: 'symc-w7-12281', ip: '10.88.155.166', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_25'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:418)
at SeleniumTest.main(SeleniumTest.java:30)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)
at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:223)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:319)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:298)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 3 more
Try commenting out this line in your code:
capabilities.setCapability(FirefoxDriver.PROFILE, pf);
Instead of specifying the profile you want to use on your grid, just configure the profile in the grid configuration explicitly, or don't specify profile at all so that Firefox just uses a default profile.
If you look at the release notes for Selenium 2.41.0 ( https://selenium.googlecode.com/git/java/CHANGELOG ) you will notice that Firefox 26 is no longer supported. It was supported in 2.39 but you can use the release notes to make sure you are using the right version. In fact, Selenium 2.44.0 only supports Firefox 24, 31, 32 and 33.
I would try downgrading your version of Firefox
I do not know how to debug the following error : (could you explain me how to debug this kind of error ?).
One error is related to Guice Filter, and the other one is related to MessageBodyReader.
Initializing App Engine server
May 25, 2013 1:46:06 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\JUNO-WS\0-MS\war\WEB-INF/appengine-web.xml
May 25, 2013 1:46:06 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\JUNO-WS\0-MS\war\WEB-INF/web.xml
May 25, 2013 1:46:06 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\0-LIB\GAE\appengine-java-sdk-1.7.7.1\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\JUNO-WS\0-MS\war\WEB-INF\appengine-web.xml'
May 25, 2013 1:46:06 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
May 25, 2013 1:46:07 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
May 25, 2013 1:46:09 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: Master/Slave
Storage: C:\JUNO-WS\0-MS\war\WEB-INF\appengine-generated\local_db.bin
May 25, 2013 1:46:09 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: Time to load datastore: 21 ms
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed guiceFilter: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext#816c920{/,C:\JUNO-WS\0-MS\war}
java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:35)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:212)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.init(FilterDispatcher.java:39)
at com.MS.server.guice.GuiceRestEasyFilterDispatcher.init(GuiceRestEasyFilterDispatcher.java:34)
at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:114)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:98)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:172)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:230)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:78)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:216)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1164)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1107)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:70)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:31)
... 31 more
Caused by: java.lang.RuntimeException: Failed to construct public org.jboss.resteasy.plugins.providers.DocumentProvider(org.jboss.resteasy.spi.ResteasyConfiguration)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:144)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:1861)
at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:704)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1159)
... 34 more
Caused by: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
at org.jboss.resteasy.plugins.providers.DocumentProvider.<init>(DocumentProvider.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:135)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:132)
... 37 more
May 25, 2013 1:46:09 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.AbstractServer startup
INFO: Server default is running at http://localhost:8888/
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.AbstractServer startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
May 25, 2013 1:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: Dev App Server is now running
Linking modules
Bootstrap link for command-line module 'com.MS.MS'
Linking module 'MS'
Invoking Linker Cross-Site-Iframe
Ignoring the following script tags in the gwt.xml file
jsonpath.js
May 25, 2013 1:46:39 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$PersistDatastore persist
INFO: Time to persist datastore: 19 ms
-- Thanks you
I solved my error adding xalan-2.7.1.jar to the classpath.
I'm having issues setting up Solr as Tomcat service in CentOS. Iām using solr 3.3.0 which should be working with Tomcat 5.5 installed from cPanel. The error I was getting is:
Can't find resource 'solrconfig.xml' in classpath or '/home/sampleuser/public_html/apache-solr/example/solr/./conf/', cwd=/usr/local/jakarta/apache-tomcat-5.5.33/bin
I saw other people having similar issues. I googled and tried to apply all of the approaches. However nothing worked for me so far.
I did the following:
Copied solr.war to tomcat/webapps
Restarted Tomcat Service
Edited /usr/local/jakarta/tomcat/webapps/solr/WEB-INF/web.xml as:
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/home/sampleuser/public_html/apache-solr/example/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Created solr.xml in /usr/local/jakarta/tomcat/conf/Catalina/localhost as:
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/local/jakarta/tomcat/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String"
value="/home/sampleuser/public_html/apache-solr/example"override="true"/>
</Context>
Edited tomcat startup script at etc/init.d (not sure if I had to do it at all) with:
export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/sampleuser/public_html/apache-solr/example/solr"
Below is the complete error log from catalina.err:
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 9, 2011 7:35:06 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 9, 2011 7:35:21 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk/jre/lib/amd64/server:/usr/local/jdk/jre/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Oct 9, 2011 7:35:23 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 9, 2011 7:35:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2875 ms
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.33
Oct 9, 2011 7:35:23 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 9, 2011 7:35:24 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /usr/local/jakarta/tomcat/webapps/solr.war inside the host appBase has been specified, and will be ignored
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/'
Oct 9, 2011 7:35:25 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: /home/sampleuser/public_html/apache-solr/example/solr/solr.xml
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:25 PM org.apache.solr.core.CoreContainer <init>
INFO: New CoreContainer: solrHome=/home/sampleuser/public_html/apache-solr/example/solr/ instance=1537767228
Oct 9, 2011 7:35:25 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/'
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/sampleuser/public_html/apache-solr/example/solr/./'
Oct 9, 2011 7:35:26 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or '/home/sampleuser/public_html/apache-solr/example/solr/./conf/', cwd=/usr/local/jakarta/apache-tomcat-5.5.33/bin
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:268)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:234)
at org.apache.solr.core.Config.<init>(Config.java:141)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:131)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:435)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:133)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3666)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/usr/local/jakarta/apache-tomcat-5.5.33/bin
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Oct 9, 2011 7:35:26 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /home/sampleuser/public_html/apache-solr/example/solr
Oct 9, 2011 7:35:26 PM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
When I copy the missing path via shell I was able to navigate just fine. Seem like Tomcat cannot locate the solrconfig.xml.
First off: you don't need to #3 and #4 and 5. #3 isn't really recommended unless you are explicitly customizing the solr.war. #4 and #5 are two different ways to do the same thing - use whichever one is most convenient for you (JNDI vs system properties)
Second: please note that while #3 and #5 are consistent, in #4 you actually specify a different Solr home dir (the parent dir of what you really want)
Third: I think the crux of your problem is file permissions.
The logging is a bit confusing due to SOLR-3264 which causes "instanceDirs" for each core to be refered to erroneously as "Solr Home" but what seems to be happening is that it can't find (or read) your "/home/sampleuser/public_html/apache-solr/example/solr/solr.xml" so it's going into legacy "Single Core" mode where it assumes that you want to use your Solr Home dir as an instanceDir for a (single) Solr Core -- so it then looks for "/home/sampleuser/public_html/apache-solr/example/solr/solrconf.xml" and if it can't find (or read) that file it gives up.
So depending on whether your main concern is that you actually have a solr.xml (pointing to alternate instanceDirs) hat it's not finding, or if you actually have a solrconfig.xml file where it's looking, check the file permissions of those files (and their directories), and make sure they are readable by the effective user of your tomcat server.
(FWIW: Solr 3.6 and up will have better logging when solr.xml is not found and legacy mode is used, and I've opened SOLR-3266 to pursue better ways of logging/erroring on unreadable files in the future)
developing JSF on GAE, can't run my project , when i run , it throws this exception
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\THS\workspace\jsfgae\war\WEB-INF/appengine-web.xml
Jun 26, 2011 4:09:21 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\THS\workspace\jsfgae\war\WEB-INF/web.xml
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext#1700391{/,C:\Users\THS\workspace\jsfgae\war}: java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler#78dc4c: java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
Jun 26, 2011 4:09:23 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:613)
at com.sun.faces.config.WebConfiguration.<init>(WebConfiguration.java:122)
at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:182)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:163)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:186)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:157)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:169)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Jun 26, 2011 4:09:23 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Yes, it's common problem, look at http://java.dzone.com/news/jsf2-configuration-google-app how to fix this.
And also look at http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine There is a lot of information about what Java libraries works on GAE, and what are not