AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-284224

jk - Reinstate Monica's questions

Martin Hope
jk - Reinstate Monica
Asked: 2022-05-20 06:36:09 +0800 CST

为什么 /etc/environment 在 Ubuntu 22.04 中不可执行?

  • -2

我遇到了这个问题,因为我想通过在 /etc/environment 的 PATH 末尾添加另一个目录来为所有用户扩展 PATH 变量。

打开一个新的 shell 和一个新的登录都没有显示扩展的 PATH。

我发现 /etc/environment 上的保护设置为

-rw-r--r-- 1 root root 588 May 13 12:08 /etc/environment

将 /etc/environment 设置为可执行为我解决了这个问题。

22.04
  • 1 个回答
  • 520 Views
Martin Hope
jk - Reinstate Monica
Asked: 2020-10-01 08:21:53 +0800 CST

Tomcat8:在哪里可以找到合适的容器日志文件?

  • 0

我正在尝试在 Tomcat8 下安装 webapp 并在文件中收到错误消息catalina.2020-30-09.log:

org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

我在哪里可以找到“适当的容器日志文件”?里面没有这样的东西/var/log/tomcat8,我不知道这个文件可以放在哪里。我知道失败的 webapp 的名称。

PS这个问题是关于相同的错误消息,但在这种特殊情况下,相关的错误消息在catalina.out文件中。

就我而言,消息之间没有错误消息或其他日志行

org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor

以及上面引用的错误消息。

tomcat webapps 16.04
  • 1 个回答
  • 2762 Views
Martin Hope
jk - Reinstate Monica
Asked: 2019-04-27 07:27:00 +0800 CST

是否有某种 Ubuntu 升级会导致这种行为?

  • 1

背景:我在 Ubuntu 18.04 LTS 下的 Apache2 网络服务器上运行 cqpweb,这是一个用 PHP 编写并连接到 mysql 数据库的语料库查询接口。Ubuntu 服务器是从头开始设置的,目前没有手动配置 mysql 或 php。

cqpweb 运行愉快,除非它开始抛出如下错误消息:

 A MySQL query did not run successfully!

 Original query: LOAD DATA LOCAL INFILE '/data2/cqpweb/cach/tab_dist_fycel9oplk' INTO TABLE `db_dist_g2f3ndxf40` FIELDS ESCAPED BY '' /* from User: knappen |
 Function: create_db() | 2019-Apr-25 11:23:01 */

 Error # 0:

这发生在一夜之间。类似的查询肯定在 4 月 24 日 17:55(当地时间,柏林时区)有效,并且在错误消息中给出的时间被破坏。

问题:是否有某种自动更新或升级会导致这种行为。

附加信息:

php --version
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )

mysql --version
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper

检查一些相关的日志文件:

/var/log/dkpg.log: 2019-04-24 14:47:54 和 2019-04-26 06:26:23 之间没有条目

/var/log/apt/history.log: 2019-04-24 14:47:54 和 2019-04-26 06:26:23 之间没有条目

/var/log/unattended-upgrades/unattended-upgrades.log:

2019-04-25 06:24:53,776 INFO Initial blacklisted packages: 
2019-04-25 06:24:53,778 INFO Initial whitelisted packages: 
2019-04-25 06:24:53,778 INFO Starting unattended upgrades script
2019-04-25 06:24:53,778 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
2019-04-25 06:24:57,138 INFO No packages found that can be upgraded unattended and no pending auto-removals

更多发现:

表格 /var/log/apache2/error.log:

[Thu Apr 25 06:25:03.544172 2019] [mpm_prefork:notice] [pid 1244] AH00171: Graceful restart requested, doing restart

此重新启动是由于执行脚本的 cron 作业所致/etc/cron.daily/apache2。因此,可能存在影响 apache2 安装的更改,但在关键时间间隔内在一夜之间变得活跃。

相关问题,不包括大小限制等其他潜在原因:Ubuntu 18.04 上 mysql 的大小限制是什么,如何增加它们?

编辑:由于每天都有重启 Apache2 的 cron 作业,因此以下是history.log2019-04-24 06:25:00 和 2019-04-25 06:25:00 之间的一些更改

Start-Date: 2019-04-24  06:52:06
Commandline: /usr/bin/unattended-upgrade
Upgrade: distro-info-data:amd64 (0.37ubuntu0.3, 0.37ubuntu0.4)
End-Date: 2019-04-24  06:52:07

