When starting multiple  java processes inside different screen
sessions with the screen shm port I experienced the following error.

shmget: Permission denied

Running the processes outside of screen worked and running the
processes inside non shm screen worked.

dmesg attached



# bash -x /etc/rc.d/jackson_minecraft  start
+ SERVICE=minecraft_server.jar
+ SCREENX=/usr/local/bin/screen
+ OPTIONS=nogui
+ USERNAME=_jackson_minecraft
+ MCPATH=/home/_jackson_minecraft/minecraft
+ BACKUPPATH=/home/_jackson_minecraft/minecraft/minecraft.backup
+ CPU_COUNT=2
+ INVOCATION='/usr/local/bin/java -Xmx1536M -Xms1536M
-XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2 -XX:+AggressiveOpts
-jar minecraft_server.jar '
++ whoami
+ ME=root
+ case "$1" in
+ mc_start
+ pgrep -u _jackson_minecraft -f minecraft_server.jar
+ echo 'Starting minecraft_server.jar...'
Starting minecraft_server.jar...
+ cd /home/_jackson_minecraft/minecraft
+ as_user 'cd /home/_jackson_minecraft/minecraft &&
/usr/local/bin/screen -dmS minecraft_jackson /usr/local/bin/java
-Xmx1536M -Xms1536M -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2
-XX:+AggressiveOpts -jar minecraft_server.jar '
+ '[' root == _jackson_minecraft ']'
+ su - _jackson_minecraft -c 'cd /home/_jackson_minecraft/minecraft &&
/usr/local/bin/screen -dmS minecraft_jackson /usr/local/bin/java
-Xmx1536M -Xms1536M -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2
-XX:+AggressiveOpts -jar minecraft_server.jar '
shmget: Permission denied
+ sleep 7
+ pgrep -u _jackson_minecraft -f minecraft_server.jar
+ echo 'Error! Could not start minecraft_server.jar!'
Error! Could not start minecraft_server.jar!
+ exit 0



-- 
--Dan
OpenBSD 5.2 (GENERIC.MP) #368: Wed Aug  1 10:04:49 MDT 2012
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4293001216 (4094MB)
avail mem = 4156350464 (3963MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.34 @ 0xf1110 (45 entries)
bios0: vendor HP version "2.16" date 03/23/2006
bios0: HP ProLiant DL145 G2
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SSDT SRAT SPCR APIC BOOT
acpi0: wakeup devices PCI0(S5) COM1(S5) KBC0(S1) MSE0(S1) USB0(S1) USB2(S1) 
P2P0(S1) XVR0(S5) XVR1(S5) XVR2(S5) XCR0(S5) XCR1(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Opteron(tm) Processor 246, 2010.59 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: apic clock running at 201MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Opteron(tm) Processor 246, 2010.30 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: AMD erratum 89 present, BIOS upgrade may be required
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 11, 24 pins
ioapic1 at mainbus0: apid 3 pa 0xd8000000, version 11, 7 pins
ioapic2 at mainbus0: apid 4 pa 0xd8001000, version 11, 7 pins
acpimadt0: unknown apic structure type 3
acpimadt0: unknown apic structure type 3
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P2P0)
acpiprt2 at acpi0: bus 4 (XVR0)
acpiprt3 at acpi0: bus 3 (XVR1)
acpiprt4 at acpi0: bus 2 (XVR2)
acpiprt5 at acpi0: bus 129 (XCR0)
acpiprt6 at acpi0: bus 134 (XCR1)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpibtn0 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Cool'n'Quiet K8 2010 MHz: speeds: 2000 1800 1000 MHz
pci0 at mainbus0 bus 0
"NVIDIA nForce4 DDR" rev 0xa3 at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 1 function 0 "NVIDIA nForce4 ISA" rev 0xa3
nviic0 at pci0 dev 1 function 1 "NVIDIA nForce4 SMBus" rev 0xa2
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem1 at iic0 addr 0x51: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem2 at iic0 addr 0x52: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem3 at iic0 addr 0x53: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem4 at iic0 addr 0x54: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem5 at iic0 addr 0x55: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem6 at iic0 addr 0x56: 512MB DDR SDRAM registered ECC PC3200CL3.0
spdmem7 at iic0 addr 0x57: 512MB DDR SDRAM registered ECC PC3200CL3.0
iic1 at nviic0
admtm0 at iic1 addr 0x2d: 47m192
ohci0 at pci0 dev 2 function 0 "NVIDIA nForce4 USB" rev 0xa2: apic 2 int 20, 
version 1.0, legacy support
ehci0 at pci0 dev 2 function 1 "NVIDIA nForce4 USB" rev 0xa3: apic 2 int 20
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "NVIDIA EHCI root hub" rev 2.00/1.00 addr 1
pciide0 at pci0 dev 6 function 0 "NVIDIA nForce4 IDE" rev 0xa2: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 8 function 0 "NVIDIA nForce4 SATA" rev 0xa3: DMA
pciide1: using apic 2 int 20 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <WDC WD5003ABYX-18WERA0>
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 6
wd1 at pciide1 channel 1 drive 0: <WDC WD5003ABYX-18WERA0>
wd1: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd1(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 6
ppb0 at pci0 dev 9 function 0 "NVIDIA nForce4 PCI-PCI" rev 0xa2
pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 "NVIDIA GeForce2 MX" rev 0xb2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 12 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1 (0x4101): 
apic 2 int 16, address 00:17:a4:78:91:a3
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb2 at pci0 dev 13 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci3 at ppb2 bus 3
bge1 at pci3 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1 (0x4101): 
apic 2 int 19, address 00:17:a4:78:91:a2
brgphy1 at bge1 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb3 at pci0 dev 14 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci4 at ppb3 bus 4
pchb0 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pci5 at pchb0 bus 128
ppb4 at pci5 dev 1 function 0 "AMD 8132 PCIX" rev 0x12
pci6 at ppb4 bus 129
"AMD 8132 PCIX IOAPIC" rev 0x12 at pci5 dev 1 function 1 not configured
ppb5 at pci5 dev 2 function 0 "AMD 8132 PCIX" rev 0x12
pci7 at ppb5 bus 134
"AMD 8132 PCIX IOAPIC" rev 0x12 at pci5 dev 2 function 1 not configured
pchb1 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
pchb3 at pci0 dev 25 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb4 at pci0 dev 25 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb5 at pci0 dev 25 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate1 at pci0 dev 25 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "NVIDIA OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
uhidev0 at uhub1 port 4 configuration 1 interface 0 " USB Keyboard" rev 
1.10/3.10 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 4 configuration 1 interface 1 " USB Keyboard" rev 
1.10/3.10 addr 2
uhidev1: iclass 3/0, 2 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=3, output=0, feature=0
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
sd0 at scsibus1 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd0: 476733MB, 512 bytes/sector, 976349873 sectors
root on sd0a (211d1ae2bf78eba1.a) swap on sd0b dump on sd0b

Reply via email to