Bug 285956 - java/wildfly: service start fail, illegal group name
Summary: java/wildfly: service start fail, illegal group name
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-08 07:52 UTC by ykla
Modified: 2025-04-15 13:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ykla 2025-04-08 07:52:29 UTC
root@ykla:/home/ykla #pkg install wildfly
root@ykla:/home/ykla # service wildfly enable
wildfly enabled in /etc/rc.conf
root@ykla:/home/ykla # sysrc wildfly_args="-Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0"
wildfly_args:  -> -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0
root@ykla:/home/ykla # sysrc wildfly_log_stdout="/dev/null"
wildfly_log_stdout:  -> /dev/null
root@ykla:/home/ykla # sysrc wildfly_log_stderr="/dev/null"
wildfly_log_stderr:  -> /dev/null
root@ykla:/home/ykla # service wildfly start
install: unknown user %%USER%%
wildfly: making sure all writeable dirs belong to proper user/group
chown: %%GROUP%%: illegal group name
Starting wildfly.
pgrep: Unknown user `%%USER%%'
chown: %%USER%%: illegal user name
-----------------

It might be related to java/wildfly/files/wildfly.in.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-08 09:33:55 UTC
java/wildfly/Makefile:
-                USERS=${USERS} \
-                GROUPS=${GROUPS} \
+                USER=${USERS} \
+                GROUP=${GROUPS} \
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-08 09:37:55 UTC
(In reply to Vladimir Druzenko from comment #1)
+PORTREVISION=     1
Comment 3 ykla 2025-04-12 13:40:02 UTC
(In reply to Vladimir Druzenko from comment #2)
Could you help commit them please?
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-12 13:47:28 UTC
(In reply to ykla from comment #3)
Did you tested my patch?

Awaiting maintainer timeout 2 weeks - 22th of April.
Comment 5 ykla 2025-04-12 15:48:04 UTC
(In reply to Vladimir Druzenko from comment #4)

Sorry, I just did a test. There are no issues with installation and startup. However, there is a permission issue with `/usr/local/wildfly/bin/standalone.sh` and `/usr/local/wildfly/bin/add-user.sh` — they are not executable. You have to manually run `chmod 777` to start WildFly successfully.

Also, when rebooting, it throws an error:

```
root@ykla:/usr/ports/java/wildfly # service wildfly restart
usage: kill [-s signal_name] pid ...
       kill -l [exit_status]
       kill -signal_name pid ...
       kill -signal_number pid ...
```

Although this doesn't affect usage, it does seem like there's still some problem.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-12 16:11:02 UTC
(In reply to ykla from comment #5)
This line in the do-install section removes the executable bit from *.sh files:
        (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${PORTNAME})
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-12 16:29:04 UTC
Workaround:
 do-install:
         ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
         (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${PORTNAME})
+        ${FIND} -s ${STAGEDIR}${PREFIX}/${PORTNAME}/bin -type f -name '*.sh' -exec ${CHMOD} a+x "{}" \;
         ${RM} -rf ${STAGEDIR}${PREFIX}/${PORTNAME}/.installation
Comment 8 ykla 2025-04-12 16:39:45 UTC
(In reply to Vladimir Druzenko from comment #7)
Now everything seems to be working fine. Thank you.

-------------------------------------------------
ykla:/home/ykla # service wildfly stop
root@ykla:/home/ykla # service wildfly restart
wildfly: making sure all writeable dirs belong to proper user/group
Starting wildfly.
root@ykla:/home/ykla # service wildfly status
wildfly is running as pid 6686
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-04-14 20:41:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f106dba475947c666fbf25b0c0164ed2eb68dec

commit 4f106dba475947c666fbf25b0c0164ed2eb68dec
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2025-04-14 10:05:37 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-04-14 20:40:41 +0000

    java/wildfly: Update version 35.0.1=>36.0.0

    - Fix an issue with the service startup [1]

    Changelog: https://www.wildfly.org/news/2025/04/10/WildFly36Released/

    PR:             285956 [1]
    Reported by:    yklaxds@gmail.com [1]

 java/wildfly/Makefile | 11 ++++++-----
 java/wildfly/distinfo |  6 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-14 22:14:20 UTC
wildfly/bin/*.sh without executable bit.
Comment 11 ykla 2025-04-15 13:55:21 UTC
(In reply to Vladimir Druzenko from comment #10)
Thank you. I tested it, and it's working fine now.