Start-Date: 2019-04-24  14:46:57
Commandline: apt-get upgrade
Requested-By: knappen (1000)
Upgrade: php7.2-common:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), php7.2-cli:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), ureadahead:amd64 (0.100.0-20, 0.100.0-21), linux-libc-dev:amd64 (4.15.0-47.50, 4.15.0-48.51), libsystemd0:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), php7.2-mysql:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), language-selector-common:amd64 (0.188.1, 0.188.2), udev:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), plymouth-theme-ubuntu-text:amd64 (0.9.3-1ubuntu7.18.04.1, 0.9.3-1ubuntu7.18.04.2), php7.2-json:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), php7.2-opcache:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), linux-signed-generic:amd64 (4.15.0.47.49, 4.15.0.48.50), libudev1:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), libplymouth4:amd64 (0.9.3-1ubuntu7.18.04.1, 0.9.3-1ubuntu7.18.04.2), python3-distupgrade:amd64 (1:18.04.30, 1:18.04.31), ubuntu-release-upgrader-core:amd64 (1:18.04.30, 1:18.04.31), systemd-sysv:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), php7.2-readline:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1), libpam-systemd:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), systemd:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), libnss-systemd:amd64 (237-3ubuntu10.20, 237-3ubuntu10.21), plymouth:amd64 (0.9.3-1ubuntu7.18.04.1, 0.9.3-1ubuntu7.18.04.2), libapache2-mod-php7.2:amd64 (7.2.15-0ubuntu0.18.04.2, 7.2.17-0ubuntu0.18.04.1)
End-Date: 2019-04-24  14:47:54
server php mysql apache2 18.04
  • 1 个回答
  • 266 Views
Martin Hope
jk - Reinstate Monica
Asked: 2019-04-27 01:59:45 +0800 CST

Ubuntu 18.04 上 mysql 的大小限制是多少,如何增加它们?

  • 0

背景:我在 Ubuntu 18.04 LTS 下的 Apache2 网络服务器上运行 cqpweb,这是一个用 PHP 编写并连接到 mysql 数据库的语料库查询接口。Ubuntu 服务器是从头开始设置的,目前没有手动配置 mysql 或 php。

cqpweb 运行愉快,除非它开始抛出如下错误消息:

 A MySQL query did not run successfully!

 Original query: LOAD DATA LOCAL INFILE '/data2/cqpweb/cach/tab_dist_fycel9oplk' INTO TABLE `db_dist_g2f3ndxf40` FIELDS ESCAPED BY '' /* from User: knappen |
 Function: create_db() | 2019-Apr-25 11:23:01 */

 Error # 0:

这发生在一夜之间,系统没有发生更新或其他更改。因此,我怀疑已达到数据库的某些大小限制,我将不得不增加它。

问题: mysql 数据库的大小限制是什么,如何增加它们?

附加信息:

php --version
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )

mysql --version
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper

mysql的大小:

root@corpora:/var/lib/mysql# du -h ./
23M        ./mysql
676K        ./sys
16G        ./cqpweb
1.1M        ./performance_schema
16G        ./

错误日志: 中没有相关消息/var/log/mysql/error.log。

从 mysql 提示符(在与 cqpweb 相同的数据库用户下)手动运行数据库查询成功(令我大吃一惊)。

编辑:原始磁盘空间不是问题——设备​​上有足够的空间。

EDIT2:我尝试了基本问题的蛮力方法,使用备份数据库中的数据mysqldump,销毁数据库,重新安装mysql-server,从转储中恢复数据库;将大小从16G减小到11G,但原来的问题依然存在。

server php mysql apache2 18.04
  • 1 个回答
  • 2148 Views
Martin Hope
jk - Reinstate Monica
Asked: 2019-03-19 09:51:49 +0800 CST

在 Ubuntu 18.04 上安装 apache2,启动它,它回答来自本地主机的请求,但不是来自外部

  • 0

我已经用 apache2 从头开始​​在 Ubuntu 18.04 下建立了一个服务器。我配置了 apache2 并且能够启动它。

我可以确认它正在运行

prompt:~$ apachectl status
              Apache Server Status for localhost (via ::1)

Server Version: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.0g
Server MPM: prefork
Server Built: 2018-10-10T18:59:25
  __________________________________________________________________

Current Time: Monday, 18-Mar-2019 18:42:58 CET
Restart Time: Monday, 18-Mar-2019 16:13:58 CET
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 2 hours 28 minutes 59 seconds
Server load: 0.00 0.00 0.00
Total accesses: 3 - Total Traffic: 22 kB
CPU Usage: u0 s0 cu0 cs0
.000336 requests/sec - 2 B/second - 7.3 kB/request
1 requests currently being processed, 5 idle workers

____W_..........................................................
................................................................
......................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process

我可以在本地访问它

 prompt:~$ wget localhost
 --2019-03-18 18:45:31--  http://localhost/
 Resolving localhost (localhost)... ::1, 127.0.0.1
 Connecting to localhost (localhost)|::1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 10918 (11K) [text/html]
 Saving to: ‘index.html’

 index.html          100%[===================>]  10.66K  --.-KB/s    in 0s      

 2019-03-18 18:45:31 (139 MB/s) - ‘index.html’ saved [10918/10918]

但我无法从外面到达它。任何来自外部的连接都会超时,不会立即被拒绝,也不会因为“网络不可达”而失败。来自外部的尝试访问既未登录/var/log/apache2/access.log也未登录/var/log/apache2/error.log。这种行为的原因可能是什么,我该如何解决?

编辑:网络上的更多信息:服务器放置在大学网络中,并且应该通过防火墙配置对网络范围的公众可见。我尝试使用firefox并wget获得相同的结果来访问它。我尝试了“近邻”和外部计算机。

EDIT2:输出来自nmap:

 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-18 19:16 CET
 Nmap scan report for localhost (127.0.0.1)
 Host is up (0.00021s latency).
 Other addresses for localhost (not scanned): ::1
 rDNS record for 127.0.0.1: localhost.localdomain
 Not shown: 992 closed ports
 PORT     STATE SERVICE
 22/tcp   open  ssh
 25/tcp   open  smtp
 80/tcp   open  http
 443/tcp  open  https
 587/tcp  open  submission
 3306/tcp open  mysql
 7937/tcp open  nsrexecd
 7938/tcp open  lgtomapper

Nmap 完成:在 0.13 秒内扫描 1 个 IP 地址(1 个主机启动)

networking server apache2 18.04
  • 1 个回答
  • 1430 Views
Martin Hope
jk - Reinstate Monica
Asked: 2018-09-14 07:03:14 +0800 CST

evince 的主题解析错误

  • 3

我安装了 Ubuntu 18.04。每次我使用 evince 查看 pdf 文件时,我的终端上都会出现以下错误:

主题解析错误:gtk-main.css:73:38:导入失败:打开文件 /usr/share/themes/Radiance/gtk-3.20/apps/gnome-builder.css 时出错:没有这样的文件或目录

该错误没有明显的负面后果,只是在终端上一直看到错误消息很烦人。

是否有提供缺失主题的软件包?或者我怎样才能摆脱这个错误?

PS我发现有一个名为的可安装包gnome-builder,但安装它sudo apt-get install gnome-builder并没有提供丢失的.css文件。

themes gtk evince 18.04
  • 1 个回答
  • 2192 Views
Martin Hope
jk - Reinstate Monica
Asked: 2018-08-26 11:03:43 +0800 CST

从 16.04 LTS 升级到 18.04 LTS 失败后,我的系统现在是否处于一致状态?

  • 2

我在星期四将我的系统从 16.04 LTS 更新到 18.04 LTS,但由于此问题中描述的 libmutter-2-0 中的依赖项不匹配,升级失败。它处于仅控制台登录有效的状态。

第二天,libmutter 的更新可用,我安装了它

 sudo apt install libmutter-2-0 --reinstall

然后我安装了ubuntu桌面

 sudo apt install ubuntu-desktop

现在我有一个看似工作的系统,但它是否已经处于一致状态?或者是否需要采取其他步骤才能使其进入一致状态?

编辑:sudo apt update和的输出sudo apt upgrade:

 sudo apt update
 Hit:1 http://de.archive.ubuntu.com/ubuntu bionic InRelease
 Hit:2 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease             
 Hit:3 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease           
 Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB]    
 Fetched 83,2 kB in 1s (107 kB/s)                                               
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 1 package can be upgraded. Run 'apt list --upgradable' to see it.

 sudo apt upgrade
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Calculating upgrade... Done
 The following packages have been kept back:
   gimp-gmic
 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
upgrade 16.04 18.04
  • 1 个回答
  • 242 Views
Martin Hope
jk - Reinstate Monica
Asked: 2018-04-13 04:57:39 +0800 CST

cqpweb 触发错误“数据库缓存过载!”

  • 1

cqpweb 是一个使用 php 编程并使用 mysql 数据库的语料库的 Web 界面。我们在我们的服务器上成功地运行了它(并且在相当长的时间内没有改变),但是在过去一周左右的时间里,一些数据库查询开始一直失败。

我们运行 ubuntu 14.04 LTS 并使用apt-get upgrade. 否则,我们没有更改系统配置。我检查了磁盘空间没有问题。

当前版本的程序:

php --version PHP 5.5.9-1ubuntu4.24 (cli) (built: Mar 16 2018 12:41:43) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies 与 Zend OPcache v7.0.3,版权所有 (c) 1999-2014,由 Zend Technologies 提供

mysql --version mysql Ver 14.14 Distrib 5.5.59,适用于使用 readline 6.3 的 debian-linux-gnu (x86_64)

什么会导致数据库缓存过载,我该如何解决?Rebboting 服务器没有帮助。

