草庐IT

Elasticsearch踩坑:received plaintext http traffic on an https channel, closing connection Netty4HttpCh

踩坑:当我们访问ip+9200验证是否启动成功时报错receivedplaintexthttptrafficonanhttpschannel,closingconnectionNetty4HttpChannel{localAddress=/172.16.5.10:9200,remoteAddress=/172.16.11.68:11111}如图:原因:Elasticsearch开启了安全认证解决:在config/目录下面的elasticsearch.yml配置文件,把安全认证开关从原先的true改成false,实现免密登录访问即可,修改如图:

android - Dagger 2 对于 Android "cannot be provided without an @Provides-annotated method"

我正在尝试为Android使用最新版本的Dagger2V2.11这是我的代码:应用组件:@Singleton@Component(modules={AndroidInjectionModule.class,AppModule.class,ActivityBuildersModule.class,FragmentBuildersModule.class})publicinterfaceAppComponent{voidinject(MyApplicationmyApplication);@Component.BuilderinterfaceBuilder{@BindsInstanceBu

error An unexpected error occurred: “https://registry.npmmirror.com/moment: tunneling socket could n

yarninstall的时候报了错误errorAnunexpectederroroccurred:"https://registry.npmmirror.com/moment:tunnelingsocketcouldnotbeestablished,cause=sockethangup".解决方法查看镜像npmconfiggetregistry//查看yarnconfiggetregistry//https://registry.npm.taobao.org/切换淘宝镜像npmconfigsetregistryhttps://registry.npm.taobao.orgyarnconfigs

nginx warn an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/ while r

 1.遇到的问题 同事反馈请求到nginx有如下的的错误,log内容如下:anupstreamresponseisbufferedtoatemporaryfile/var/cache/nginx/proxy_temp/0/52/0002923520whilereadingupstream从这条error日志来看是nginx某一块的buffer设置的太小,而response(包含responseheader和responsebody)导致response结果不得不临时写到文件中。2.解决办法可以location下修改的配置参数client_header_buffer_size128k;clien

java - 使用简单 Facebook API 登录时出现异常( session : an attempt was made to open a session that has a pending request)

我正在使用适用于Android的简单FacebookAPI,但我在这里遇到了一个问题。我正在使用他们网站上的代码登录https://github.com/sromku/android-simple-facebook并获取个人资料信息。它有效。当我点击我的“登录”按钮时,它会显示Facebook登录页面,然后在登录后它会进入授权并返回我的应用程序并且它可以工作。但是,如果我单击登录,然后关闭随Facebook登录页面打开的登录对话框,并尝试再次登录,我会收到此异常:ERROR/Facebook(17472):Badthinghappenedjava.lang.UnsupportedOpe

安卓工作室 : Error: SplashActivity is not an Activity subclass or alias

我有一个包含所有功能和一些Activity的库项目,还有一个只有一个JSON配置字符串和一些样式的包装器Activity。我将库导入包装器项目,在包装器项目中我将库的Activity之一设置为启动Activity,但随后收到错误消息,指出从库中选择的Activity不是Activity子类或别名.这是什么意思,我可以更正吗?应该启动的Activity:packagedk.borgertip.activity;importandroid.app.Activity;importandroid.content.Intent;importandroid.os.Bundle;importandr

android - 中止消息 : 'couldn' t find an OpenGL ES implementation'

我正在尝试在我的设备上运行Lollipop,当我闪现我得到的图像时,我得到了以下日志---------beginningofcrashF/libc(1565):Fatalsignal6(SIGABRT),code-6intid1565(surfaceflinger)I/DEBUG(1572):************************************************I/DEBUG(1572):Buildfingerprint:'Android/full_arndale/arndale:5.0.2/LRX22G/veera05211114:eng/test-keys

android - Eclipse ADT 插件 : An error occurred while collecting items to be installed

Anerroroccurredwhilecollectingitemstobeinstalledsessioncontextwas:(profile=SDKProfile,phase=org.eclipse.equinox.internal.p2.engine.phases.Collect,operand=,action=).Unabletoreadrepositoryathttps://dl-ssl.google.com/android/eclipse/plugins/com.android.ide.eclipse.adt_18.0.0.v201203301601-306762.ja

android - Dagger 2 错误 : dependency “cannot be provided without an @Inject constructor”

我正在尝试在我的Android项目中使用Dagger2。对于初学者,我想使用两个组件分别负责注入(inject)应用程序范围和Activity范围的依赖项。作为基本引用,除其他外,我使用了thisanswer.因此有两种不同的方式来设置组件之间的关系:使用@Subcomponent注释和使用dependencies参数。如果我选择第一个,我的AppContextComponent工作正常。但是,一旦我尝试从ActivityContextComponent注入(inject)依赖项,我就会收到此构建时错误:Error:com.example.ui.activity.MainActivit

安卓 ListView : how to select an item?

我在使用我创建的ListView时遇到了问题:我希望在单击某个项目时选中它。我的代码如下:protectedvoidonResume(){...ListViewlv=getListView();lv.setOnItemSelectedListener(newOnItemSelectedListener(){publicvoidonItemSelected(AdapterViewadapterView,Viewview,intpos,longid){Log.v(TAG,"onItemSelected(...,"+pos+",...)=>selected:"+getSelectedItem