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-104202

Roman Newaza's questions

Martin Hope
Roman Newaza
Asked: 2020-06-23 05:41:34 +0800 CST

安装 Fpart 时 Ubuntu 正在设置 MySQL

  • 1

我正在尝试安装 fpart,但出现 mysql 错误:

# apt install fpart
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-aws-headers-4.4.0-1090 linux-aws-headers-4.4.0-1092 linux-aws-headers-4.4.0-1094 linux-aws-headers-4.4.0-1095 linux-aws-headers-4.4.0-1096 linux-aws-headers-4.4.0-1098
  linux-aws-headers-4.4.0-1100 linux-aws-headers-4.4.0-1101 linux-aws-headers-4.4.0-1102 linux-aws-headers-4.4.0-1104 linux-aws-headers-4.4.0-1105 linux-aws-headers-4.4.0-1106
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  fpart
0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
2 not fully installed or removed.
Need to get 36.2 kB of archives.
After this operation, 119 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 fpart amd64 0.9.2-1 [36.2 kB]
Fetched 36.2 kB in 0s (318 kB/s) 
Selecting previously unselected package fpart.
(Reading database ... 358221 files and directories currently installed.)
Preparing to unpack .../fpart_0.9.2-1_amd64.deb ...
Unpacking fpart (0.9.2-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up fpart (0.9.2-1) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

显然,列表中没有mysql这样的依赖:

# apt depends fpart
fpart
  Depends: libc6 (>= 2.4)
  Depends: rsync (>= 3.1.1)
  Depends: sudo (>= 1.8.12)

这种行为的原因可能是什么?也许有未完成的 MySQL 安装?

# apt list --installed | grep -i mysql
dbconfig-mysql/xenial,now 2.0.4ubuntu1 all [installed,automatic]
mysql-client/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-client-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-client-core-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-common/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-server/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 all [installed]
mysql-server-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
mysql-server-core-5.7/xenial-updates,xenial-security,now 5.7.30-0ubuntu0.16.04.1 amd64 [installed,automatic]
php-mysql/xenial-updates,now 1:7.0+35ubuntu6.1 all [installed]
php7.0-mysql/xenial-updates,xenial-security,now 7.0.33-0ubuntu0.16.04.15 amd64 [installed,automatic]

所以# ps aux | grep -i mysql | grep -v grepMySQL 没有运行

ubuntu packages apt
  • 1 个回答
  • 119 Views
Martin Hope
Roman Newaza
Asked: 2019-11-28 01:52:16 +0800 CST

在单个 VPC 中运行多个应用程序

  • 1

在单个VPC中运行多个应用程序是否可以?当然,我可能会通过子网将它们分开。我这样想的原因是每个 pegion 的VPC数量限制为 5 个(我可以增加到 100 个)并且 VPCs 之间的流量不是免费的。从另一个角度来看,它带来了复杂性,如果一堆独立的资源驻留在一个VPC中,很容易出错。也许最好使用AWS Organizations创建独立账户并拆分在 App 和VPC之间具有一对一关系的所有内容?

amazon-web-services
  • 2 个回答
  • 736 Views
Martin Hope
Roman Newaza
Asked: 2013-03-14 21:11:58 +0800 CST

重启后 Node.js 服务器未启动

  • 1

我的 Node.js 服务器 upstart 作业配置:

start on (net-device-up and runlevel [2345] and started td-agent)
stop on runlevel [016]

respawn

env HOME="/var/nodes"

script
    chdir $HOME
    exec /usr/local/bin/node index.js -c app/config/live >> /var/log/node/server.log 2>> /var/log/node/server_error.log
end script

当我跑步时:

initctl check-config node

我懂了:

node
  start on: unknown job td-agent

当服务器启动时,节点已关闭,但我可以手动启动它:

service node start
node start/running, process 1156

编辑:如果我删除and started td-agent,它会在启动时启动。但是我需要在 td-agent 之后启动 Node。我该如何解决这个问题?

linux
  • 1 个回答
  • 534 Views
Martin Hope
Roman Newaza
Asked: 2013-01-10 03:10:57 +0800 CST

安装的 NFS 设备上“设备上没有剩余空间”

  • 2

在 NFS 服务器上:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvdf2           103212320  85090308  12879132  87% /export18

在客户端服务器上:

ip-xxxxxxxx.ap-northeast-1.compute.internal:/export18
                 103212320  85090304  12879136  87% /export18

但是,如果我尝试创建文件,则会收到以下消息:

touch: cannot touch `/export18/test': No space left on device

我已卸载卷并在其上运行 fsck:

fsck -t ext3 /dev/xvdf2
fsck from util-linux-ng 2.17.2
e2fsck 1.41.14 (22-Dec-2010)
/dev/xvdf2 has gone 484 days without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/xvdf2: 6553600/6553600 files (4.8% non-contiguous), 21683897/26214400 blocks

也许 4.8% for non-contiguous 有点高,但是……还是写不出来。

问题:如果只使用%87,无法写入卷的原因可能是什么?

编辑:

Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/xvdf2           6553600 6553600       0  100% /export18
linux
  • 1 个回答
  • 6007 Views
Martin Hope
Roman Newaza
Asked: 2012-10-25 19:36:59 +0800 CST

Gluster bricks 离线并且日志中有错误

  • 4

我用我的 shell 脚本在 /var/lib/glusterd 中用主机名替换了所有 IP 地址并重命名了配置(IP 到主机名)。之后我重新启动了 Gluster 守护进程和卷。然后我检查是否所有对等点都已连接:

root@GlusterNode1a:~# gluster peer status
Number of Peers: 3

Hostname: gluster-1b
Uuid: 47f469e2-907a-4518-b6a4-f44878761fd2
State: Peer in Cluster (Connected)

Hostname: gluster-2b
Uuid: dc3a3ff7-9e30-44ac-9d15-00f9dab4d8b9
State: Peer in Cluster (Connected)

Hostname: gluster-2a
Uuid: 72405811-15a0-456b-86bb-1589058ff89b
State: Peer in Cluster (Connected)

当我执行df命令时,我可以看到所有节点上安装的卷大小发生变化,因此新数据即将到来。但最近我注意到应用程序日志中的错误消息:

copy(/storage/152627/dat): failed to open stream: Structure needs cleaning
readfile(/storage/1438227/dat): failed to open stream: Input/output error
unlink(/storage/189457/23/dat): No such file or directory

最后,我发现有些砖是离线的:

root@GlusterNode1a:~# gluster volume status
Status of volume: storage
Gluster process            Port  Online  Pid
------------------------------------------------------------------------------
Brick gluster-1a:/storage/1a    24009  Y  1326
Brick gluster-1b:/storage/1b    24009  N  N/A
Brick gluster-2a:/storage/2a    24009  N  N/A
Brick gluster-2b:/storage/2b    24009  N  N/A
Brick gluster-1a:/storage/3a    24011  Y  1332
Brick gluster-1b:/storage/3b    24011  N  N/A
Brick gluster-2a:/storage/4a    24011  N  N/A
Brick gluster-2b:/storage/4b    24011  N  N/A
NFS Server on localhost          38467  Y  24670
Self-heal Daemon on localhost        N/A  Y  24676
NFS Server on gluster-2b      38467  Y  4339
Self-heal Daemon on gluster-2b    N/A  Y  4345
NFS Server on gluster-2a      38467  Y  1392
Self-heal Daemon on gluster-2a    N/A  Y  1402
NFS Server on gluster-1b      38467  Y  2435
Self-heal Daemon on gluster-1b    N/A  Y  2441

我该怎么办?我需要修理它。

注意:所有四个节点的 CPU 和网络使用率大致相同。

linux
  • 1 个回答
  • 13318 Views
Martin Hope
Roman Newaza
Asked: 2012-10-22 23:13:27 +0800 CST

Gluster volume create -> 主机不是朋友

  • 0

如果我使用 IP 创建 Gluster 卷,它运行良好,但是当我使用主机名时,它说:

Host glustertest1 not a friend

glustertest1 是解析为 EC2 实例私有地址的 Route 53 名称。我使用 glusterfs 3.3.0

问题:这个问题的原因可能是什么?

amazon-ec2
  • 1 个回答
  • 582 Views
Martin Hope
Roman Newaza
Asked: 2012-10-22 18:51:46 +0800 CST

安装复制的 Gluster 多可用区存储

  • 2

我有自动缩放服务器使用的复制 Gluster 存储。Auto Scaling 和 Storage 都分配在两个可用区中。

集群:

Number of Bricks: 4 x 2 = 8
Transport-type: tcp
Bricks:
Brick1: gluster01:/storage/1a # Zone A
Brick2: gluster02:/storage/1b # Zone B
Brick3: gluster03:/storage/2a # Zone A
Brick4: gluster04:/storage/2b # Zone B
Brick5: gluster01:/storage/3a # Zone A
Brick6: gluster02:/storage/3b # Zone B
Brick7: gluster03:/storage/4a # Zone A
Brick8: gluster04:/storage/4b # Zone B

我为 Gluster 入口点使用了循环 DNS,因此 DNS 名称解析为始终以不同顺序返回的所有存储服务器地址:

# host storage.domain.com
storage.domain.com has address xx.xx.xx.x1
storage.domain.com has address xx.xx.xx.x2
storage.domain.com has address xx.xx.xx.x3
storage.domain.com has address xx.xx.xx.x4

存储安装有本地 Gluster 客户端:

# grep storage /etc/fstab
storage.domain.com:/storage /storage glusterfs defaults,log-level=WARNING,log-file=/var/log/gluster.log 0 0

我听说 Gluster 可能会与第一个服务器 IP 一起安装,然后它将与其余服务器一起获取其配置。就个人而言,我从未测试过单个服务器安装设置,我不知道 Gluster 如何处理这个问题。

在 EC2 上,单个可用区之间的流量是免费的,而不同可用区之间的流量则不是。当区域A中的客户端写入存储并返回区域B中存储的IP时,数据传输将花费我两倍的费用:客户端(区域A)->存储服务器(区域B)->复制到存储服务器(区域A) ).

问题:将存储服务器安装在同一区域是否更好,以便数据传输费用仅适用于复制(A -> A -> B)?

linux
  • 1 个回答
  • 551 Views
Martin Hope
Roman Newaza
Asked: 2012-10-12 01:45:59 +0800 CST

服务器上的奇怪进程占用CPU

  • 5

我注意到当前离线的服务器上有 15% 的 CPU 负载。它通过 TCP 安装了 GlusterFS 卷。从顶部看,它向我展示了它的 glusterfs。之后我试图弄清楚到底是什么在使用它,我得到了这个:

# lsof /storage/
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF                NODE NAME
find    16433 nobody  cwd    DIR   0,19     8192 9259265867489333824 /storage/200000/200000/200700/200704/08

然后:

# ps uax | grep find
root     16415  0.0  0.0   4400   724 ?        SN   06:34   0:00 /bin/sh /usr/bin/updatedb.findutils
root     16423  0.0  0.0   4400   336 ?        SN   06:34   0:00 /bin/sh /usr/bin/updatedb.findutils
nobody   16431  0.0  0.0  39524  1376 ?        SN   06:34   0:00 su nobody -s /bin/sh -c /usr/bin/find / -ignore_readdir_race      \( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o      -type d -regex '\(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\)' \) -prune -o -print0
nobody   16432  0.0  0.0   4400   616 ?        SN   06:34   0:00 sh -c /usr/bin/find / -ignore_readdir_race      \( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o      -type d -regex '\(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\)' \) -prune -o -print0
nobody   16433  0.3  0.0  13612  1532 ?        SN   06:34   0:38 /usr/bin/find / -ignore_readdir_race ( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o -type d -regex \(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\) ) -prune -o -print0

我杀死了 16432 和 16433,CPU 现在又是 %0。

有人能告诉我有关这些丑陋的查找命令的任何信息吗?是否可能是其他服务器也安装了此 /storage 引起的?

据监测,每天同一时间发生。

linux
  • 2 个回答
  • 2548 Views
Martin Hope
Roman Newaza
Asked: 2012-10-11 17:27:31 +0800 CST

阻止用户代理访问

  • 0

目标:

允许访问其用户代理为空字符串或“ELB-HealthChecker.*”的客户端,其余的应被阻止。

我试过这段代码,它适用于 nginx/1.2,但在升级到 nginx/1.2.3 之后,它会阻止所有内容:

if ($http_user_agent !~* ELB-HealthChecker|"") { return 403; }

有人可以帮忙吗?

nginx
  • 1 个回答
  • 1197 Views
Martin Hope
Roman Newaza
Asked: 2012-07-27 19:49:47 +0800 CST

即使 www-data 用户具有组写访问权限,Nginx 的权限也被拒绝

  • 1

Nginx 无法写入日志文件,即使其用户具有写入组访问权限。以下是一些细节:

www-data 用户在 ubuntu 组中:

$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),1000(ubuntu)

/opt/logs/ 是组可写的:

$ ls -ld /opt/logs/
drwxrwxr-x 2 ubuntu ubuntu 4096 2012-07-27 02:47 /opt/logs/

www-data 用户可以按预期创建 /opt/logs/1 :

$ su www-data
$ touch /opt/logs/1
$ ls -l /opt/logs/1
-rw-rw-r-- 1 www-data www-data 0 2012-07-27 02:47 /opt/logs/1

Nginx 用户:组:

var_dump(system('whoami'), system('groups'));
// string 'www-data' (length=8)
// string 'www-data ubuntu' (length=15)

但是 Nginx 无法写入:

Warning: file_put_contents(/opt/logs/Error.log) function.file-put-contents failed to open stream: Permission denied

/opt/logs/Error.log 不存在

那么为什么它不能写入文件呢?

linux
  • 1 个回答
  • 10128 Views
Martin Hope
Roman Newaza
Asked: 2012-06-27 02:27:20 +0800 CST

远程日志记录 - Nginx over Rsyslog 或任何其他替代方案

  • 1

我需要设置 Auto Scaling 实例的集中式远程访问日志记录。目前我的 Rsyslog / Apache2 日志记录工作得很好,但是对于新项目使用了 Nginx,我看不到直接通过 TCP/UDP 记录的任何可能性。Rsyslog 可以配置为远程发送读取本地文件的数据,但我的目标是完全避免本地写入。

有人可以分享有关如何配置 Nginx 以通过网络而不是本地 FS 发送消息的知识吗?或者我可能需要将日志轮换配置为 scp 文件?

linux logging amazon-ec2 nginx rsyslog
  • 2 个回答
  • 2870 Views
Martin Hope
Roman Newaza
Asked: 2012-06-26 18:14:57 +0800 CST

在 www-data 用户下挂载 GlusterFS 共享

  • 1

问题:目录自动挂载后,Web Server 没有写入权限。

问题:如何通过 /etc/fstab 自动挂载 GlusterFS 端点,使挂载点在挂载后属于 www-data?

目前,挂载点属于 www-data,但挂载后它变成 root。

# /etc/fstab
foo.com:/st /st glusterfs defaults 0 0

像我无法将用户/组定义为 GlusterFS 的安装选项这样的接缝,至少我在man glusterfs.

谢谢!

linux mount glusterfs
  • 2 个回答
  • 3736 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve