无法启动SOLR服务(Not able to start SOLR service)
我在LINUX环境中安装了solr服务。 现在尝试使用以下命令启动服务
service solr start
执行此命令后,从服务器收到以下错误
Waiting to see Solr listening on port 8080 [-] Still not seeing Solr listening on 8080 after 30 seconds! tail: cannot open `/var/solr/logs/solr.log' for reading: No such file or directory
我手动创建了solr.log文件并将其放在上面提到的路径下,但是很快,我发出命令“service solr start”。 solr.log文件将被重命名,并且不会使用solr.log创建任何新文件。 因此服务无法启动。 谁能让我知道如何解决这个问题。
提前致谢。
I have installed the solr service on a LINUX environment. Now trying to start the service using the below command
service solr start
After executing this command, am getting below error from the server
Waiting to see Solr listening on port 8080 [-] Still not seeing Solr listening on 8080 after 30 seconds! tail: cannot open `/var/solr/logs/solr.log' for reading: No such file or directory
I created the solr.log file manually and placed it under the above mentioned path, But as soon, i issue the command "service solr start" . The solr.log file will be renamed and there won't be any new file created with the solr.log. hence the service fails to start. Could anyone let me know how to tackle this issue.
Thanks in advance.
原文:https://stackoverflow.com/questions/35332349
最满意答案
您可以使用
WebApi
让任何第三方访问您的应用程序。WebApi
作为终点。 这是基本的示例/语法。// GET /api/customers public IHttpActionResult GetCustomers() { var customerDtos = _context.Customers .Include(c => c.MembershipType) .ToList() .Select(Mapper.Map<Customer, CustomerDto>); return Ok(customerDtos); }
对于POST
// POST /api/customers [HttpPost] public IHttpActionResult CreateCustomer(CustomerDto customerDto) { if (!ModelState.IsValid) return BadRequest(); var customer = Mapper.Map<CustomerDto, Customer>(customerDto); _context.Customers.Add(customer); _context.SaveChanges(); customerDto.Id = customer.Id; return Created(new Uri(Request.RequestUri + "/" + customer.Id), customerDto); }
为了检查您的api终端是否正常工作,您可以下载
Chrome Extension "ARC" - Advanced Rest Client
。 使用它,您可以test
API端点及其输出。 您不需要第三方完整的应用程序来测试终点。You can use
WebApi
for any third party to get access to your application.WebApi
works as an end point. Here is the basic sample/syntax.// GET /api/customers public IHttpActionResult GetCustomers() { var customerDtos = _context.Customers .Include(c => c.MembershipType) .ToList() .Select(Mapper.Map<Customer, CustomerDto>); return Ok(customerDtos); }
For POST
// POST /api/customers [HttpPost] public IHttpActionResult CreateCustomer(CustomerDto customerDto) { if (!ModelState.IsValid) return BadRequest(); var customer = Mapper.Map<CustomerDto, Customer>(customerDto); _context.Customers.Add(customer); _context.SaveChanges(); customerDto.Id = customer.Id; return Created(new Uri(Request.RequestUri + "/" + customer.Id), customerDto); }
In order to check if your api end point is working properly, You can download
Chrome Extension "ARC" - Advanced Rest Client
. Using this you cantest
the API end point and it's output. You do no need a third party full fledged app to test the end point.
相关问答
更多-
如果我们正在谈论微软平台,那么我总是会开发一个单独的Windows服务来处理这样的批处理任务。 您可以始终引用您的Web应用程序正在使用的相同程序集,以避免任何恶意代码重复。 If we're talking Microsoft platform, then I'd always develop a separate Windows Service to handle such batch tasks. You can always reference the same assemblies that ar ...
-
总结: 如果要传输非ASCII(或高位ASCII)字符(如£),则需要指定WebClient的编码属性。 在这种情况下,设置属性值的顺序并不重要,只要在调用UploadString之前设置它。 using (WebClient wc = new WebClient()) { var data = JsonConvert.SerializeObject(cr); string url = scanningurl + "Home/CreateResource"; Uri uri = ne ...
-
您可以将ID作为整数与“令牌”一起传递,该“令牌”将是购物车ID和随机密码字符串的(加密强)散列。 支付处理器将知道该秘密,因此它可以执行散列本身并进行比较以查看它是否有效。 例如,您可以使用以下(未经测试的)代码来创建令牌: public static string GenerateHash(long CartID) { string SourceText = CartID.ToString(); //Salt the source text (secret) SourceText ...
-
如何将参数从Web请求传递到spring boot yarn应用程序(how to pass parameters from web requests to spring boot yarn application)[2021-12-04]
最初的想法是防止“流氓”用户或应用程序传递属性,然后这些属性会自动结束在命令行选项中,从而可能在hadoop群集中造成伤害。 如果这是您想要的,那么在Spring Boot Yarn中检查我的答案是值得的- 传递命令行参数 。 话虽如此,你并不是第一个提出这个问题或“抱怨”这样做太难或不清楚的人。 我们将在未来的版本中更容易实现这一点,主要是因为它似乎只是用户想要做的事情。 Original idea was to prevent "rogue" users or applications to pass ... -
如果应用程序位于同一服务器上,则可以按照本文进行操作 。 基本上,您必须为两个应用程序设置相同的(cookie),并设置会话路径。 您还可以将会话保存到数据库表( 请参阅Larry Ullman的文章)作为替代方案。 If the applications are on the same server, you can follow this article. Basiclly you have to set the same (cookie) for both applications, and set ...
-
来自jsp中web.xml的Java Web应用程序全局参数(Java web application global parameters from web.xml in jsp)[2020-02-16]
上下文范围的初始化参数是${initParam}可用的Map 。 所以: ${initParam.htmlRootPath} 也可以看看: Java EE 5教程 - EL中的隐式对象 Context-wide initialization parameters are as a Map available by ${initParam}. So: ${initParam.htmlRootPath} See also: Java EE 5 t ... -
我使用NSWorkspace启动应用程序,并使用NSDistributedNotificationCenter传递数据。 这显然还没有完全发展,但它确实有效。 来自文档的一个警告 - 我使用参数发送的字典(在此示例中只是一个字符串)不能在沙盒应用程序中使用(字典必须为nil)。 这是在打开其他应用的应用中: - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { ws = [NSWorkspace sharedWorks ...
-
您在Windows身份验证模式下的问题与这些问题基本相似: 写入事件日志时发生System.Security.SecurityException System.Security.SecurityException:找不到源,但无法搜索部分或全部事件日志。 无法访问的日志:安全。 该异常意味着您的Web应用程序尝试使用给予“source”的值在事件日志上写入,该值由于相应帐户的不完整权限而尚未注册。 使用Windows身份验证模式执行事件日志任务时,需要在eventlog\Security密钥上为NETWOR ...
-
您可以使用WebApi让任何第三方访问您的应用程序。 WebApi作为终点。 这是基本的示例/语法。 // GET /api/customers public IHttpActionResult GetCustomers() { var customerDtos = _context.Customers .Include(c => c.MembershipType) .ToList() .Select( ...
-
我认为问题在于您的CloudService部署项目的映像中包含第二个角色。 删除该角色。 您的项目通过
标记上的physicalDirectory属性包含在内。 I think the problem is that you've got a second role included in your image of your CloudService deployment project. Remove that role. your project is included via the ph ...