Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open PID file /opt/fastcfs/data/fdfs_trackerd.pid (yet?) #568

Closed
GeXin666 opened this issue Jul 19, 2022 · 15 comments
Closed

Can't open PID file /opt/fastcfs/data/fdfs_trackerd.pid (yet?) #568

GeXin666 opened this issue Jul 19, 2022 · 15 comments

Comments

@GeXin666
Copy link

v6.08
[root@node1 ~]# systemctl status fdfs_trackerd
● fdfs_trackerd.service - FastDFS trackerd service
Loaded: loaded (/usr/lib/systemd/system/fdfs_trackerd.service; disabled; vendor preset: disabled)
Active: activating (start) since Mon 2022-07-18 22:00:05 CST; 33min ago

Jul 18 22:00:05 node1 systemd[1]: Starting FastDFS trackerd service...
Jul 18 22:00:05 node1 systemd[1]: Can't open PID file /opt/fastcfs/data/fdfs_trackerd.pid (yet?) after start: No such file or directory

#尝试修改了这个文件也不好使
/usr/lib/systemd/system/fdfs_trackerd.service
PIDFile=/data/fastdfs/tracker/data/fdfs_trackerd.pid

@happyfish100
Copy link
Owner

看一下tracker server日志文件有没有报错

@GeXin666
Copy link
Author

[2022-07-18 22:40:55] INFO - FastDFS v6.08, base_path=/data/fastdfs/tracker, run_by_group=, run_by_user=, connect_timeout=5s, network_timeout=60s, port=22122, bind_addr=0.0.0.0, max_connections=1024, accept_threads=1, work_threads=4, min_buff_size=8,192, max_buff_size=131,072, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=20.00%, download_server=0, allow_ip_count=-1, sync_log_buff_interval=1s, check_active_interval=120s, thread_stack_size=256 KB, storage_ip_changed_auto_adjust=1, storage_sync_file_max_delay=86400s, storage_sync_file_max_time=300s, use_trunk_file=0, slot_min_size=256, slot_max_size=1024 KB, trunk_alloc_alignment_size=256, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, trunk_free_space_merge=1, delete_unused_trunk_files=0, trunk_compress_binlog_min_interval=86400, trunk_compress_binlog_interval=86400, trunk_compress_binlog_time_base=03:00, trunk_binlog_max_backups=7, use_storage_id=0, id_type_in_filename=ip, storage_id/ip_count=0 / 0, rotate_error_log=0, error_log_rotate_time=00:00, compress_old_error_log=0, compress_error_log_days_before=7, rotate_error_log_size=0, log_file_keep_days=0, store_slave_file_use_link=0, use_connection_pool=1, g_connection_pool_max_idle_time=3600s
[2022-07-19 14:27:49] INFO - file: tracker_relationship.c, line: 468, selecting tracker leader...
[2022-07-19 14:27:49] INFO - file: tracker_relationship.c, line: 487, I am the new tracker leader 192.168.80.222:22122

#这是我tracker的配置
mkdir -p /data/fastdfs/tracker
vim /etc/fdfs/tracker.conf
bind_addr = 0.0.0.0
base_path = /data/fastdfs/tracker

##日志都正常,测试上传都没问题。用fdfs_trackerd /etc/fdfs/tracker.conf start好使
我想用systemctl启动,并且设置开机启动,好像找不PID,因为我配置文件在/data/fastdfs/tracker,所以PID文件它创建到了/data/fastdfs/tracker中,但是systemctl在/opt/fastcfs/data/fdfs_trackerd.pid去找的,我修改了/usr/lib/systemd/system/fdfs_trackerd.service也不好使。

@happyfish100
Copy link
Owner

路径改正确后,应该没问题才对。
经实测发现,命令行启动方式和systemd不要混用,否则会有问题。

@GeXin666
Copy link
Author

程序安装后
#1:fdfs_trackerd /etc/fdfs/tracker.conf start,测试启动成功。
#2:fdfs_trackerd /etc/fdfs/tracker.conf stop,关闭程序。
然后我想用systemctl启动,变成开机自动启动这种。
#3:systemctl start fdfs_trackerd.service 启动后卡主,
然后我修改/usr/lib/systemd/system/fdfs_trackerd.service文件PIDFile=/data/fastdfs/tracker/data/fdfs_trackerd.pid。
路径是对的,但是依然启动失败,我用systemctl status fdfs_trackerd去查看,发现修改没生效。
怎么解决这个问题?

@happyfish100
Copy link
Owner

你可以试试 reload 让配置文件生效

@GeXin666
Copy link
Author

systemctl daemon-reload 试了,不好使呀

@happyfish100
Copy link
Owner

systemctl reload fdfs_trackerd.service

@GeXin666
Copy link
Author

systemctl reload fdfs_trackerd.service
Failed to reload fdfs_trackerd.service: Job type reload is not applicable for unit fdfs_trackerd.service.
See system logs and 'systemctl status fdfs_trackerd.service' for details.

@IzualYang
Copy link

systemctl reload fdfs_trackerd.service

daemon-reload

@IzualYang
Copy link

程序安装后 #1:fdfs_trackerd /etc/fdfs/tracker.conf start,测试启动成功。 #2:fdfs_trackerd /etc/fdfs/tracker.conf stop,关闭程序。 然后我想用systemctl启动,变成开机自动启动这种。 #3:systemctl start fdfs_trackerd.service 启动后卡主, 然后我修改/usr/lib/systemd/system/fdfs_trackerd.service文件PIDFile=/data/fastdfs/tracker/data/fdfs_trackerd.pid。 路径是对的,但是依然启动失败,我用systemctl status fdfs_trackerd去查看,发现修改没生效。 怎么解决这个问题?

systemctl daemon-reload 刷新服务配置

@GeXin666
Copy link
Author

各种方法都尝试了 不好使

@happyfish100
Copy link
Owner

pid文件的目录名笔误了,v6.09已经修复。

@xiangys0134
Copy link

v6.09 我刚刚安装遇到了同样的问题systemctl start fdfs_trackerd.service,卡住了。
[root@iZ0jlcqjnf4x7vqtssb7wrZ fdfs]# /usr/bin/fdfs_trackerd -V

fdfs_trackerd V6.9.4

/etc/fdfs/tracker.conf

bind_addr = 0.0.0.0
base_path = /data/fastdfs/tracker

/usr/lib/systemd/system/fdfs_trackerd.service

PIDFile=/data/fastdfs/tracker/fdfs_trackerd.pid

命令启动正常,sytemctl启动卡住了

@happyfish100
Copy link
Owner

bind_addr配置为空即可,不知道是否和这个设置有关。

@happyfish100
Copy link
Owner

PIDFile=/data/fastdfs/tracker/data/fdfs_trackerd.pid
路径最后是 data 这个子目录。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants