erudika / para Goto Github PK
View Code? Open in Web Editor NEWMultitenant backend server for building web and mobile apps rapidly. The backend for busy developers. (self-hosted or hosted)
Home Page: https://paraio.org
License: Apache License 2.0
Multitenant backend server for building web and mobile apps rapidly. The backend for busy developers. (self-hosted or hosted)
Home Page: https://paraio.org
License: Apache License 2.0
Generic OAuth2 filter worked on my localhost dev environment, but seems to have a small bug when deployed to a test server with proper domain names.
I have set up Nginx reverse proxies for both Para and Scoold, which seem to work fine.
Except for the oauth2_auth
endpoint which redirects to localhost
instead of the expected public domain and makes the authentication flow fail. ( redirect looking like this: http://localhost:8040/signin/success?jwt=<token>
instead of http://qa.test.isabot.net/signin/success?jwt=<token>
)
Scoold's application.conf has both URL's set up correctly:
para.host_url = "http://qa.test.isabot.net"
para.endpoint = "http://para.test.isabot.net"
Am I missing something in Para's application.conf?
Does this application supports push notifications & background job functionality like parse server. Are these features part of your road map. could you please suggest third party libraries(for push notification & job scheduler) which work well with this application. Apple company is one your client, written in web site, there is mention of applie tvOS and OSX. Does this application support these as well?
Hi,
Is there any way to do aggregation query such as sum of values?
Regards,
Jon
As discussed on Gitter, we'd like to have some integration with the AWS IoT platform. Ideas and suggestions are welcome. Here's the plan so far:
Thing
objects through the Para REST APIThing
is created Para also creates the device and certificates on AWS IoTread(thingId)
and updates the Thing
Thing
state is updated from the Para API, the AWS IoT shadow is updated accordinglyIn relation to Erudika/scoold#5
The Caffeine library looks good, but we might be better off with a simpler solution.
para 1.31.3 reports an error as below:
2019-06-06 21:31:21 [ERROR] null
java.lang.IllegalArgumentException: Could not load codec 'Lucene70'. Did you forget to add lucene-backward-codecs.jar?
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:420)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:352)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:289)
at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:64)
at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:61)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:680)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:84)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:76)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:64)
at com.erudika.para.search.LuceneUtils.getIndexReader(LuceneUtils.java:878)
at com.erudika.para.search.LuceneUtils.searchQuery(LuceneUtils.java:719)
at com.erudika.para.search.LuceneSearch.findById(LuceneSearch.java:155)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d.CGLIB$findById$21(<generated>)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d$$FastClassByGuice$$4f525818.invoke(<generated>)
at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
at com.erudika.para.aop.SearchQueryAspect.invokeTimedSearch(SearchQueryAspect.java:93)
at com.erudika.para.aop.SearchQueryAspect.invoke(SearchQueryAspect.java:78)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:78)
at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:54)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d.findById(<generated>)
at com.erudika.para.search.LuceneSearch.findById(LuceneSearch.java:375)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d.CGLIB$findById$20(<generated>)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d$$FastClassByGuice$$4f525818.invoke(<generated>)
at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
at com.erudika.para.aop.SearchQueryAspect.invoke(SearchQueryAspect.java:80)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:78)
at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:54)
at com.erudika.para.search.LuceneSearch$$EnhancerByGuice$$5b51948d.findById(<generated>)
at com.erudika.para.utils.HealthUtils$1.performHealthCheck(HealthUtils.java:65)
at com.erudika.para.utils.HealthUtils$1.onInitialize(HealthUtils.java:93)
at com.erudika.para.Para.initialize(Para.java:110)
at com.erudika.para.ParaServer.initialize(ParaServer.java:153)
at com.erudika.para.ParaServer.runAsJAR(ParaServer.java:415)
at com.erudika.para.ParaServer.main(ParaServer.java:424)
at com.erudika.para.Run.main(Run.java:26)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene70' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [Lucene80]
at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:116)
at org.apache.lucene.codecs.Codec.forName(Codec.java:116)
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:416)
... 44 common frames omitted
2019-06-06 21:31:21 [WARN ] Server is unhealthy - the search index may be corrupted and may have to be rebuilt.
I installed lucense 8.1.1 and booted up para successfully, but please put it in the latest document.
I created a pull request for this issue. #20
I am trying to register users via Microsoft authentication on a Scoold site running with Para, but some of them get authentication errors although they have valid Microsoft accounts.
For reference, I am running v1.28.5 of the executable Para WAR file on localhost:8080, and then using it as the backend for a Scoold instance also running on localhost.
I would first try registering a user with their Microsoft account; for the affected Microsoft accounts, the user either:
In the first case, the Para server stops logging in any users, including those that had no issues before. I then have to restart the Para server to log/register users again. When I terminate the process, I get this stack trace.
In the second case, the Para server continues working fine for users with unaffected Microsoft accounts, and Para just logs the following error (seems to come from MicrosoftAuthFilter.java and SecurityUtils.java:)
2018-03-14 15:40:50 ←[1;31m[ERROR]←[0;39m Bad credentials.
In both cases, no new user objects are created on Para, and I have not been able to find why one case happens instead of the other.
After some testing, I did find that older Microsoft accounts (created before July 2017) did not cause any problems, while newer Microsoft accounts (created within the last week) tended to trigger the issue (note, though, this is based on testing only a handful of Microsoft accounts; I will post any updates if I can further isolate the issue.)
I've recently upgraded my services to support HTTPS, but since then my OAuth2 authorization won't work anymore. After some digging, I found out that para still sends the http
version of the url to my endpoint instead of the https
one. I could allow the http
redirect on my authorization server, but am wondering what I could be missing in the configurations.
In the scoold application.conf the Para endpoint is set to the 'https://' version and in Para the environment is set to 'production'. Is there anything else I might be missing?
Hi,
Para use MERGE statement in its queries, but MySQL and PostgreSQL don't have MERGE statement. Instead their developers recommend to use INSERT. Please consider to fix this issue. I'd like to use RDB backend...
If all that is required is to set some properties then a list of properties to set in application.conf
file would be great.
Hello, everyone, sorry to interput you. I am a scoold user, that I come here to use para for my backend server.Unluckily, there is a problem. I configured para like this
para.app_name = "Para"
para.env = "embedded"
para.security.allow_unverified_emails = false
para.clients_can_access_root_app = true
para.cache_enabled = true
para.app_secret_key = "b8db69a24a43f2ce134909f164a45263"
para.security.api_security = true
para.worker_id = 1
para.sql.driver=com.mysql.jdbc.Driver
para.sql.url=127.0.0.1
para.sql.user=root
para.sql.password=root
para.dao = "SqlDAO"
and 127.0.0.1 is my local mysql server.
besides,I include
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
in para source code and I start para with new war that i package.
The result is that I keep receiving
Failed to connect to SQL database: No suitable driver found for jdbc:127.0.0.1
I read doc in http://paraio.org/docs/#013-sql, how could I solve this problem.
While manually building para from master
I get the below error:
[INFO] Starting audit...
[ERROR] /home/ec2-user/para/para-server/src/main/java/com/erudika/para/rest/RestUtils.java:659:9: Cyclomatic Complexity is 19 (max allowed is 15). [CyclomaticComplexity]
Audit done.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Para ............................................... SUCCESS [ 0.941 s]
[INFO] para-core .......................................... SUCCESS [ 11.085 s]
[INFO] para-client ........................................ SUCCESS [ 1.701 s]
[INFO] para-server ........................................ FAILURE [ 3.681 s]
[INFO] para-war ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.992 s
[INFO] Finished at: 2018-04-28T20:28:07Z
[INFO] Final Memory: 46M/117M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (validate-server) on project para-server: Failed during checkstyle execution: There is 1 error reported by Checkstyle 6.18 with ../para-core/src/main/resources/checkstyle.xml ruleset. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :para-server
I'm using the android client sdk.
I have initialized the ParaClient with the secret key for testing purpose.
I attach the para.log and para-access.log.
So this is what happens when I try starting Para on CentOS 7.6 with Java 8:
# java -jar -Dconfig.file=./application.conf para.jar
2019-02-18 14:15:49 [WARN ] Para configuration file 'application.(conf|json|properties)' is missing from classpath.
____ ___ _ ____ ___ _
/ __ \/ __` / ___/ __` /
/ /_/ / /_/ / / / /_/ /
/ .___/\__,_/_/ \__,_/ v1.31.1
/_/
2019-02-18 14:15:50 [INFO ] --- Para.initialize() [embedded] ---
2019-02-18 14:15:50 [INFO ] Loaded new DAO, Search and Cache implementations - MockDAO, MockSearch and CaffeineCache.
2019-02-18 14:15:50 [WARN ] Server is unhealthy - root app not found. Open /v1/_setup in the browser to initialize Para.
2019-02-18 14:15:50 [INFO ] Instance #1 initialized.
2019-02-18 14:15:50 [INFO ] Starting ParaServer on hth.ad.adasworks.com with PID 9652 (/opt/para/para.jar started by root in /opt/para)
2019-02-18 14:15:50 [INFO ] The following profiles are active: embedded
2019-02-18 14:15:51 [INFO ] Listening on port 8080...
2019-02-18 14:15:53 [WARN ] Failed startup of context o.s.b.w.e.j.JettyEmbeddedWebAppContext@3d121db3{/,[file:///tmp/jetty-docbase.756875440212533782.8080/],UNAVAILABLE}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:235)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:193)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:188)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:170)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:89)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:261)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:234)
at org.springframework.boot.web.embedded.jetty.ServletContextInitializerConfiguration.callInitializers(ServletContextInitializerConfiguration.java:66)
at org.springframework.boot.web.embedded.jetty.ServletContextInitializerConfiguration.configure(ServletContextInitializerConfiguration.java:55)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:517)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1454)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.server.Server.start(Server.java:415)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.springframework.boot.web.embedded.jetty.JettyWebServer.initialize(JettyWebServer.java:108)
at org.springframework.boot.web.embedded.jetty.JettyWebServer.<init>(JettyWebServer.java:86)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getJettyWebServer(JettyServletWebServerFactory.java:410)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getWebServer(JettyServletWebServerFactory.java:153)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at com.erudika.para.ParaServer.runAsJAR(ParaServer.java:411)
at com.erudika.para.ParaServer.main(ParaServer.java:419)
at com.erudika.para.Run.main(Run.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
... 56 common frames omitted
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:156)
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:149)
at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:176)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:193)
at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:268)
at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:41)
at com.erudika.para.security.SecurityConfig.configure(SecurityConfig.java:151)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:231)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:322)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92)
at com.erudika.para.security.SecurityConfig$$EnhancerBySpringCGLIB$$d232b785.init(<generated>)
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371)
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325)
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059.CGLIB$springSecurityFilterChain$3(<generated>)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059$$FastClassBySpringCGLIB$$5640cfdf.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059.springSecurityFilterChain(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 57 common frames omitted
2019-02-18 14:15:53 [WARN ] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Jetty web server
2019-02-18 14:15:53 [INFO ] --- Para.destroy() ---
2019-02-18 14:15:53 [ERROR] Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Jetty web server
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at com.erudika.para.ParaServer.runAsJAR(ParaServer.java:411)
at com.erudika.para.ParaServer.main(ParaServer.java:419)
at com.erudika.para.Run.main(Run.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Jetty web server
at org.springframework.boot.web.embedded.jetty.JettyWebServer.initialize(JettyWebServer.java:114)
at org.springframework.boot.web.embedded.jetty.JettyWebServer.<init>(JettyWebServer.java:86)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getJettyWebServer(JettyServletWebServerFactory.java:410)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getWebServer(JettyServletWebServerFactory.java:153)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
... 16 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:235)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:193)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:188)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:170)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:89)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:261)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:234)
at org.springframework.boot.web.embedded.jetty.ServletContextInitializerConfiguration.callInitializers(ServletContextInitializerConfiguration.java:66)
at org.springframework.boot.web.embedded.jetty.ServletContextInitializerConfiguration.configure(ServletContextInitializerConfiguration.java:55)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:517)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1454)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.server.Server.start(Server.java:415)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.springframework.boot.web.embedded.jetty.JettyWebServer.initialize(JettyWebServer.java:108)
... 21 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
... 56 common frames omitted
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'security'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:156)
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:149)
at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:176)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:193)
at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:268)
at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:41)
at com.erudika.para.security.SecurityConfig.configure(SecurityConfig.java:151)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:231)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:322)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92)
at com.erudika.para.security.SecurityConfig$$EnhancerBySpringCGLIB$$d232b785.init(<generated>)
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371)
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325)
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059.CGLIB$springSecurityFilterChain$3(<generated>)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059$$FastClassBySpringCGLIB$$5640cfdf.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$f48c9059.springSecurityFilterChain(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 57 common frames omitted
# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Works if I omit the -Dconfig.file
parameter. But according to the documentation it should work (and it does work on Windows), and this also needs to be specified if I create a proper system service for Para, where the configuration and the binary aren't necessarily in the same folder.
How can I register user with basic authentication ?
Is there an example of register and login with basic authentication ?
How can I use REST API with basic authentication ?
How can I use Java para-client with basic authentication ?
Hello,
We are trying to store data on a Azure MySQL database, but we have run in some problems.
First, on table creation, the database engine throws the following error:
Failed to create a new table for appid 'xxx' in the SQL database [Specified key was too long; max key length is 3072 bytes (Error Code: 1071, SQLState: 42000)]
I realized it was because the table creation script specifies a primary key varchar(2048) utf8mb4, when the max allowed is varchar(768) utf8mb4.
Even after fixing that, I got another issue:
Although when creating objects they are stored in the MySQL database, when the Para instance is rebooted it doesn't seem to read them back, so I end up with a "empty" Para instance again (but initialized anyway, odd).
I tried to get to the bottom of this, but I took to much time and gave up, I didn't quite know if the problem is in the core or on the sql plugin.
This is my config (obscured sensitive info):
# the name of the root app
para.app_name = "xxx"
# or set it to 'production'
para.env = "production"
# if true, users can be created without verifying their emails
para.security.allow_unverified_emails = false
# if hosting multiple apps on Para, set this to false
para.clients_can_access_root_app = true
# if false caching is disabled
para.cache_enabled = true
# enable API request signature verification
para.security.api_security = true
# the node number from 1 to 1024, used for distributed ID generation
para.worker_id = 1
para.cors_enabled = true
para.security.ldap.server_url = "ldap://xxx/"
para.security.ldap.base_dn = "ou=xxx,o=xxx,c=xxx"
para.security.ldap.bind_dn = ""
para.security.ldap.bind_pass = ""
para.security.ldap.user_search_base = "ou=xxx"
para.security.ldap.user_search_filter = "(uid={0})"
para.security.ldap.user_dn_pattern = "uid={0},ou=xxx"
para.security.ldap.password_attribute = "xxx"
para.dao = "SqlDAO"
para.sql.ssl_enabled = true
# The fully-qualified class name for your SQL driver. Defaults to null.
para.sql.driver = "com.mysql.cj.jdbc.Driver"
# The server URL to connect to, *without the jdbc: prefix. Defaults to null.
para.sql.url = "mysql://xxx.mysql.database.azure.com:xxx/xxx?verifyServerCertificate=false&useSSL=true&requireSSL=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"
# The username with access to the database. Defaults to user.
para.sql.user = "xxx"
# The DB password. Defaults to secret.
para.sql.password = "xxx"
This is my dockerfile:
FROM xxxxx (private java 8 base image)
USER root
RUN apk add --no-cache --update curl && rm -rf /var/cache/apk/*
USER java
WORKDIR /usr/src
COPY --chown=java:java . para
WORKDIR /usr/src/para
EXPOSE 8080
CMD ["java", "-classpath", "./lib/mysql-connector-java-8.0.11.jar:./para-war-1.29.2.war", "-Dconfig.file=./application.conf", "org.springframework.boot.loader.WarLauncher"]
(had to run with java classpath because Para wasn't reading the driver from lib)
C:\opt\para>para-cli ping
✔ Authenticated as: app my-baas (app:my-baas)
C:\opt\para>para-cli create todo.json
✔ Creating todo.json
✔ Created 1 objects with total size of 0 KB.
C:\opt\para>para-cli read --id todo.json
[]
C:\opt\para>type todo.json
{"type":"todo", "name": "buy milk"}
C:\opt\para>
Hi,
I have build para from master and am using para-search-elasticsearch 1.31.1 with the following config in application.conf
para.search = "ElasticSearch"
para.read_from_index = false
para.es.cors_enabled = false
para.es.discovery_type = "ec2"
para.es.discovery_group = "elasticsearch"
para.es.shards = 5
para.es.replicas = 1
para.es.dir = "data"
para.es.auto_expand_replicas = "0-1"
para.es.use_transportclient = false
para.es.transportclient_host = "<ip>"
para.es.transportclient_port = 9300
para.es.restclient_scheme = "http"
para.es.restclient_host = "<ip>"
para.es.restclient_port = 9200
para.es.sign_requests_to_aws = false
para.es.fail_on_indexing_errors = false
# asynchronous settings
para.es.async_enabled = false
para.es.bulk.size_limit_mb = 5
para.es.bulk.action_limit = 1000
para.es.bulk.concurrent_requests = 1
para.es.bulk.flush_interval_ms = 5000
para.es.bulk.backoff_initial_delay_ms = 50
para.es.bulk.max_num_retries = 8
para.es.bulk.flush_immediately = false
# proxy settings
para.es.proxy_enabled = false
para.es.proxy_path = "_elasticsearch"
para.es.proxy_reindexing_enabled = false
but on boot, I am getting the following error:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Caused by: java.util.ServiceConfigurationError: com.erudika.para.search.Search: Provider com.erudika.para.search.ElasticSearch could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at com.erudika.para.search.SearchModule.loadExternalSearch(SearchModule.java:54)
at com.erudika.para.search.SearchModule.configure(SearchModule.java:33)
at com.google.inject.AbstractModule.configure(AbstractModule.java:61)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.erudika.para.ParaServer.initialize(ParaServer.java:142)
at com.erudika.para.ParaServer.runAsJAR(ParaServer.java:410)
at com.erudika.para.ParaServer.main(ParaServer.java:419)
at com.erudika.para.Run.main(Run.java:26)
... 8 more
Caused by: java.util.ServiceConfigurationError: org.elasticsearch.plugins.spi.NamedXContentProvider: Provider org.elasticsearch.join.spi.ParentJoinNamedXContentProvider not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.elasticsearch.client.RestHighLevelClient.getProvidedNamedXContents(RestHighLevelClient.java:1887)
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:251)
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:236)
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:228)
at com.erudika.para.search.ElasticSearchUtils.getRESTClient(ElasticSearchUtils.java:285)
at com.erudika.para.search.ElasticSearchUtils.initClient(ElasticSearchUtils.java:227)
at com.erudika.para.search.ElasticSearch.<init>(ElasticSearch.java:124)
at com.erudika.para.search.ElasticSearch.<init>(ElasticSearch.java:112)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:433)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 22 more
Any pointers ?
Hello, it's me again.
I tried with the 1.30.0 para-dao-sql plugin now, it creates the root app table without problems, I entered with the para console and created a sysprop. I checked the MySQL database and the table is there with the root app row and the sysprop row.
However, when I shutdown the docker container and run it again, the sysprop is not loaded into the console.
Built a docker image with MySQL configuration and Dockerfile
Initialized it and opened it on Para Console, and created a Sysprop
Shutdown the docker container and rebooted it (it even says isn't initialized, but it is, if I run the /_setup URI it says "All set!")
This also affects Scoold, because it doesn't load the questions and answers from the MySQL database
Implement DAO
to work with any SQL database, possibly using a framework like JOOQ.
Para is schemaless so we need to decide how objects are going to be mapped to DB columns. One way to do this is by having a JSON column holding a ParaObject
, serialized in JSON + an id
column.
Ideas are welcome.
Hi, I found there is no user name or user id in the access log, how can I log the user information in the access log ?
Whenever I try to deploy the image on a CentOS7 or Ubuntu (DigitalOcean) the project runs, but the specific url of the secret key ( localhost:8080/v1/_setup ) is not giving back any answer back. (Though the localhost:8080/v1/ gives back no permission error)
I tried to recompile it from source, also I ran it with OpenJDK and Oracle, and the result was always the same.
On Mac and Windows the .war file is working properly.
Requested by @jswiesner
Does Para support upload of images / files and attaching them to objects - something equivalent to the concept of assets in usergrid / baasbox?
I am trying to add file uploads to a client application (Scoold, which uses para-client.) Is there a method in the ParaClient API that can use AWSFileStore to upload files to an Amazon S3 bucket, or must the client application integrate para-server to have access to AWSFileStore (i.e. by directly importing com.erudika.para.storage.AWSFileStore?)
Ability to rebuild index for ES and Lucene. (also add support this rebuild from para-cli)
Use case#1: Migrate search layer from lucene to ES
Use case#2: Restore db from backup and the index is not sync between Search Index and Sql DB
Use case#3: The index might be corrupted somehow and it is nice if we can rebuild index from database
If Para uses the DropWizard health check, we can open up the opportunity to implement custom health check properties that layer in on top of the existing ones that Para uses. Para would register a root HealthCheckRegistry, and then we can expose a way for external code to add new properties. This would allow a custom DAO plugin, for example, to implement more sophisticated health check measures if desired.
Hi,
I cannot setup para to be backed by mssql server. the following is my config.
para.dao = "SqlDAO"
para.sql.driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
para.sql.url = "jdbc:sqlserver://server\sub;databaseName=xxx"
para.sql.user = "user"
para.sql.password = "password"
FYI:
at para server, i have these files
/para/para-war-1.29.1.war
/para/application.conf
/para/lib/para-dao-sql-1.29.0-shaded.jar
/para/lib/mssql-jdbc-6.4.0.jre8.jar
when running para, there is warn message "[WARN ] Para configuration file 'application.(conf|json|properties)' is missing from classpath"
I am not sure why? but if I remove para.dao, everything is working fine again (without WARN message)
CentOS comes with Tomcat 7, and that doesn't seem to satisfy the requirements for Para:
Feb 18 14:36:14 hth.ad.fooworks.com server[9951]: INFO: validateJarFile(/usr/share/tomcat/webapps/ROOT/WEB-INF/lib/javax.el-api-3.0.1-b06.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Feb 18 14:36:14 hth.ad.fooworks.com server[9951]: Feb 18, 2019 2:36:14 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
Feb 18 14:36:14 hth.ad.fooworks.com server[9951]: INFO: validateJarFile(/usr/share/tomcat/webapps/ROOT/WEB-INF/lib/javax.servlet-api-4.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Feb 18 14:36:18 hth.ad.fooworks.com server[9951]: Feb 18, 2019 2:36:18 PM org.apache.catalina.startup.TldConfig execute
What is the required Servlet spec revision to run Para?
I have a clone of https://github.com/Erudika/para and I'm trying to run it locally on my computer to later connect it to a Scoold system.
The compilation phase went well:
$ java -jar para-1.33.2-SNAPSHOT.jar
____ ___ _ ____ ___ _
/ __ \/ __` / ___/ __` /
/ /_/ / /_/ / / / /_/ /
/ .___/\__,_/_/ \__,_/ v1.33.2-SNAPSHOT
/_/
2019-08-22 11:39:21 [INFO ] --- Para.initialize() [production] ---
2019-08-22 11:39:22 [INFO ] Loaded new DAO, Search and Cache implementations - H2DAO, LuceneSearch and CaffeineCache.
2019-08-22 11:39:22 [INFO ] Created H2 table 'para'.
2019-08-22 11:39:22 [WARN ] Server is unhealthy - root app not found. Open /v1/_setup in the browser to initialize Para.
2019-08-22 11:39:22 [INFO ] Instance #1 initialized.
2019-08-22 11:39:23 [INFO ] Starting ParaServer on 800000072515-NB with PID 46836 (C:\Users\lfnnlyt\eclipse\workspace\para\para-jar\target\para-1.33.2-SNAPSHOT.jar started by lfnnlyt in C:\Users\lfnnlyt\eclipse\workspace\para\para-jar\target)
2019-08-22 11:39:23 [INFO ] The following profiles are active: production
2019-08-22 11:39:24 [INFO ] Listening on port 8080...
2019-08-22 11:39:25 [INFO ] Started ParaServer in 3.268 seconds (JVM running for 7.211)
2019-08-22 12:13:13 [INFO ] Created root app 'para', sharingTable = false, sharingIndex = false.
2019-08-22 12:13:53 [INFO ] Server is healthy.
But now I need to follow these steps:
# run setup and set endpoint to either 'http://localhost:8080' or 'https://paraio.com'
$ para-cli setup
$ para-cli new-app "myapp" --name "My App"
But running these on my cmd gives me a bash: para-cli: command not found error and running on the app's console doesn't do anything.
Can someone help?
v1.24.3 work great in embeded mode, but when using mongodb DAO, it doesn't work :
When connecting with linkedin, the connection fail and the para gives this error ;
[WARN ] Cookie rejected [lang="v=2&lang=en-us", version:1, domain:linkedin.com, path:/, expiry:null] Domain attribute "linkedin.com" violates RFC 2109: domain must start with a dot [WARN ] Cookie rejected [lang="v=2&lang=en-us", version:1, domain:linkedin.com, path:/, expiry:null] Domain attribute "linkedin.com" violates RFC 2109: domain must start with a dot 2017-05-14 00:57:56 [WARN ] Invalid cookie header: "Set-Cookie:
Very very strange.
Basic search give me 2 records:
$ curl -i -X GET
-H "Authorization: Bearer${access_token}"
http://127.0.0.1:8080/v1/search?q=type:mytest
HTTP/1.1 200 OK
Date: Tue, 13 Jun 2017 10:24:36 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Content-Length: 847
{
"totalHits" : 2,
"page" : 0,
"items" : [ {
"id" : "785445575716769792",
"timestamp" : 1497349402816,
"type" : "mytest",
"appid" : "mybaas",
"creatorid" : "782839067418038272",
"name" : "Salesforce 广州",
"votes" : 0,
"stored" : true,
"indexed" : false,
"cached" : true,
"objectURI" : "/mytests/785445575716769792",
"plural" : "mytests",
"billingStreet" : "广州"
}, {
"id" : "785445575716769793",
"timestamp" : 1497349402816,
"type" : "mytest",
"appid" : "mybaas",
"creatorid" : "782839067418038272",
"name" : "Salesforce 佛山",
"votes" : 0,
"stored" : true,
"indexed" : false,
"cached" : true,
"objectURI" : "/mytests/785445575716769793",
"plural" : "mytests",
"billingStreet" : "佛山"
} ]
}
But I search by name field which include 'Salesforce', no results:
$ curl -i -X GET
-H "Authorization: Bearer${access_token}"
"http://127.0.0.1:8080/v1/search/terms?terms=name:Salesforce"
HTTP/1.1 200 OK
Date: Tue, 13 Jun 2017 10:24:46 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Content-Length: 56
{
"totalHits" : 0,
"page" : 0,
"items" : [ ]
}
if i have data stored in the mysql, how can I config the para, then I can use the api to get the query results?
Hi guys,
I'm having difficulty logging in using password authentication with users I've created:
I created the user using a POST request to http://localhost:8080/v1/user with the data:
{
"email":"[email protected]",
"identifier":"[email protected]",
"password":"$2y$10$uaxFpt2jXScScYV0AEm1TeruIUuPjOAC.3F9GftRA5a0I3i/F5ai6",
"username":"testuser2"
}
I've also tried using a non-hashed password:
{
"email":"[email protected]",
"identifier":"[email protected]",
"password":"password",
"username":"testuser2"
}
Both the users were created fine,
However I can't authenticate using the form provided in the docs:
I've got to the point of running Para via the source code so that I can debug the PasswordAuthenticationFilter, and have found that the storedHash is coming back blank, hence the password's don't match.
I've also searched for the users in the REST API and Elasticsearch itself, but there's no stored hash anywhere....
{
"totalHits" : 2,
"page" : 0,
"items" : [ {
"id" : "795270796749574144",
"timestamp" : 1499691918054,
"type" : "user",
"appid" : "para",
"name" : "ParaObject 1499691917825",
"votes" : 0,
"stored" : true,
"indexed" : false,
"cached" : true,
"identifier" : "[email protected]",
"groups" : "users",
"active" : false,
"twoFA" : false,
"email" : "[email protected]",
"currency" : "EUR",
"picture" : "https://www.gravatar.com/avatar?d=mm&size=400",
"identityProvider" : "generic",
"plural" : "users",
"objectURI" : "/users/795270796749574144"
}, {
"id" : "795229488181940224",
"timestamp" : 1499682069324,
"type" : "user",
"appid" : "para",
"name" : "ParaObject 1499682069110",
"votes" : 0,
"stored" : true,
"indexed" : false,
"cached" : true,
"identifier" : "[email protected]",
"groups" : "users",
"active" : false,
"twoFA" : false,
"email" : "[email protected]",
"currency" : "EUR",
"picture" : "https://www.gravatar.com/avatar?d=mm&size=400",
"identityProvider" : "generic",
"plural" : "users",
"objectURI" : "/users/795229488181940224"
} ]
}
Any advice would be really good :)
Many thanks
I used SqlDAO to connect para to mysql. But i got a problem below:
Failed to create a new table for appid 'para' in the SQL database [Specified key was too long; max key length is 3072 bytes (Error Code: 1071, SQLState: 42000)]
It seems that is a limit by mysql, how can I solve this?
field 'content' in object type 'layout' is object type, and the other object type 'xxx' have field 'content' type is long:
2017-06-07 14:42:48,943 [WARN ] c.erudika.para.search.ElasticSearch - null
java.lang.IllegalArgumentException: [properties.content] is defined as an object in mapping [layout] but this name is already used for a field in other types
at org.elasticsearch.index.mapper.MapperService.checkFieldUniqueness(MapperService.java:510)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:376)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:320)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:306)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230)
at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:480)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:784)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
... suggestions are welcome
Hi , I am trying to connect para to mysql database. the server keeps prompting fail to read fields, do I need to create the tables in my mysql db first? If yes, where can I find the sql statements?
Great work for para, Thanks.
This fails:
λ docker pull erudikaltd/para
Using default tag: latest
Error response from daemon: manifest for erudikaltd/para:latest not found
Based on the tags published at https://hub.docker.com/r/erudikaltd/para/tags/ , this succeeds:
λ docker pull erudikaltd/para:v1.29.2
v1.29.2: Pulling from erudikaltd/para
Someone should publish an untagged / latest image for the sake of the documentation.
There is any log level to set? It's running on 8080 and scoold on 8000 but I cant access and there are no errors or log messages about the access.
After upgrading the deployment, I saw that the data has been lost. After trying to downgrade back to a 1.29.2 image, here are the logs that I see:
λ k logs -f para-5cf9696dcb-s98rd
____ ___ _ ____ ___ _
/ __ \/ __` / ___/ __` /
/ /_/ / /_/ / / / /_/ /
/ .___/\__,_/_/ \__,_/ v1.29.2
/_/
2018-11-07 21:30:39 [INFO ] --- Para.initialize() [production] ---
2018-11-07 21:30:39 [INFO ] Loaded new DAO, Search and Cache implementations - H2DAO, LuceneSearch and CaffeineCache.
2018-11-07 21:30:41 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:30:41 [WARN ] Server is unhealthy - root app not found. Open /v1/_setup in the browser to initialize Para.
2018-11-07 21:30:41 [INFO ] Instance #1 initialized.
2018-11-07 21:30:41 [INFO ] Starting ParaServer on para-5cf9696dcb-s98rd with PID 7 (/para/para-war-1.29.2.war started by root in /para)
2018-11-07 21:30:41 [INFO ] The following profiles are active: production
2018-11-07 21:30:42 [INFO ] Listening on port 8080...
2018-11-07 21:30:44 [INFO ] Started ParaServer in 3.206 seconds (JVM running for 6.351)
2018-11-07 21:31:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:32:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:33:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:34:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:35:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
2018-11-07 21:36:11 [WARN ] Couldn't get IndexReader - 'para-lucene' does not exist: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/para/data/para-lucene/segments_xq"))): 9 (needs to be between 6 and 8)
When I create CustomResourceHandler with relativePath = '/myprefix/usermgr/', then my handler got request from:
/v1/myprefix/usermgr
/v1/myprefix/usermgr/
/v1/myprefix/usermgr?queryString
But not sub-resource, e.g.
/v1/myprefix/usermgr/{type}
/v1/myprefix/usermgr/{type}/
/v1/myprefix/usermgr/{type}/{id}
/v1/myprefix/usermgr/{type}/{id}/
Para return 404, how can CustomResourceHandler works with sub-resource ?
I've been trying to set up Para on a test server and mapping it with Nginx and a reverse proxy, but neither Scoold nor para-cli can acces it on the public ip. Accessing it through localhost works fine however.
Endpoints like /v1/_setup
however work with the public ip. I've tried both Nginx and running it directly on an open port.
Config I'm using for Nginx:
server {
listen 32461 http2;
listen [::]:32461 http2;
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
}
Logs are not giving me anything informative either, any idea where I can start debugging?
how to run this project in idea
We are unable to log in to either para or scoold using github authentication. After granting privileges to the respective app on github, the process appears to simply time out, after which paraio.com shows the message "Authentication failed or was cancelled."
Is there anything obvious we're missing? Does this authentication work on your end?
Edit: We also experience this issue with Microsoft auth.
Hello,
My organization already provides an OAuth authorization service. However, I can't seem to see how to integrate Para with it - the doc says that OpenID is deprecated and to use OAuth instead, but then it only lists Facebook, Github etc.... but there is no entry for generic OAuth support.
Can you tell me if OAuth is supported ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.