php mysql lamp 14.04
  • 1 个回答
  • 87 Views
Martin Hope
jk - Reinstate Monica
Asked: 2016-11-11 03:04:18 +0800 CST

使用 GUI 登录显示控制台消息

  • 5

当我登录 Ubuntu 系统时,我会收到一条信息性消息,如下所示:

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-34-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Thu Nov 10 11:17:53 CET 2016

  System load:  0.0                 Processes:           128
  Usage of /:   75.1% of 680.78GB   Users logged in:     1
  Memory usage: 37%                 IP address for eth0: xxx.xxx.xxx.xxx
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

37 packages can be updated.
24 updates are security updates.

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Your Hardware Enablement Stack (HWE) is supported until April 2019.

当我通过 GUI 登录系统并打开腻子终端时,我没有收到这些消息。有没有办法在登录后自动显示它们(例如,在 GUI 上弹出的特殊窗口中)?

编辑:代码应该能够处理德语。测试 Serg 的代码我收到以下错误消息:

E: Unbekannter Fehler: \xbb<class 'UnicodeEncodeError'>\xab ('ascii' 
codec can't encode character '\xf6' in position 20: ordinal not in 
range(128))Traceback (most recent call last):
  File "./greeter_window.py", line 92, in <module>
    win = GreeterWindow()
  File "./greeter_window.py", line 29, in __init__
    lines.append('\n\n' + self.get_updates())
  File "./greeter_window.py", line 41, in get_updates
    return self.run_cmd(cmd).decode().strip()
AttributeError: 'NoneType' object has no attribute 'decode'

显然是由德语单词“können”中的字母“ö”引起的。

login
  • 1 个回答
  • 1204 Views
Martin Hope
jk - Reinstate Monica
Asked: 2015-01-17 00:42:00 +0800 CST

Ubuntu 14.04 LTS 上的 Firefox 35.0 即使不调用任何 Web 位置也会将 cookie 设置为 google.com

  • 1

我最近更新了我的 Ubuntu 14.04 并获得了一个新的 firefox(版本 35.0)。我配置了一个空的起始页,我的默认搜索引擎配置为 duckduckgo。

但是:自更新以来,我得到了一个名为“PREF”的 google.com cookie。当我删除那个 cookie,关闭 firefox,然后再次打开 firefox 时,cookie 又回来了。

这个cookie是从哪里来的?如何避免设置此 cookie?

编辑:

我做了一个小实验:当我在启动 Firefox 的过程中切断网络连接时,没有设置 Google cookie。所以真正的问题是:为什么 Firefox 35.0 在我没有要求的情况下与 Google 联系?

firefox
  • 1 个回答
  • 369 Views
Martin Hope
jk - Reinstate Monica
Asked: 2014-11-12 07:20:56 +0800 CST

显示器省电后系统死机

  • 1

我有一台运行 Ubuntu 14.04 LTS 的 Lenovo ThinkPad,通过显示端口连接的 DELL U2414H 作为辅助显示器。当显示器进入省电模式并尝试将其唤醒时,出现以下症状:

* The primary display wakes up and displays the background screen with an Ubuntu logo
* The secondary display stays black
* Entering my password to unlock screen achieves nothing
* Trying CTRL-ALT-F1 (etc.) achieves nothing
* Only reboot helps

换副屏后出现的现象,之前的副屏,通过VGA连接的富士通显示器,没有这方面的问题。

当我打算从屏幕工作中休息时,我可以通过关闭辅助屏幕来缓解这个问题。这会将窗口推送到主屏幕,当我恢复屏幕工作时,我可以再次将它们拉到辅助屏幕上。不幸的是,这种缓解措施在意外中断的情况下会失败。

我进行了一些谷歌搜索和搜索,但没有找到解决问题的方法。我在文件 .xsession.errors 中收到错误消息:

openConnection: connect: Datei oder Verzeichnis nicht gefunden
cannot connect to brltty at :0
Skript für ibus unter run_im gestartet.
Skript für auto unter run_im gestartet.
Skript für default unter run_im gestartet.

我该怎么做才能避免这种不良行为?

14.04
  • 1 个回答
  • 1404 Views
Martin Hope
jk - Reinstate Monica
Asked: 2014-09-24 01:04:46 +0800 CST

Ubuntu 12.04 LTS 上的 python-nltk:nltk.download('brown') 导致 HTML 错误 401

  • 9

我已经使用 apt-get 在 Ubuntu Server 12.04 上安装了 python-nltk。

但是当我尝试下载语料库时,出现以下错误:

$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>> nltk.download('brown')
[nltk_data] Error loading brown: HTTP Error 401: Authorization
[nltk_data]     Required
False

我是否缺少某些配置或附加包?

12.04
  • 3 个回答
  • 9259 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve